mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
_inverse is now private
This commit is contained in:
parent
aab47b3587
commit
dc2b2cd5f6
@ -40,7 +40,6 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat2x2
|
||||
{
|
||||
// Implementation detail
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
@ -54,15 +53,17 @@ namespace detail
|
||||
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
|
||||
|
||||
public:
|
||||
// Implementation detail
|
||||
GLM_FUNC_DECL tmat2x2<T, P> _inverse() const;
|
||||
|
||||
friend tmat2x2<T, P> inverse(tmat2x2<T, P> const & m);
|
||||
friend col_type operator/(tmat2x2<T, P> const & m, row_type const & v);
|
||||
friend row_type operator/(row_type const & v, tmat2x2<T, P> const & m);
|
||||
|
||||
private:
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
/// @cond DETAIL
|
||||
col_type value[2];
|
||||
|
||||
GLM_FUNC_DECL tmat2x2<T, P> _inverse() const;
|
||||
/// @endcond
|
||||
|
||||
public:
|
||||
//////////////////////////////////////
|
||||
// Constructors
|
||||
|
@ -395,7 +395,7 @@ namespace detail
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/= (tmat2x2<U, P> const & m)
|
||||
{
|
||||
return (*this = *this / m);
|
||||
return (*this = *this * m._inverse());
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -648,11 +648,12 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/
|
||||
(
|
||||
tmat2x2<T, P> const & m1,
|
||||
tmat2x2<T, P> const & m1,
|
||||
tmat2x2<T, P> const & m2
|
||||
)
|
||||
{
|
||||
return m1 * m2._inverse();
|
||||
{
|
||||
tmat2x2<T, P> m1_copy(m1);
|
||||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
|
@ -53,16 +53,17 @@ namespace detail
|
||||
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
|
||||
|
||||
public:
|
||||
/// Implementation detail
|
||||
/// @cond DETAIL
|
||||
GLM_FUNC_DECL tmat3x3<T, P> _inverse() const;
|
||||
/// @endcond
|
||||
|
||||
friend tmat3x3<T, P> inverse(tmat3x3<T, P> const & m);
|
||||
friend col_type operator/(tmat3x3<T, P> const & m, row_type const & v);
|
||||
friend row_type operator/(row_type const & v, tmat3x3<T, P> const & m);
|
||||
|
||||
private:
|
||||
// Data
|
||||
/// @cond DETAIL
|
||||
col_type value[3];
|
||||
|
||||
GLM_FUNC_DECL tmat3x3<T, P> _inverse() const;
|
||||
/// @endcond
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat3x3();
|
||||
|
@ -418,7 +418,7 @@ namespace detail
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/= (tmat3x3<U, P> const & m)
|
||||
{
|
||||
return (*this = *this / m);
|
||||
return (*this = *this * m._inverse());
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -764,7 +764,8 @@ namespace detail
|
||||
tmat3x3<T, P> const & m2
|
||||
)
|
||||
{
|
||||
return m1 * m2._inverse();
|
||||
tmat3x3<T, P> m1_copy(m1);
|
||||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
|
@ -57,16 +57,17 @@ namespace detail
|
||||
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
|
||||
|
||||
public:
|
||||
/// Implementation detail
|
||||
friend tmat4x4<T, P> inverse(tmat4x4<T, P> const & m);
|
||||
friend col_type operator/(tmat4x4<T, P> const & m, row_type const & v);
|
||||
friend row_type operator/(row_type const & v, tmat4x4<T, P> const & m);
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[4];
|
||||
|
||||
GLM_FUNC_DECL tmat4x4<T, P> _inverse() const;
|
||||
/// @endcond
|
||||
|
||||
private:
|
||||
// Data
|
||||
col_type value[4];
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat4x4();
|
||||
|
@ -489,7 +489,7 @@ namespace detail
|
||||
template <typename U>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/= (tmat4x4<U, P> const & m)
|
||||
{
|
||||
return (*this = *this / m);
|
||||
return (*this = *this * m._inverse());
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -891,7 +891,7 @@ namespace detail
|
||||
{
|
||||
return v * m._inverse();
|
||||
}
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/
|
||||
(
|
||||
@ -899,7 +899,8 @@ namespace detail
|
||||
tmat4x4<T, P> const & m2
|
||||
)
|
||||
{
|
||||
return m1 * m2._inverse();
|
||||
tmat4x4<T, P> m1_copy(m1);
|
||||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
|
@ -31,8 +31,8 @@ namespace glm
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType row
|
||||
(
|
||||
genType const & m,
|
||||
int const & index,
|
||||
genType const & m,
|
||||
int const & index,
|
||||
typename genType::row_type const & x
|
||||
)
|
||||
{
|
||||
|
@ -73,6 +73,7 @@ GLM 0.9.5.0: 2013-12-25
|
||||
- Fixed CUDA coverage for GTC extensions
|
||||
- Added GTX_io extension
|
||||
- Improved GLM messages enabled when defining GLM_MESSAGES
|
||||
- Implementation detail _inverse is now private
|
||||
|
||||
================================================================================
|
||||
GLM 0.9.4.6: 2013-09-20
|
||||
|
Loading…
Reference in New Issue
Block a user