This reference page is linked to from the following overview topics: Lesson 4: Animation Controllers, Lesson 6: Parameter Blocks, Parameter Types, Matrix Representations of 3D Transformations, Matrix Fundamentals, Translation (Moving), Rotation, Scaling, A Matrix3 as an Axis System, Rotation Concepts, Node Transformations, Transform Controller Coordinate Systems, Creating Primitive NURBS Objects, Controllers, Transform Controllers and Nodes, Dialog Based Creation of Objects.
#include <matrix3.h>

Public Member Functions |
|
| const Point3 & | operator[] (int i) const |
| void | SetNotIdent () |
| void | SetIdentFlags (DWORD f) |
| DWORD | GetIdentFlags () const |
| void | ClearIdentFlag (DWORD f) |
| BOOL | IsIdentity () const |
| GEOMEXPORT void | ValidateFlags () |
| MRow * | GetAddr () |
| const MRow * | GetAddr () const |
| Matrix3 () | |
| Matrix3 (BOOL) | |
| GEOMEXPORT | Matrix3 (float(*fp)[3]) |
| Matrix3 (const Point3 &U, const Point3 &V, const Point3 &N, const Point3 &T) | |
| Matrix3 & | Set (const Point3 &U, const Point3 &V, const Point3 &N, const Point3 &T) |
| GEOMEXPORT int | operator== (const Matrix3 &M) const |
| GEOMEXPORT int | Equals (const Matrix3 &M, float epsilon=1E-6f) const |
| GEOMEXPORT Matrix3 & | operator-= (const Matrix3 &M) |
| GEOMEXPORT Matrix3 & | operator+= (const Matrix3 &M) |
| GEOMEXPORT Matrix3 & | operator*= (const Matrix3 &M) |
| GEOMEXPORT Matrix3 & | operator*= (float a) |
| GEOMEXPORT void | IdentityMatrix () |
| GEOMEXPORT void | Zero () |
| Point3 | GetRow (int i) const |
| GEOMEXPORT void | SetRow (int i, Point3 p) |
| GEOMEXPORT Point4 | GetColumn (int i) const |
| GEOMEXPORT void | SetColumn (int i, Point4 col) |
| GEOMEXPORT Point3 | GetColumn3 (int i) const |
| GEOMEXPORT void | NoTrans () |
| GEOMEXPORT void | NoRot () |
| GEOMEXPORT void | NoScale () |
| GEOMEXPORT void | Orthogonalize () |
| void | SetTrans (const Point3 p) |
| void | SetTrans (int i, float v) |
| const Point3 & | GetTrans () const |
| GEOMEXPORT void | Translate (const Point3 &p) |
| GEOMEXPORT void | RotateX (float angle) |
| GEOMEXPORT void | RotateY (float angle) |
| GEOMEXPORT void | RotateZ (float angle) |
| GEOMEXPORT void | Scale (const Point3 &s, BOOL trans=FALSE) |
| GEOMEXPORT void | PreTranslate (const Point3 &p) |
| GEOMEXPORT void | PreRotateX (float angle) |
| GEOMEXPORT void | PreRotateY (float angle) |
| GEOMEXPORT void | PreRotateZ (float angle) |
| GEOMEXPORT void | PreScale (const Point3 &s, BOOL trans=FALSE) |
| GEOMEXPORT void | SetTranslate (const Point3 &p) |
| GEOMEXPORT void | SetRotateX (float angle) |
| GEOMEXPORT void | SetRotateY (float angle) |
| GEOMEXPORT void | SetRotateZ (float angle) |
| GEOMEXPORT void | SetRotate (const Quat &q) |
| GEOMEXPORT void | SetRotate (const AngAxis &aa) |
| GEOMEXPORT void | SetRotate (float yaw, float pitch, float roll) |
| GEOMEXPORT void | SetAngleAxis (const Point3 &axis, float angle) |
| GEOMEXPORT void | SetScale (const Point3 &s) |
| GEOMEXPORT void | SetFromToUp (const Point3 &from, const Point3 &to, const Point3 &up) |
| GEOMEXPORT void | Invert () |
| GEOMEXPORT Matrix3 | operator* (const Matrix3 &) const |
| GEOMEXPORT Matrix3 | operator+ (const Matrix3 &) const |
| GEOMEXPORT Matrix3 | operator- (const Matrix3 &) const |
| GEOMEXPORT Point3 | PointTransform (const Point3 &p) const |
| GEOMEXPORT Point3 | VectorTransform (const Point3 &p) const |
| GEOMEXPORT void | TransformPoints (Point3 *array, int n, int stride=sizeof(Point3)) |
| GEOMEXPORT void | TransformPoints (const Point3 *array, Point3 *to, int n, int stride=sizeof(Point3), int strideTo=sizeof(Point3)) |
| GEOMEXPORT void | TransformVectors (Point3 *array, int n, int stride=sizeof(Point3)) |
| GEOMEXPORT void | TransformVectors (const Point3 *array, Point3 *to, int n, int stride=sizeof(Point3), int strideTo=sizeof(Point3)) |
| GEOMEXPORT void | GetYawPitchRoll (float *yaw, float *pitch, float *roll) |
| GEOMEXPORT IOResult | Save (ISave *isave) |
| GEOMEXPORT IOResult | Load (ILoad *iload) |
| GEOMEXPORT BOOL | Parity () const |
Static Public Attributes |
|
| static const Matrix3 | Identity |
Friends |
|
| class | Quat |
| Matrix3 GEOMEXPORT | RotateXMatrix (float angle) |
| Matrix3 GEOMEXPORT | RotateYMatrix (float angle) |
| Matrix3 GEOMEXPORT | RotateZMatrix (float angle) |
| Matrix3 GEOMEXPORT | TransMatrix (const Point3 &p) |
| Matrix3 GEOMEXPORT | ScaleMatrix (const Point3 &s) |
| Matrix3 GEOMEXPORT | RotateYPRMatrix (float Yaw, float Pitch, float Roll) |
| Matrix3 GEOMEXPORT | RotAngleAxisMatrix (Point3 &axis, float angle) |
| Matrix3 GEOMEXPORT | Inverse (const Matrix3 &M) |
| Point3 GEOMEXPORT | operator* (const Matrix3 &A, const Point3 &V) |
| Point3 GEOMEXPORT | operator* (const Point3 &V, const Matrix3 &A) |
| Point3 GEOMEXPORT | VectorTransform (const Matrix3 &M, const Point3 &V) |
| Matrix3 GEOMEXPORT | XFormMat (const Matrix3 &xm, const Matrix3 &m) |
| Point3 GEOMEXPORT | VectorTransform (const Point3 &V, const Matrix3 &M) |
| Matrix3 | ( | ) | [inline] |
{ flags = 0; } // NO INITIALIZATION done in this constructor!!
| Matrix3 | ( | BOOL | ) | [inline] |
{flags=0; IdentityMatrix();}
| GEOMEXPORT Matrix3 | ( | float(*) | fp[3] | ) |
{
flags = 0; SetRow(0, U); SetRow(1, V); SetRow(2, N); SetRow(3, T);
ValidateFlags(); }
| const Point3& operator[] | ( | int | i | ) | const [inline] |
| void SetNotIdent | ( | ) | [inline] |
{ flags &= ~MAT_IDENT; }
| void SetIdentFlags | ( | DWORD | f | ) | [inline] |
{ flags &= ~MAT_IDENT; flags |= f; }
| DWORD GetIdentFlags | ( | ) | const [inline] |
| void ClearIdentFlag | ( | DWORD | f | ) | [inline] |
{ flags &= ~f; }
| BOOL IsIdentity | ( | ) | const [inline] |
{ return ((flags&MAT_IDENT)==MAT_IDENT); }
| GEOMEXPORT void ValidateFlags | ( | ) |
| MRow* GetAddr | ( | ) | [inline] |
{ return (MRow *)(m); }
| const MRow* GetAddr | ( | ) | const [inline] |
{ return (MRow *)(m); }
{
flags = 0; SetRow(0, U); SetRow(1, V); SetRow(2, N); SetRow(3, T);
ValidateFlags(); return *this; }
| GEOMEXPORT int operator== | ( | const Matrix3 & | M | ) | const |
| GEOMEXPORT int Equals | ( | const Matrix3 & | M, |
| float | epsilon =
1E-6f |
||
| ) | const |
| GEOMEXPORT Matrix3& operator*= | ( | float | a | ) |
| GEOMEXPORT void IdentityMatrix | ( | ) |
| GEOMEXPORT void Zero | ( | ) |
| Point3 GetRow | ( | int | i | ) | const [inline] |
{ return (*this)[i]; }
| GEOMEXPORT void SetRow | ( | int | i, |
| Point3 | p | ||
| ) |
| GEOMEXPORT Point4 GetColumn | ( | int | i | ) | const |
| GEOMEXPORT void SetColumn | ( | int | i, |
| Point4 | col | ||
| ) |
| GEOMEXPORT Point3 GetColumn3 | ( | int | i | ) | const |
| GEOMEXPORT void NoTrans | ( | ) |
| GEOMEXPORT void NoRot | ( | ) |
| GEOMEXPORT void NoScale | ( | ) |
| GEOMEXPORT void Orthogonalize | ( | ) |
| void SetTrans | ( | const Point3 | p | ) | [inline] |
{ (*this)[3] = p; flags &= ~POS_IDENT; }
| void SetTrans | ( | int | i, |
| float | v | ||
| ) | [inline] |
{ (*this)[3][i] = v; flags &= ~POS_IDENT; }
| const Point3& GetTrans | ( | ) | const [inline] |
{ return (*this)[3]; }
| GEOMEXPORT void Translate | ( | const Point3 & | p | ) |
| GEOMEXPORT void RotateX | ( | float | angle | ) |
| GEOMEXPORT void RotateY | ( | float | angle | ) |
| GEOMEXPORT void RotateZ | ( | float | angle | ) |
| GEOMEXPORT void Scale | ( | const Point3 & | s, |
| BOOL | trans =
FALSE |
||
| ) |
| GEOMEXPORT void PreTranslate | ( | const Point3 & | p | ) |
| GEOMEXPORT void PreRotateX | ( | float | angle | ) |
| GEOMEXPORT void PreRotateY | ( | float | angle | ) |
| GEOMEXPORT void PreRotateZ | ( | float | angle | ) |
| GEOMEXPORT void PreScale | ( | const Point3 & | s, |
| BOOL | trans =
FALSE |
||
| ) |
| GEOMEXPORT void SetTranslate | ( | const Point3 & | p | ) |
| GEOMEXPORT void SetRotateX | ( | float | angle | ) |
| GEOMEXPORT void SetRotateY | ( | float | angle | ) |
| GEOMEXPORT void SetRotateZ | ( | float | angle | ) |
| GEOMEXPORT void SetRotate | ( | const Quat & | q | ) |
| GEOMEXPORT void SetRotate | ( | const AngAxis & | aa | ) |
| GEOMEXPORT void SetRotate | ( | float | yaw, |
| float | pitch, | ||
| float | roll | ||
| ) |
| GEOMEXPORT void SetAngleAxis | ( | const Point3 & | axis, |
| float | angle | ||
| ) |
| GEOMEXPORT void SetScale | ( | const Point3 & | s | ) |
| GEOMEXPORT void Invert | ( | ) |
| GEOMEXPORT void TransformPoints | ( | const Point3 * | array, |
| Point3 * | to, | ||
| int | n, | ||
| int | stride = sizeof(Point3), |
||
| int | strideTo = sizeof(Point3) |
||
| ) |
| GEOMEXPORT void TransformVectors | ( | const Point3 * | array, |
| Point3 * | to, | ||
| int | n, | ||
| int | stride = sizeof(Point3), |
||
| int | strideTo = sizeof(Point3) |
||
| ) |
| GEOMEXPORT void GetYawPitchRoll | ( | float * | yaw, |
| float * | pitch, | ||
| float * | roll | ||
| ) |
| GEOMEXPORT BOOL Parity | ( | ) | const |
friend class Quat [friend] |
| Matrix3 GEOMEXPORT RotateXMatrix | ( | float | angle | ) | [friend] |
| Matrix3 GEOMEXPORT RotateYMatrix | ( | float | angle | ) | [friend] |
| Matrix3 GEOMEXPORT RotateZMatrix | ( | float | angle | ) | [friend] |
| Matrix3 GEOMEXPORT RotateYPRMatrix | ( | float | Yaw, |
| float | Pitch, | ||
| float | Roll | ||
| ) | [friend] |