Tweaked the invert() method to avoid silly OSX warnings.
This commit is contained in:
@@ -200,10 +200,8 @@ class OSG_EXPORT Matrixd
|
||||
/** invert the matrix rhs, automatically select invert_4x3 or invert_4x4. */
|
||||
inline bool invert( const Matrixd& rhs)
|
||||
{
|
||||
if (rhs._mat[0][3]==0.0 && rhs._mat[1][3]==0.0 && rhs._mat[2][3]==0.0 && rhs._mat[3][3]==1.0)
|
||||
return invert_4x3(rhs);
|
||||
else
|
||||
return invert_4x4(rhs);
|
||||
bool is_4x3 = (rhs._mat[0][3]==0.0 && rhs._mat[1][3]==0.0 && rhs._mat[2][3]==0.0 && rhs._mat[3][3]==1.0);
|
||||
return is_4x3 ? invert_4x3(rhs) : invert_4x4(rhs);
|
||||
}
|
||||
|
||||
/** 4x3 matrix invert, not right hand column is assumed to be 0,0,0,1. */
|
||||
|
||||
@@ -200,10 +200,8 @@ class OSG_EXPORT Matrixf
|
||||
/** invert the matrix rhs, automatically select invert_4x3 or invert_4x4. */
|
||||
inline bool invert( const Matrixf& rhs)
|
||||
{
|
||||
if (rhs._mat[0][3]==0.0 && rhs._mat[1][3]==0.0 && rhs._mat[2][3]==0.0 && rhs._mat[3][3]==1.0)
|
||||
return invert_4x3(rhs);
|
||||
else
|
||||
return invert_4x4(rhs);
|
||||
bool is_4x3 = (rhs._mat[0][3]==0.0f && rhs._mat[1][3]==0.0f && rhs._mat[2][3]==0.0f && rhs._mat[3][3]==1.0f);
|
||||
return is_4x3 ? invert_4x3(rhs) : invert_4x4(rhs);
|
||||
}
|
||||
|
||||
/** 4x3 matrix invert, not right hand column is assumed to be 0,0,0,1. */
|
||||
|
||||
Reference in New Issue
Block a user