#include
Inherits INumberArray< F, 12 >.
Public Member Functions | |
ILINE | Matrix34_tpl (type_zero) |
template | |
ILINE | Matrix34_tpl (const Matrix34_tpl< F1 > &m) |
template | |
ILINE | Matrix34_tpl (const Matrix34H< F1 > &m) |
ILINE | Matrix34_tpl (type_identity) |
Set matrix to Identity. | |
ILINE | Matrix34_tpl (F v00, F v01, F v02, F v03, F v10, F v11, F v12, F v13, F v20, F v21, F v22, F v23) |
CONSTRUCTOR for identical float-types. It initialises a matrix34 with 12 floats. | |
template | |
ILINE | Matrix34_tpl (const Matrix33_tpl< F1 > &m) |
template | |
ILINE | Matrix34_tpl (const Matrix33_tpl< F1 > &m, const Vec3_tpl< F1 > &t) |
template | |
ILINE | Matrix34_tpl (type_identity, const Vec3_tpl< F1 > &t) |
template | |
ILINE | Matrix34_tpl (const Matrix44_tpl< F1 > &m) |
template | |
ILINE | Matrix34_tpl (const Quat_tpl< F1 > &q) |
template | |
ILINE | Matrix34_tpl (const QuatT_tpl< F1 > q) |
template | |
ILINE | Matrix34_tpl (const QuatTS_tpl< F1 > &q) |
template | |
ILINE | Matrix34_tpl (const QuatTNS_tpl< F1 > &q) |
template | |
ILINE | Matrix34_tpl (const DualQuat_tpl< F1 > &q) |
ILINE void | ScaleColumn (const Vec3_tpl< F > &s) |
Applies scaling to the coordinate frame's axes. | |
ILINE void | ScaleColumn (const float &s) |
Applies scaling to the coordinate frame's axes. | |
void | SetIdentity (void) |
Initializes the Matrix34 with the identity. | |
ILINE bool | IsIdentity () const |
ILINE void | SetRotationAA (const F rad, const Vec3_tpl< F > &axis, const Vec3_tpl< F > &t=Vec3(ZERO)) |
ILINE void | SetRotationAA (const Vec3_tpl< F > &rot, const Vec3_tpl< F > &t=Vec3(ZERO)) |
ILINE void | SetRotationX (const F rad, const Vec3_tpl< F > &t=Vec3(ZERO)) |
ILINE void | SetRotationY (const F rad, const Vec3_tpl< F > &t=Vec3(ZERO)) |
ILINE void | SetRotationZ (const F rad, const Vec3_tpl< F > &t=Vec3(ZERO)) |
ILINE void | SetRotationXYZ (const Ang3_tpl< F > &rad, const Vec3_tpl< F > &t=Vec3(ZERO)) |
ILINE void | SetRotationAA (F c, F s, Vec3_tpl< F > axis, const Vec3_tpl< F > &t=Vec3(ZERO)) |
ILINE void | SetTranslationMat (const Vec3_tpl< F > &v) |
ILINE void | SetFromVectors (const Vec3 &vx, const Vec3 &vy, const Vec3 &vz, const Vec3 &pos) |
void | InvertFast () |
In-place inversion. | |
Matrix34_tpl< F > | GetInvertedFast () const |
ILINE Vec3_tpl< F > | TransformVector (const Vec3_tpl< F > &v) const |
transforms a vector. the translation is not beeing considered | |
ILINE Vec3_tpl< F > | TransformPoint (const Vec3_tpl< F > &p) const |
transforms a point and add translation vector | |
void | OrthonormalizeFast () |
Remove scale from matrix. | |
ILINE F | Determinant () const |
Determinant assumes a 4th row = (0,0,0,1); therefore only the upper-left-submatrix's determinant is calculated. | |
ILINE F | GetUniformScale () const |
ILINE Vec3 | GetScale () const |
F * | GetData () |
const F * | GetData () const |
ILINE F | operator() (uint32 i, uint32 j) const |
ILINE F & | operator() (uint32 i, uint32 j) |
ILINE void | SetRow (int i, const Vec3_tpl< F > &v) |
ILINE void | SetRow4 (int i, const Vec4_tpl< F > &v) |
ILINE const Vec3_tpl< F > & | GetRow (int i) const |
ILINE const Vec4_tpl< F > & | GetRow4 (int i) const |
ILINE void | SetColumn (int i, const Vec3_tpl< F > &v) |
ILINE Vec3_tpl< F > | GetColumn (int i) const |
ILINE Vec3_tpl< F > | GetColumn0 () const |
ILINE Vec3_tpl< F > | GetColumn1 () const |
ILINE Vec3_tpl< F > | GetColumn2 () const |
ILINE Vec3_tpl< F > | GetColumn3 () const |
ILINE void | SetTranslation (const Vec3_tpl< F > &t) |
ILINE Vec3_tpl< F > | GetTranslation () const |
ILINE void | ScaleTranslation (F s) |
ILINE Matrix34_tpl< F > | AddTranslation (const Vec3_tpl< F > &t) |
ILINE void | SetRotation33 (const Matrix33_tpl< F > &m33) |
ILINE void | GetRotation33 (Matrix33_tpl< F > &m33) const |
int | IsOrthonormal (F threshold=0.001) const |
Check if we have an orthonormal-base (general case, works even with reflection matrices). | |
int | IsOrthonormalRH (F threshold=0.001) const |
Check if we have an orthonormal-base (assuming we are using a right-handed coordinate system). | |
ILINE void | Set (const Vec3_tpl< F > &s, const Quat_tpl< F > &q, const Vec3_tpl< F > &t=Vec3(ZERO)) |
Matrix34_tpl (const Vec3_tpl< F > &s, const Quat_tpl< F > &q, const Vec3_tpl< F > &t=Vec3(ZERO)) | |
ILINE void | SetScale (const Vec3_tpl< F > &s, const Vec3_tpl< F > &t=Vec3(ZERO)) |
ILINE Matrix44_tpl< F > | GetTransposed () const |
ILINE Matrix34_tpl< F > & | Transpose (const Matrix34_tpl< F > &m) |
void | Invert (const Matrix34_tpl< F > &m) |
ILINE void | Invert () |
ILINE Matrix34_tpl< F > | GetInverted () const |
void | Magnitude (const Matrix34_tpl< F > &m) |
ILINE void | Magnitude () |
ILINE Matrix34_tpl< F > | GetMagnitude () const |
Static Public Member Functions | |
static ILINE Matrix34_tpl< F > | CreateIdentity (void) |
static ILINE Matrix34_tpl< F > | CreateRotationAA (const F rad, const Vec3_tpl< F > &axis, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateRotationAA (const Vec3_tpl< F > &rot, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateRotationX (const F rad, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateRotationY (const F rad, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateRotationZ (const F rad, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateRotationXYZ (const Ang3_tpl< F > &rad, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateRotationAA (F c, F s, Vec3_tpl< F > axis, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateTranslationMat (const Vec3_tpl< F > &v) |
static ILINE Matrix34_tpl< F > | CreateFromVectors (const Vec3_tpl< F > &vx, const Vec3_tpl< F > &vy, const Vec3_tpl< F > &vz, const Vec3_tpl< F > &pos) |
static ILINE Matrix34_tpl< F > | Create (const Vec3_tpl< F > &s, const Quat_tpl< F > &q, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateScale (const Vec3_tpl< F > &s, const Vec3_tpl< F > &t=Vec3(ZERO)) |
static ILINE Matrix34_tpl< F > | CreateReflectionMat (const Vec3_tpl< F > &p, const Vec3_tpl< F > &n) |
Public Attributes | |
F | m00 |
F | m01 |
F | m02 |
F | m03 |
F | m10 |
F | m11 |
F | m12 |
F | m13 |
F | m20 |
F | m21 |
F | m22 |
F | m23 |
AUTO_STRUCT_INFO | |
Represents a 3x4 matrix
CONSTRUCTOR for different float-types. It converts a Matrix33 into a Matrix34 and also converts between double/float. Matrix34(Matrix33);
|
inline |
CONSTRUCTOR for different float-types. It converts a Matrix33 with a translation-vector into a Matrix34 and also converts between double/float. Matrix34(Matrix33r,Vec3d(1,2,3));
|
inline |
CONSTRUCTOR for different float-types. It constructs a Matrix34 with translation only. Matrix34(IDENTITY, Vec3d(1,2,3));
|
inline explicit |
CONSTRUCTOR for different float types. It converts a Matrix44 into a Matrix34 and converts between double/float. Needs to be 'explicit' because we loose the translation vector in the conversion process. Matrix34(m44r);
CONSTRUCTOR for different float-types. It converts a Quat into a Matrix34. Needs to be 'explicit' because we loose float-precision in the conversion process. Matrix34(QuatTd);
CONSTRUCTOR for different float-types. It converts a QuatT into a Matrix34. Needs to be 'explicit' because we loose float-precision in the conversion process. Matrix34(QuatT);
|
inline explicit |
CONSTRUCTOR for different float-types. It converts a QuatTS into a Matrix34. Needs to be 'explicit' because we loose float-precision in the conversion process. Matrix34(QuatT);
|
inline explicit |
CONSTRUCTOR for different float-types. It converts a QuatTNS into a Matrix34. Needs to be 'explicit' because we loose float-precision in the conversion process. Matrix34(QuatT);
|
inline explicit |
CONSTRUCTOR for different float-types. It converts a DualQuat into a Matrix34. Needs to be 'explicit' because we loose float-precision in the conversion process. Matrix34(QuatT);
|
inline static |
Reflect a rotation matrix with respect to a plane. Example: Vec3 normal( 0.0f,-1.0f, 0.0f); Vec3 pos(0,1000,0); Matrix34 m34=CreateReflectionMat( pos, normal );
|
inline |
Calculate a real inversion of a Matrix34. An inverse-matrix is an UnDo-matrix for all kind of transformations. Example 1: Matrix34 im34; im34.Invert(); Example 2: Matrix34 im34 = m34.GetInverted();
|
inline |
Create a matrix with SCALING, ROTATION and TRANSLATION (in this order). Example 1: Matrix m34; m34.SetMatrix( Vec3(1,2,3), quat, Vec3(11,22,33) );
|
inline |
|
inline |
Create a rotation matrix around an arbitrary axis (Eulers Theorem). The axis is specified as an normalized Vec3. The angle is assumed to be in radians. This function also assumes a translation-vector and stores it in the right column. Example: Matrix34 m34; Vec3 axis=GetNormalized( Vec3(-1.0f,-0.3f,0.0f) ); m34.SetRotationAA( 3.14314f, axis, Vec3(5,5,5) );
|
inline |
Create rotation-matrix about X axis using an angle. The angle is assumed to be in radians. The translation-vector is set to zero. Example: Matrix34 m34; m34.SetRotationX(0.5f);
|
inline |
Convert three Euler angle to mat33 (rotation order:XYZ) The Euler angles are assumed to be in radians. The translation-vector is set to zero. Example 1: Matrix34 m34; m34.SetRotationXYZ( Ang3(0.5f,0.2f,0.9f), translation ); Example 2: Matrix34 m34=Matrix34::CreateRotationXYZ( Ang3(0.5f,0.2f,0.9f), translation );
|
inline |
Create rotation-matrix about Y axis using an angle. The angle is assumed to be in radians. The translation-vector is set to zero.
Example: Matrix34 m34; m34.SetRotationY(0.5f);
|
inline |
Create rotation-matrix about Z axis using an angle. The angle is assumed to be in radians. The translation-vector is set to zero. Example: Matrix34 m34; m34.SetRotationZ(0.5f);
|
inline |
Create scaling-matrix. The translation-vector is set to zero. Example 1: Matrix m34; m34.SetScale( Vec3(0.5f, 1.0f, 2.0f) ); Example 2: Matrix34 m34 = Matrix34::CreateScale( Vec3(0.5f, 1.0f, 2.0f) );