64 if( &rhs ==
this )
return *
this;
75 inline void set(
float const *
const ptr)
81 inline void set(
double const *
const ptr)
97 return _mat[0][0]==1.0f &&
_mat[0][1]==0.0f &&
_mat[0][2]==0.0f &&
_mat[0][3]==0.0f &&
98 _mat[1][0]==0.0f &&
_mat[1][1]==1.0f &&
_mat[1][2]==0.0f &&
_mat[1][3]==0.0f &&
99 _mat[2][0]==0.0f &&
_mat[2][1]==0.0f &&
_mat[2][2]==1.0f &&
_mat[2][3]==0.0f &&
100 _mat[3][0]==0.0f &&
_mat[3][1]==0.0f &&
_mat[3][2]==0.0f &&
_mat[3][3]==1.0f;
144 double bottom,
double top,
145 double zNear,
double zFar);
152 double& bottom,
double& top,
153 double& zNear,
double& zFar)
const;
157 float& bottom,
float& top,
158 float& zNear,
float& zFar)
const;
165 double bottom,
double top)
167 makeOrtho(left,right,bottom,top,-1.0,1.0);
175 double bottom,
double top,
176 double zNear,
double zFar);
183 double& bottom,
double& top,
184 double& zNear,
double& zFar)
const;
188 float& bottom,
float& top,
189 float& zNear,
float& zFar)
const;
196 double zNear,
double zFar);
209 double& zNear,
double& zFar)
const;
213 float& zNear,
float& zFar)
const;
235 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);
281 double bottom,
double top,
282 double zNear,
double zFar);
288 double bottom,
double top);
294 double bottom,
double top,
295 double zNear,
double zFar);
302 double zNear,
double zFar);
322 inline Vec3f operator* (
const Vec3f& v )
const;
323 inline Vec3d operator* (
const Vec3d& v )
const;
328 inline Vec4f operator* (
const Vec4f& v )
const;
329 inline Vec4d operator* (
const Vec4d& v )
const;
331#ifdef OSG_USE_DEPRECATED_API
333 inline void get(
Quat& q)
const { q = getRotate(); }
393 inline void operator *= (
const Matrixf& other )
394 {
if(
this == &other ) {
540 a30, a31, a32, a33) {}
546 virtual const char*
className()
const {
return "Matrix"; }
624 m.
makeRotate(angle1,axis1,angle2,axis2,angle3,axis3);
632 m.
makeRotate(angle1,axis1,angle2,axis2,angle3,axis3);
663 double bottom,
double top,
664 double zNear,
double zFar)
667 m.
makeOrtho(left,right,bottom,top,zNear,zFar);
672 double bottom,
double top)
680 double bottom,
double top,
681 double zNear,
double zFar)
689 double zNear,
double zFar)
797 for (
unsigned i = 0; i < 3; ++i)
811 for (
unsigned i = 0; i < 3; ++i)
825 for (
unsigned i = 0; i < 3; ++i)
839 for (
unsigned i = 0; i < 3; ++i)
853 _mat[0][0] *= v[0];
_mat[0][1] *= v[0];
_mat[0][2] *= v[0];
_mat[0][3] *= v[0];
854 _mat[1][0] *= v[1];
_mat[1][1] *= v[1];
_mat[1][2] *= v[1];
_mat[1][3] *= v[1];
855 _mat[2][0] *= v[2];
_mat[2][1] *= v[2];
_mat[2][2] *= v[2];
_mat[2][3] *= v[2];
860 _mat[0][0] *= v[0];
_mat[0][1] *= v[0];
_mat[0][2] *= v[0];
_mat[0][3] *= v[0];
861 _mat[1][0] *= v[1];
_mat[1][1] *= v[1];
_mat[1][2] *= v[1];
_mat[1][3] *= v[1];
862 _mat[2][0] *= v[2];
_mat[2][1] *= v[2];
_mat[2][2] *= v[2];
_mat[2][3] *= v[2];
867 _mat[0][0] *= v[0];
_mat[1][0] *= v[0];
_mat[2][0] *= v[0];
_mat[3][0] *= v[0];
868 _mat[0][1] *= v[1];
_mat[1][1] *= v[1];
_mat[2][1] *= v[1];
_mat[3][1] *= v[1];
869 _mat[0][2] *= v[2];
_mat[1][2] *= v[2];
_mat[2][2] *= v[2];
_mat[3][2] *= v[2];
874 _mat[0][0] *= v[0];
_mat[1][0] *= v[0];
_mat[2][0] *= v[0];
_mat[3][0] *= v[0];
875 _mat[0][1] *= v[1];
_mat[1][1] *= v[1];
_mat[2][1] *= v[1];
_mat[3][1] *= v[1];
876 _mat[0][2] *= v[2];
_mat[1][2] *= v[2];
_mat[2][2] *= v[2];
_mat[3][2] *= v[2];
void setTrans(const Vec3d &v)
Matrixf(const Matrixd &mat)
void postMultTranslate(const Vec3d &v)
Definition Matrixf:823
static Matrixf perspective(double fovy, double aspectRatio, double zNear, double zFar)
Definition Matrixf:688
void mult(const Matrixf &, const Matrixf &)
static Matrixf identity(void)
Definition Matrixf:556
Matrixf(value_type a00, value_type a01, value_type a02, value_type a03, value_type a10, value_type a11, value_type a12, value_type a13, value_type a20, value_type a21, value_type a22, value_type a23, value_type a30, value_type a31, value_type a32, value_type a33)
void preMultScale(const Vec3d &v)
Definition Matrixf:851
bool isNaN() const
Definition Matrixf:57
static Matrixf lookAt(const Vec3f &eye, const Vec3f ¢er, const Vec3f &up)
Definition Matrixf:696
static Vec3f transform3x3(const Vec3f &v, const Matrixf &m)
Definition Matrixf:769
bool invert(const Matrixf &rhs)
Definition Matrixf:233
void makeRotate(const Vec3d &from, const Vec3d &to)
Vec3d getScale() const
Definition Matrixf:350
static Matrixf ortho(double left, double right, double bottom, double top, double zNear, double zFar)
Definition Matrixf:662
bool getPerspective(double &fovy, double &aspectRatio, double &zNear, double &zFar) const
float value_type
Definition Matrixf:30
static Matrixf scale(const Vec3f &sv)
Definition Matrixf:570
static Matrixf inverse(const Matrixf &matrix)
Definition Matrixf:648
void makeScale(const Vec3f &)
value_type & operator()(int row, int col)
Definition Matrixf:53
const value_type * ptr() const
Definition Matrixf:93
bool invert_4x4(const Matrixf &rhs)
void makeRotate(value_type angle1, const Vec3d &axis1, value_type angle2, const Vec3d &axis2, value_type angle3, const Vec3d &axis3)
void set(const Matrixf &rhs)
Definition Matrixf:71
void makePerspective(double fovy, double aspectRatio, double zNear, double zFar)
void orthoNormalize(const Matrixf &rhs)
bool invert_4x3(const Matrixf &rhs)
void decompose(osg::Vec3f &translation, osg::Quat &rotation, osg::Vec3f &scale, osg::Quat &so) const
void preMultTranslate(const Vec3d &v)
Definition Matrixf:795
void makeRotate(value_type angle, value_type x, value_type y, value_type z)
static Matrixf translate(const Vec3f &dv)
Definition Matrixf:587
void makeScale(const Vec3d &)
Vec3f postMult(const Vec3f &v) const
Definition Matrixf:710
void setRotate(const Quat &q)
Matrixf(const Matrixf &mat)
Definition Matrixf:34
int compare(const Matrixf &m) const
void set(const Matrixd &rhs)
static Matrixf orthoNormal(const Matrixf &matrix)
Definition Matrixf:655
value_type operator()(int row, int col) const
Definition Matrixf:54
bool getFrustum(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
void setTrans(const Vec3f &v)
bool transpose3x3(const Matrixf &rhs)
void set(float const *const ptr)
Definition Matrixf:75
void preMultRotate(const Quat &q)
Definition Matrixf:880
void makeRotate(const Vec3f &from, const Vec3f &to)
void set(double const *const ptr)
Definition Matrixf:81
bool valid() const
Definition Matrixf:56
value_type * ptr()
Definition Matrixf:92
void set(value_type a00, value_type a01, value_type a02, value_type a03, value_type a10, value_type a11, value_type a12, value_type a13, value_type a20, value_type a21, value_type a22, value_type a23, value_type a30, value_type a31, value_type a32, value_type a33)
void makeScale(value_type, value_type, value_type)
void makeRotate(value_type angle1, const Vec3f &axis1, value_type angle2, const Vec3f &axis2, value_type angle3, const Vec3f &axis3)
Vec3f operator*(const Vec3f &v) const
Definition Matrixf:915
static Matrixf rotate(const Vec3f &from, const Vec3f &to)
Definition Matrixf:635
void decompose(osg::Vec3d &translation, osg::Quat &rotation, osg::Vec3d &scale, osg::Quat &so) const
void postMultRotate(const Quat &q)
Definition Matrixf:889
void getLookAt(Vec3d &eye, Vec3d ¢er, Vec3d &up, value_type lookDistance=1.0f) const
void makeTranslate(const Vec3f &)
~Matrixf()
Definition Matrixf:45
void preMult(const Matrixf &)
value_type _mat[4][4]
Definition Matrixf:519
bool getOrtho(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
static Matrixf frustum(double left, double right, double bottom, double top, double zNear, double zFar)
Definition Matrixf:679
Vec3f preMult(const Vec3f &v) const
Definition Matrixf:725
Matrixf(float const *const ptr)
Definition Matrixf:36
bool transpose(const Matrixf &rhs)
Vec3d getTrans() const
Definition Matrixf:348
void makeLookAt(const Vec3d &eye, const Vec3d ¢er, const Vec3d &up)
Matrixf()
Definition Matrixf:33
void postMult(const Matrixf &)
void makeTranslate(value_type, value_type, value_type)
bool getOrtho(float &left, float &right, float &bottom, float &top, float &zNear, float &zFar) const
void makeOrtho(double left, double right, double bottom, double top, double zNear, double zFar)
void getLookAt(Vec3f &eye, Vec3f ¢er, Vec3f &up, value_type lookDistance=1.0f) const
void postMultScale(const Vec3d &v)
Definition Matrixf:865
Matrixf(const Quat &quat)
Definition Matrixf:38
Matrixf(double const *const ptr)
Definition Matrixf:37
bool isIdentity() const
Definition Matrixf:95
void makeRotate(const Quat &)
void makeOrtho2D(double left, double right, double bottom, double top)
Definition Matrixf:164
void makeFrustum(double left, double right, double bottom, double top, double zNear, double zFar)
bool getFrustum(float &left, float &right, float &bottom, float &top, float &zNear, float &zFar) const
void setTrans(value_type tx, value_type ty, value_type tz)
void makeTranslate(const Vec3d &)
static Matrixf ortho2D(double left, double right, double bottom, double top)
Definition Matrixf:671
void makeRotate(value_type angle, const Vec3d &axis)
bool getPerspective(float &fovy, float &aspectRatio, float &zNear, float &zFar) const
void makeRotate(value_type angle, const Vec3f &axis)
double other_value_type
Definition Matrixf:31
Object()
Definition Object:69
bool zeroRotation() const
Definition Quat:175
virtual Object * cloneType() const
Definition Matrixf:542
virtual const char * className() const
Definition Matrixf:546
virtual ~RefMatrixf()
Definition Matrixf:551
virtual Object * clone(const CopyOp &) const
Definition Matrixf:543
RefMatrixf(Matrixf::value_type const *const def)
Definition Matrixf:531
RefMatrixf()
Definition Matrixf:527
RefMatrixf(Matrixf::value_type a00, Matrixf::value_type a01, Matrixf::value_type a02, Matrixf::value_type a03, Matrixf::value_type a10, Matrixf::value_type a11, Matrixf::value_type a12, Matrixf::value_type a13, Matrixf::value_type a20, Matrixf::value_type a21, Matrixf::value_type a22, Matrixf::value_type a23, Matrixf::value_type a30, Matrixf::value_type a31, Matrixf::value_type a32, Matrixf::value_type a33)
Definition Matrixf:532
RefMatrixf(const Matrixd &other)
Definition Matrixf:529
RefMatrixf(const RefMatrixf &other)
Definition Matrixf:530
virtual const char * libraryName() const
Definition Matrixf:545
virtual bool isSameKindAs(const Object *obj) const
Definition Matrixf:544
RefMatrixf(const Matrixf &other)
Definition Matrixf:528
value_type & z()
Definition Vec3d:87
value_type & x()
Definition Vec3d:85
value_type & y()
Definition Vec3d:86
value_type length() const
Definition Vec3d:181
value_type & z()
Definition Vec3f:82
value_type & y()
Definition Vec3f:81
value_type & x()
Definition Vec3f:80
value_type & x()
Definition Vec4d:90
value_type & y()
Definition Vec4d:91
value_type & z()
Definition Vec4d:92
value_type & w()
Definition Vec4d:93
value_type & y()
Definition Vec4f:88
value_type & x()
Definition Vec4f:87
value_type & z()
Definition Vec4f:89
value_type & w()
Definition Vec4f:90
Vec3f operator*(const Vec3f &v, const Matrixd &m)
Definition Matrixd:793
T * get(unsigned int contextID)
Definition ContextData:152
bool isNaN(float v)
Definition Math:133
#define NULL
Definition osg/Export:55
#define OSG_EXPORT
Definition osg/Export:39