4x4 Matrix for storage & manipulation of transformations in scene graph.
Inheritance:
Public Fields
-
float _mat[4][4]
Public Methods
-
Matrix()
-
Matrix(const Matrix& matrix)
-
Matrix( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
-
Matrix& operator = (const Matrix& matrix)
-
virtual ~Matrix()
-
virtual Object* clone() const
-
virtual bool isSameKindAs(const Object* obj) const
-
virtual const char* className() const
-
void makeIdent()
-
void set(const float* m)
-
void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
-
void copy(const Matrix& matrix)
-
void makeScale(float sx, float sy, float sz)
-
void preScale( float sx, float sy, float sz, const Matrix& m )
-
void postScale( const Matrix& m, float sx, float sy, float sz )
-
void preScale( float sx, float sy, float sz )
-
void postScale( float sx, float sy, float sz )
-
void makeTrans( float tx, float ty, float tz )
-
void preTrans( float tx, float ty, float tz, const Matrix& m )
-
void postTrans( const Matrix& m, float tx, float ty, float tz )
-
void preTrans( float tx, float ty, float tz )
-
void postTrans( float tx, float ty, float tz )
-
void makeRot( const Vec3& old_vec, const Vec3& new_vec )
- Calc the rotation matrix which aligns vector \a old_vec with vector \a new_vec.
-
void makeRot( float deg, float x, float y, float z )
-
void preRot( float deg, float x, float y, float z, const Matrix& m )
-
void postRot( const Matrix& m, float deg, float x, float y, float z )
-
void preRot( float deg, float x, float y, float z )
-
void postRot( float deg, float x, float y, float z )
-
void setTrans( float tx, float ty, float tz )
-
void setTrans( const Vec3& v )
-
Vec3 getTrans() const
-
void preMult(const Matrix& m)
-
void postMult(const Matrix& m)
-
void mult(const Matrix& lhs, const Matrix& rhs)
-
Matrix operator * (const Matrix& m) const
-
inline static Vec3 transform3x3(const Vec3& v, const Matrix& m)
- apply apply an 3x3 transform of v*M[02,02]
-
inline static Vec3 transform3x3(const Matrix& m, const Vec3& v)
- apply apply an 3x3 transform of M[02,02]*v
-
bool invert(const Matrix& m)
-
inline Vec3 operator * (const Vec3& v) const
- post multipy v.
-
inline Vec4 operator * (const Vec4& v) const
- post multipy v.
-
inline Vec3 transform3x3(const Vec3& v, const Matrix& m)
-
inline Vec3 transform3x3(const Matrix& m, const Vec3& v)
Inherited from Object:
Public Methods
-
inline void ref() const
-
inline void unref() const
-
inline const int referenceCount() const
Protected Fields
-
mutable int _refCount
Documentation
4x4 Matrix for storage & manipulation of transformations in scene graph.
Provides basic maths operations, IO and via osg::Object reference counting.
You can directly load the matrix with OpenGL's LoadMatrixf() function via
the public member _mat as the matrix is stored in the OpenGL format.
Caution: The disadvantage of this feature is, that the matrix access is
'transposed' if you compare it with the standard C/C++ 2d-array-access
convention . I.e. _mat[i][j] accesses the ith column of the jth row in the
4x4 matrix.
- Matrix()
- Matrix(const Matrix& matrix)
- Matrix( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
- Matrix& operator = (const Matrix& matrix)
- virtual ~Matrix()
- virtual Object* clone() const
- virtual bool isSameKindAs(const Object* obj) const
- virtual const char* className() const
- void makeIdent()
- void set(const float* m)
- void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
- void copy(const Matrix& matrix)
- void makeScale(float sx, float sy, float sz)
- void preScale( float sx, float sy, float sz, const Matrix& m )
- void postScale( const Matrix& m, float sx, float sy, float sz )
- void preScale( float sx, float sy, float sz )
- void postScale( float sx, float sy, float sz )
- void makeTrans( float tx, float ty, float tz )
- void preTrans( float tx, float ty, float tz, const Matrix& m )
- void postTrans( const Matrix& m, float tx, float ty, float tz )
- void preTrans( float tx, float ty, float tz )
- void postTrans( float tx, float ty, float tz )
- void makeRot( const Vec3& old_vec, const Vec3& new_vec )
-
Calc the rotation matrix which aligns vector \a old_vec with
vector \a new_vec. Both \a old_vec and \a new_vec must have
length 1.0.
- void makeRot( float deg, float x, float y, float z )
- void preRot( float deg, float x, float y, float z, const Matrix& m )
- void postRot( const Matrix& m, float deg, float x, float y, float z )
- void preRot( float deg, float x, float y, float z )
- void postRot( float deg, float x, float y, float z )
- void setTrans( float tx, float ty, float tz )
- void setTrans( const Vec3& v )
- Vec3 getTrans() const
- void preMult(const Matrix& m)
- void postMult(const Matrix& m)
- void mult(const Matrix& lhs, const Matrix& rhs)
- Matrix operator * (const Matrix& m) const
- inline static Vec3 transform3x3(const Vec3& v, const Matrix& m)
- apply apply an 3x3 transform of v*M[02,02]
- inline static Vec3 transform3x3(const Matrix& m, const Vec3& v)
- apply apply an 3x3 transform of M[02,02]*v
- bool invert(const Matrix& m)
- float _mat[4][4]
- inline Vec3 operator * (const Vec3& v) const
- post multipy v. ie. (m*v)
- inline Vec4 operator * (const Vec4& v) const
- post multipy v. ie. (m*v)
- inline Vec3 transform3x3(const Vec3& v, const Matrix& m)
- inline Vec3 transform3x3(const Matrix& m, const Vec3& v)
- This class has no child classes.
- Friends:
- inline Vec3 operator * (const Vec3& v,const Matrix& m)
inline Vec4 operator * (const Vec4& v,const Matrix& m)
inline ostream& operator << (ostream& output, const Matrix& matrix)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.