class SG_EXPORT osg::Matrix

4x4 Matrix for storage & manipulation of transformations in scene graph.

Inheritance:


Public Fields

[more]float _mat[4][4]

Public Methods

[more] Matrix()
[more] Matrix(const Matrix& matrix)
[more] 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)
[more]Matrix& operator = (const Matrix& matrix)
[more]virtual ~Matrix()
[more]virtual Object* clone() const
[more]virtual bool isSameKindAs(const Object* obj) const
[more]virtual const char* className() const
[more]void makeIdent()
[more]void set(const float* m)
[more]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)
[more]void copy(const Matrix& matrix)
[more]void makeScale(float sx, float sy, float sz)
[more]void preScale( float sx, float sy, float sz, const Matrix& m )
[more]void postScale( const Matrix& m, float sx, float sy, float sz )
[more]void preScale( float sx, float sy, float sz )
[more]void postScale( float sx, float sy, float sz )
[more]void makeTrans( float tx, float ty, float tz )
[more]void preTrans( float tx, float ty, float tz, const Matrix& m )
[more]void postTrans( const Matrix& m, float tx, float ty, float tz )
[more]void preTrans( float tx, float ty, float tz )
[more]void postTrans( float tx, float ty, float tz )
[more]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.
[more]void makeRot( float deg, float x, float y, float z )
[more]void preRot( float deg, float x, float y, float z, const Matrix& m )
[more]void postRot( const Matrix& m, float deg, float x, float y, float z )
[more]void preRot( float deg, float x, float y, float z )
[more]void postRot( float deg, float x, float y, float z )
[more]void setTrans( float tx, float ty, float tz )
[more]void setTrans( const Vec3& v )
[more]Vec3 getTrans() const
[more]void preMult(const Matrix& m)
[more]void postMult(const Matrix& m)
[more]void mult(const Matrix& lhs, const Matrix& rhs)
[more]Matrix operator * (const Matrix& m) const
[more]inline static Vec3 transform3x3(const Vec3& v, const Matrix& m)
apply apply an 3x3 transform of v*M[02,02]
[more]inline static Vec3 transform3x3(const Matrix& m, const Vec3& v)
apply apply an 3x3 transform of M[02,02]*v
[more]bool invert(const Matrix& m)
[more]inline Vec3 operator * (const Vec3& v) const
post multipy v.
[more]inline Vec4 operator * (const Vec4& v) const
post multipy v.
[more]inline Vec3 transform3x3(const Vec3& v, const Matrix& m)
[more]inline Vec3 transform3x3(const Matrix& m, const Vec3& v)


Inherited from Object:


Inherited from Referenced:

Public Methods

oinline void ref() const
oinline void unref() const
oinline const int referenceCount() const

Protected Fields

omutable 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.
o Matrix()

o Matrix(const Matrix& matrix)

o 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)

oMatrix& operator = (const Matrix& matrix)

ovirtual ~Matrix()

ovirtual Object* clone() const

ovirtual bool isSameKindAs(const Object* obj) const

ovirtual const char* className() const

ovoid makeIdent()

ovoid set(const float* m)

ovoid 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)

ovoid copy(const Matrix& matrix)

ovoid makeScale(float sx, float sy, float sz)

ovoid preScale( float sx, float sy, float sz, const Matrix& m )

ovoid postScale( const Matrix& m, float sx, float sy, float sz )

ovoid preScale( float sx, float sy, float sz )

ovoid postScale( float sx, float sy, float sz )

ovoid makeTrans( float tx, float ty, float tz )

ovoid preTrans( float tx, float ty, float tz, const Matrix& m )

ovoid postTrans( const Matrix& m, float tx, float ty, float tz )

ovoid preTrans( float tx, float ty, float tz )

ovoid postTrans( float tx, float ty, float tz )

ovoid 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.

ovoid makeRot( float deg, float x, float y, float z )

ovoid preRot( float deg, float x, float y, float z, const Matrix& m )

ovoid postRot( const Matrix& m, float deg, float x, float y, float z )

ovoid preRot( float deg, float x, float y, float z )

ovoid postRot( float deg, float x, float y, float z )

ovoid setTrans( float tx, float ty, float tz )

ovoid setTrans( const Vec3& v )

oVec3 getTrans() const

ovoid preMult(const Matrix& m)

ovoid postMult(const Matrix& m)

ovoid mult(const Matrix& lhs, const Matrix& rhs)

oMatrix operator * (const Matrix& m) const

oinline static Vec3 transform3x3(const Vec3& v, const Matrix& m)
apply apply an 3x3 transform of v*M[02,02]

oinline static Vec3 transform3x3(const Matrix& m, const Vec3& v)
apply apply an 3x3 transform of M[02,02]*v

obool invert(const Matrix& m)

ofloat _mat[4][4]

oinline Vec3 operator * (const Vec3& v) const
post multipy v. ie. (m*v)

oinline Vec4 operator * (const Vec4& v) const
post multipy v. ie. (m*v)

oinline Vec3 transform3x3(const Vec3& v, const Matrix& m)

oinline 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++.