Drag[en]gine Game Engine
1.21
|
4x4 Component Matrix. Provides matrix calculation on a 4x4 matrix in row major order. The coordinate system used by axis oriented creation functions is a left handed one. The X axis points to the right, the Y axis points up and the Z axis points into the screen. Rotations are always in counter clockwise orientation. Rotation angles are measured in radians. More...
#include <decMatrix.h>
Public Member Functions | |
Constructors and Destructors | |
decMatrix () | |
Create new matrix initialized to identity. More... | |
decMatrix (const decMatrix &m) | |
Create copy of a matrix. More... | |
decMatrix (const decDMatrix &m) | |
Create copy of a double matrix. More... | |
Management | |
void | SetIdentity () |
Sets identity matrix. More... | |
void | SetTranslation (float x, float y, float z) |
Sets translation matrix. More... | |
void | SetTranslation (const decVector &t) |
Sets translation matrix. More... | |
void | SetScale (float sx, float sy, float sz) |
Sets scaling matrix. More... | |
void | SetScale (const decVector &s) |
Sets scaling matrix. More... | |
void | SetRotationX (float arc) |
Sets rotation around the x axis matrix. More... | |
void | SetRotationY (float arc) |
Sets rotation around the y axis matrix. More... | |
void | SetRotationZ (float arc) |
Sets rotation around the z axis matrix. More... | |
void | SetRotation (float rx, float ry, float rz) |
Set rotation around the all three axes matrix. More... | |
void | SetRotation (const decVector &r) |
Set rotation around the all three axes matrix. More... | |
void | SetRotationAxis (const decVector &axis, float angle) |
Sets rotation around an arbitrary axis matrix. More... | |
void | SetWorld (const decVector &pos, const decVector &view, const decVector &up) |
Set world space matrix. More... | |
void | SetWorld (const decVector &pos, const decQuaternion &orientation) |
Set world space matrix. More... | |
void | SetWorld (const decVector &pos, const decQuaternion &orientation, const decVector &scale) |
Set world space matrix. More... | |
void | SetCamera (const decVector &pos, const decVector &view, const decVector &up) |
Set camera space matrix. More... | |
void | SetProjection (int width, int height, float fov, float fovRatio, float znear, float zfar) |
Set projection matrix based on a finite view frustum. More... | |
void | SetProjectionInfinite (int width, int height, float fov, float fovRatio, float znear) |
Set projection matrix based on a infinite view frustum. More... | |
void | SetOrtho (int left, int right, int top, int bottom, int znear, int zfar) |
Set orthogonal projection matrix. More... | |
void | SetClipSpace () |
Set matrix to transform a projection matrix into cliping space. More... | |
void | SetBiasMatrix () |
Set bias matrix which multiplies all coordinates by 0.5 and offsets them by 0.5. More... | |
void | SetRT (const decVector &rot, const decVector &pos) |
Set rotation-translation matrix. More... | |
void | SetSRT (const decVector &scale, const decVector &rot, const decVector &pos) |
Set scale-rotation-translation matrix. More... | |
void | SetSVUT (const decVector &scale, const decVector &view, const decVector &up, const decVector &pos) |
Set scale-view-up-translation matrix. More... | |
void | SetVU (const decVector &view, const decVector &up) |
Set view-up matrix. More... | |
void | SetFromQuaternion (const decQuaternion &q) |
Set rotation matrix from a quaternion. More... | |
void | SetFromQuaternion (const decQuaternion &q, const decVector &pivot) |
Set rotation matrix from a quaternion. More... | |
float | Determinant () const |
Calculates the determinant of the matrix. More... | |
decMatrix | Invert () const |
Inverse of this matrix if the inverse is possible. More... | |
decVector | GetEulerAngles () const |
Calculate set of euler angles producing this matrix if they are used as rotation vector for creating a rotation matrix. More... | |
decQuaternion | ToQuaternion () const |
Convert matrix into a rotation quaternion. More... | |
decVector | GetPosition () const |
Position of the matrix. More... | |
decVector | GetScale () const |
Scaling of the matrix. More... | |
decVector | TransformView () const |
View vector of this matrix. More... | |
decVector | TransformRight () const |
Right vector of this matrix. More... | |
decVector | TransformUp () const |
Up vector of this matrix. More... | |
decVector | TransformNormal (const decVector &normal) const |
Transforms a normal by this matrix. More... | |
decVector | Transform (float x, float y, float z) const |
Transforma vector. More... | |
decVector4 | Transform (float x, float y, float z, float w) const |
Transforma vector. More... | |
void | Transform (decVector &result, float x, float y, float z) const |
Transforma vector. More... | |
void | Transform (decVector4 &result, float x, float y, float z, float w) const |
Transforma vector. More... | |
decMatrix | GetRotationMatrix () const |
Rotation part of the matrix. More... | |
void | Normalize () |
Normalize matrix. More... | |
decMatrix | Normalized () const |
Normalize matrix. More... | |
bool | IsEqualTo (const decMatrix &matrix, float threshold=0.0001) const |
Matrix is cell wise equal to anither one in respect to a threshold. More... | |
Quick Calculations | |
Quick calculations are a special set of functions designed to work only with matrices which are non-projective. This kind of matrices have only a rotation part and a translation part. The entire last row has the values 0,0,0,1 . Those functions are the same as the non-quick versions with the difference that calculations are stripped out due to the last row beeing 0,0,0,1 . As the name suggests those functions are faster than the normal ones for projective matrices due to them having less calculations. Only use those functions if you know for sure that your matrices are of the described kind. | |
decMatrix | QuickMultiply (const decMatrix &matrix) const |
Quick multiplies this matrix with another one. More... | |
decMatrix | QuickMultiplyRotation (const decMatrix &matrix) const |
Quick multiplies this matrix rotation part with another one. More... | |
decMatrix | QuickMultiply (float k) const |
Quick multiplies this matrix with a value k. More... | |
float | QuickDeterminant () const |
Quick calculates the determinant of this matrix. More... | |
decMatrix | QuickInvert () const |
Quick calculates the inverse of this matrix. More... | |
decMatrix & | QuickAddTo (const decMatrix &m) |
Quick cell wise adds another matrix to this matrix. More... | |
Operators | |
decMatrix & | operator= (const decMatrix &m) |
Set cells of this matrix to the values of another one. More... | |
decMatrix & | operator+= (const decMatrix &m) |
Adds the cells of another matrix to this one. More... | |
decMatrix & | operator-= (const decMatrix &m) |
Subtracts the cells of another matrix from this vector. More... | |
decMatrix & | operator*= (float k) |
Multiplies the cells of this matrix with a value k. More... | |
decMatrix & | operator/= (float k) |
Divide cells of this matrix by a value k. More... | |
decMatrix & | operator*= (const decMatrix &m) |
Multiplies this matrix with another one. More... | |
decMatrix | operator+ (const decMatrix &m) const |
Retrieves a new matrix with the sum of this matrix with another one. More... | |
decMatrix | operator- (const decMatrix &m) const |
Retrieves a new matrix with the difference of this matrix to another one. More... | |
decMatrix | operator* (float k) const |
Retrieves a new matrix with this matrix scaled by k. More... | |
decMatrix | operator/ (float k) const |
Matrix with this matrix divided by k. More... | |
decMatrix | operator* (const decMatrix &m) const |
Retrieves a new matrix with this matrix multiplied with another one. More... | |
decVector | operator* (const decVector &v) const |
Transforms vector by this matrix. More... | |
decVector4 | operator* (const decVector4 &v) const |
Transforms 4 component vector by this matrix. More... | |
Static Public Member Functions | |
Matrix Creation | |
static decMatrix | CreateIdentity () |
Create new identity matrix. More... | |
static decMatrix | CreateTranslation (float x, float y, float z) |
Create new translation matrix. More... | |
static decMatrix | CreateTranslation (const decVector &t) |
Create new translation matrix. More... | |
static decMatrix | CreateScale (float sx, float sy, float sz) |
Create new scaling matrix. More... | |
static decMatrix | CreateScale (const decVector &s) |
Create new scaling matrix. More... | |
static decMatrix | CreateRotationX (float arc) |
Create new rotation around the x axis matrix. More... | |
static decMatrix | CreateRotationY (float arc) |
Create new rotation around the y axis matrix. More... | |
static decMatrix | CreateRotationZ (float arc) |
Create new rotation around the z axis matrix. More... | |
static decMatrix | CreateRotation (float rx, float ry, float rz) |
Create new rotation around the all three axes matrix. More... | |
static decMatrix | CreateRotation (const decVector &r) |
Create new rotation around the all three axes matrix. More... | |
static decMatrix | CreateRotationAxis (const decVector &axis, float angle) |
Create new rotation around an arbitrary axis matrix. More... | |
static decMatrix | CreateWorld (const decVector &pos, const decVector &view, const decVector &up) |
Create new world space matrix. More... | |
static decMatrix | CreateWorld (const decVector &pos, const decQuaternion &orientation) |
Create new world space matrix. More... | |
static decMatrix | CreateWorld (const decVector &pos, const decQuaternion &orientation, const decVector &scale) |
Create world space matrix. More... | |
static decMatrix | CreateCamera (const decVector &pos, const decVector &view, const decVector &up) |
Create new camera space matrix. More... | |
static decMatrix | CreateProjection (int width, int height, float fov, float fovRatio, float znear, float zfar) |
Create projection matrix based on a finite view frustum. More... | |
static decMatrix | CreateProjectionInfinite (int width, int height, float fov, float fovRatio, float znear) |
Create projection matrix based on a infinite view frustum. More... | |
static decMatrix | CreateOrtho (int left, int right, int top, int bottom, int znear, int zfar) |
Create orthogonal projection matrix. More... | |
static decMatrix | CreateClipSpace () |
Create matrix to transform a projection matrix into cliping space. More... | |
static decMatrix | CreateBiasMatrix () |
Create bias matrix which multiplies all coordinates by 0.5 and offsets them by 0.5. More... | |
static decMatrix | CreateRT (const decVector &rot, const decVector &pos) |
Create rotation-translation matrix. More... | |
static decMatrix | CreateSRT (const decVector &scale, const decVector &rot, const decVector &pos) |
Create scale-rotation-translation matrix. More... | |
static decMatrix | CreateSVUT (const decVector &scale, const decVector &view, const decVector &up, const decVector &pos) |
Create scale-view-up-translation matrix. More... | |
static decMatrix | CreateVU (const decVector &view, const decVector &up) |
Create view-up matrix. More... | |
static decMatrix | CreateFromQuaternion (const decQuaternion &q) |
Create rotation matrix from a quaternion. More... | |
static decMatrix | CreateFromQuaternion (const decQuaternion &q, const decVector &pivot) |
Create rotation matrix from a quaternion. More... | |
Public Attributes | |
Cells | |
The first number indicates the row the second the column. | |
float | a11 |
float | a12 |
float | a13 |
float | a14 |
float | a21 |
float | a22 |
float | a23 |
float | a24 |
float | a31 |
float | a32 |
float | a33 |
float | a34 |
float | a41 |
float | a42 |
float | a43 |
float | a44 |
4x4 Component Matrix. Provides matrix calculation on a 4x4 matrix in row major order. The coordinate system used by axis oriented creation functions is a left handed one. The X axis points to the right, the Y axis points up and the Z axis points into the screen. Rotations are always in counter clockwise orientation. Rotation angles are measured in radians.
decMatrix::decMatrix | ( | ) |
Create new matrix initialized to identity.
decMatrix::decMatrix | ( | const decMatrix & | m | ) |
Create copy of a matrix.
decMatrix::decMatrix | ( | const decDMatrix & | m | ) |
Create copy of a double matrix.
|
static |
Create bias matrix which multiplies all coordinates by 0.5 and offsets them by 0.5.
|
static |
Create new camera space matrix.
A camera space matrix is different from a world space matrix in that it does transform positions from an world coordinate system into a coordinate system where the x axis points right, the y axis up and the z-axis straight into the screen. Best example to understand is a rotation. A world space matrix rotates a vector pointing straight down the z axis into the view vector used to create the matrix. A camera matrix though transforms a vector pointing into the view direction of the camera matrix into a vector pointing straight down the z axis. Hence the camera matrix is kinda the inverse of the world matrix what goes for the final transformation.
pos | Position of camera |
view | View vector of camera not necessary normalized |
up | Up vector of camera not necessary normalized |
|
static |
Create matrix to transform a projection matrix into cliping space.
In cliping space the view frustum turns into a cube.
|
static |
Create rotation matrix from a quaternion.
q | Rotation quaternion |
|
static |
Create rotation matrix from a quaternion.
|
static |
Create new identity matrix.
|
static |
Create orthogonal projection matrix.
left | Left cliping plane position |
right | Right cliping plane position |
top | Top cliping plane position |
bottom | Bottom cliping plane position |
znear | Distance to near cliping plane |
zfar | Distance to far cliping plane |
|
static |
Create projection matrix based on a finite view frustum.
The width and height are used to derive the aspect ratio from.
width | Width of the viewport window |
height | Height of the viewport window |
fov | Vertical field of view of the projection. Indicates the radian angle from the left side of the view frustum to the right side |
fovRatio | Aspect ratio of the horizontal to the vertical field of view. |
znear | Distance to near cliping plane |
zfar | Distance to far cliping plane |
|
static |
Create projection matrix based on a infinite view frustum.
The width and height are used to derive the aspect ratio from.
width | Width of the viewport window |
height | Height of the viewport window |
fov | Vertical field of view of the projection. Indicates the radian angle from the left side of the view frustum to the right side |
fovRatio | Aspect ratio of the horizontal to the vertical field of view. |
znear | Distance to near cliping plane |
Create new rotation around the all three axes matrix.
This matrix is the same as first applying a z axis roation, then an x axis rotation and then an y axis rotation.
|
static |
Create new rotation around the all three axes matrix.
This matrix is the same as first applying a z axis roation, then an x axis rotation and then an y axis rotation.
Create new rotation around an arbitrary axis matrix.
|
static |
Create new rotation around the x axis matrix.
|
static |
Create new rotation around the y axis matrix.
|
static |
Create new rotation around the z axis matrix.
Create rotation-translation matrix.
This is the same as first doing a 3-axis rotation and then a translation.
rot | Rotation vector |
pos | Translation vector |
|
static |
Create new scaling matrix.
|
static |
Create scale-rotation-translation matrix.
This is the same as first doing a scaling, then a 3-axis rotation and then a translation.
scale | Scaling vector |
rot | Rotation vector |
pos | Translation vector |
|
static |
Create scale-view-up-translation matrix.
This is the same as first doing a scaling, then a world space matrix.
scale | Scaling vector |
view | View vector |
up | Up vector |
pos | Translation vector |
Create new translation matrix.
|
static |
Create new translation matrix.
Create view-up matrix.
This is the same as doing a world space matrix but with the zero vector as position.
view | View vector |
up | Up vector |
|
static |
Create new world space matrix.
A world matrix is used to transform coordinates from the coordinate system of one object to another one.
pos | Position of object |
orientation | Orientation |
|
static |
Create world space matrix.
A world matrix is used to transform coordinates from the object local coordinate system to the world coordinate system.
|
static |
Create new world space matrix.
A world matrix is used to transform coordinates from the coordinate system of one object to another one.
pos | Position of object |
view | View vector of object not necessary normalized |
up | Up vector of object not necessary normalized |
float decMatrix::Determinant | ( | ) | const |
Calculates the determinant of the matrix.
decVector decMatrix::GetEulerAngles | ( | ) | const |
Calculate set of euler angles producing this matrix if they are used as rotation vector for creating a rotation matrix.
The calculated angles are not unique and different rotation vectors lead usually to the same matrix. The calculated rotation vector is garanteed to produce the matrix it has been calculated from. Furthermore there exist ambiguous situations where the calculated rotation vector is undefined. You should avoid using this function if you can.
decVector decMatrix::GetPosition | ( | ) | const |
Position of the matrix.
This is the same as transforming the vector ( 0,0,0 ) by this matrix but faster.
decMatrix decMatrix::GetRotationMatrix | ( | ) | const |
Rotation part of the matrix.
The result is a 4x4 identity matrix with the upper left 3x3 copied from this matrix.
decVector decMatrix::GetScale | ( | ) | const |
Scaling of the matrix.
This works only if the matrix is the product of translations, rotations and scaling. The returned scaling is always positive.
decMatrix decMatrix::Invert | ( | ) | const |
Inverse of this matrix if the inverse is possible.
bool decMatrix::IsEqualTo | ( | const decMatrix & | matrix, |
float | threshold = 0.0001 |
||
) | const |
Matrix is cell wise equal to anither one in respect to a threshold.
void decMatrix::Normalize | ( | ) |
Normalize matrix.
Modifies matrix with scaling removed. Only normalized matrices are safe to be used with the GetEulerAngles() and ToQuaternion() calls since scaling interferes with the calculation.
This calls the same as this code
but is safe against 0-scaling. In such a case a 0-rotation matrix is set.
decMatrix decMatrix::Normalized | ( | ) | const |
Normalize matrix.
Returns matrix with scaling removed. Only normalized matrices are safe to be used with the GetEulerAngles() and ToQuaternion() calls since scaling interferes with the calculation.
This calls the same as this code
but is safe against 0-scaling. In such a case a 0-rotation matrix is created.
Retrieves a new matrix with this matrix multiplied with another one.
decVector4 decMatrix::operator* | ( | const decVector4 & | v | ) | const |
Transforms 4 component vector by this matrix.
decMatrix decMatrix::operator* | ( | float | k | ) | const |
Retrieves a new matrix with this matrix scaled by k.
decMatrix& decMatrix::operator*= | ( | float | k | ) |
Multiplies the cells of this matrix with a value k.
Retrieves a new matrix with the sum of this matrix with another one.
Adds the cells of another matrix to this one.
Retrieves a new matrix with the difference of this matrix to another one.
Subtracts the cells of another matrix from this vector.
decMatrix decMatrix::operator/ | ( | float | k | ) | const |
Matrix with this matrix divided by k.
If k is 0 an exception is thrown.
decMatrix& decMatrix::operator/= | ( | float | k | ) |
Divide cells of this matrix by a value k.
If the value k is 0 an exception is thrown.
Set cells of this matrix to the values of another one.
Quick cell wise adds another matrix to this matrix.
float decMatrix::QuickDeterminant | ( | ) | const |
Quick calculates the determinant of this matrix.
decMatrix decMatrix::QuickInvert | ( | ) | const |
Quick calculates the inverse of this matrix.
Quick multiplies this matrix with another one.
decMatrix decMatrix::QuickMultiply | ( | float | k | ) | const |
Quick multiplies this matrix with a value k.
Quick multiplies this matrix rotation part with another one.
void decMatrix::SetBiasMatrix | ( | ) |
Set bias matrix which multiplies all coordinates by 0.5 and offsets them by 0.5.
Set camera space matrix.
A camera space matrix is different from a world space matrix in that it does transform positions from an world coordinate system into a coordinate system where the x axis points right, the y axis up and the z-axis straight into the screen. Best example to understand is a rotation. A world space matrix rotates a vector pointing straight down the z axis into the view vector used to create the matrix. A camera matrix though transforms a vector pointing into the view direction of the camera matrix into a vector pointing straight down the z axis. Hence the camera matrix is kinda the inverse of the world matrix what goes for the final transformation.
pos | Position of camera |
view | View vector of camera not necessary normalized |
up | Up vector of camera not necessary normalized |
void decMatrix::SetClipSpace | ( | ) |
Set matrix to transform a projection matrix into cliping space.
In cliping space the view frustum turns into a cube.
void decMatrix::SetFromQuaternion | ( | const decQuaternion & | q | ) |
Set rotation matrix from a quaternion.
q | Rotation quaternion |
void decMatrix::SetFromQuaternion | ( | const decQuaternion & | q, |
const decVector & | pivot | ||
) |
Set rotation matrix from a quaternion.
void decMatrix::SetIdentity | ( | ) |
Sets identity matrix.
void decMatrix::SetOrtho | ( | int | left, |
int | right, | ||
int | top, | ||
int | bottom, | ||
int | znear, | ||
int | zfar | ||
) |
Set orthogonal projection matrix.
left | Left cliping plane position |
right | Right cliping plane position |
top | Top cliping plane position |
bottom | Bottom cliping plane position |
znear | Distance to near cliping plane |
zfar | Distance to far cliping plane |
void decMatrix::SetProjection | ( | int | width, |
int | height, | ||
float | fov, | ||
float | fovRatio, | ||
float | znear, | ||
float | zfar | ||
) |
Set projection matrix based on a finite view frustum.
The width and height are used to derive the aspect ratio from.
width | Width of the viewport window |
height | Height of the viewport window |
fov | Vertical field of view of the projection. Indicates the radian angle from the left side of the view frustum to the right side |
fovRatio | Aspect ratio of the horizontal to the vertical field of view. |
znear | Distance to near cliping plane |
zfar | Distance to far cliping plane |
void decMatrix::SetProjectionInfinite | ( | int | width, |
int | height, | ||
float | fov, | ||
float | fovRatio, | ||
float | znear | ||
) |
Set projection matrix based on a infinite view frustum.
The width and height are used to derive the aspect ratio from.
width | Width of the viewport window |
height | Height of the viewport window |
fov | Vertical field of view of the projection. Indicates the radian angle from the left side of the view frustum to the right side |
fovRatio | Aspect ratio of the horizontal to the vertical field of view. |
znear | Distance to near cliping plane |
void decMatrix::SetRotation | ( | const decVector & | r | ) |
Set rotation around the all three axes matrix.
This matrix is the same as first applying a z axis roation, then an x axis rotation and then an y axis rotation.
void decMatrix::SetRotation | ( | float | rx, |
float | ry, | ||
float | rz | ||
) |
Set rotation around the all three axes matrix.
This matrix is the same as first applying a z axis roation, then an x axis rotation and then an y axis rotation.
void decMatrix::SetRotationAxis | ( | const decVector & | axis, |
float | angle | ||
) |
Sets rotation around an arbitrary axis matrix.
void decMatrix::SetRotationX | ( | float | arc | ) |
Sets rotation around the x axis matrix.
void decMatrix::SetRotationY | ( | float | arc | ) |
Sets rotation around the y axis matrix.
void decMatrix::SetRotationZ | ( | float | arc | ) |
Sets rotation around the z axis matrix.
Set rotation-translation matrix.
This is the same as first doing a 3-axis rotation and then a translation.
rot | Rotation vector |
pos | Translation vector |
void decMatrix::SetScale | ( | const decVector & | s | ) |
Sets scaling matrix.
void decMatrix::SetScale | ( | float | sx, |
float | sy, | ||
float | sz | ||
) |
Sets scaling matrix.
Set scale-rotation-translation matrix.
This is the same as first doing a scaling, then a 3-axis rotation and then a translation.
scale | Scaling vector |
rot | Rotation vector |
pos | Translation vector |
void decMatrix::SetSVUT | ( | const decVector & | scale, |
const decVector & | view, | ||
const decVector & | up, | ||
const decVector & | pos | ||
) |
Set scale-view-up-translation matrix.
This is the same as first doing a scaling, then a world space matrix.
scale | Scaling vector |
view | View vector |
up | Up vector |
pos | Translation vector |
void decMatrix::SetTranslation | ( | const decVector & | t | ) |
Sets translation matrix.
void decMatrix::SetTranslation | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets translation matrix.
Set view-up matrix.
This is the same as doing a world space matrix but with the zero vector as position.
view | View vector |
up | Up vector |
void decMatrix::SetWorld | ( | const decVector & | pos, |
const decQuaternion & | orientation | ||
) |
Set world space matrix.
A world matrix is used to transform coordinates from the coordinate system of one object to another one.
pos | Position of object |
orientation | Orientation |
void decMatrix::SetWorld | ( | const decVector & | pos, |
const decQuaternion & | orientation, | ||
const decVector & | scale | ||
) |
Set world space matrix.
A world matrix is used to transform coordinates from the object local coordinate system to the world coordinate system.
Set world space matrix.
A world matrix is used to transform coordinates from the coordinate system of one object to another one.
pos | Position of object |
view | View vector of object not necessary normalized |
up | Up vector of object not necessary normalized |
decQuaternion decMatrix::ToQuaternion | ( | ) | const |
Convert matrix into a rotation quaternion.
This conversion is well defined in contrast to the rotation vector function.
void decMatrix::Transform | ( | decVector & | result, |
float | x, | ||
float | y, | ||
float | z | ||
) | const |
Transforma vector.
void decMatrix::Transform | ( | decVector4 & | result, |
float | x, | ||
float | y, | ||
float | z, | ||
float | w | ||
) | const |
Transforma vector.
decVector decMatrix::Transform | ( | float | x, |
float | y, | ||
float | z | ||
) | const |
Transforma vector.
decVector4 decMatrix::Transform | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) | const |
Transforma vector.
Transforms a normal by this matrix.
This is the same as transforming the normal by only the rotation part of it.
decVector decMatrix::TransformRight | ( | ) | const |
Right vector of this matrix.
This is the same as transforing the vector (1,0,0) by this matrix but faster.
decVector decMatrix::TransformUp | ( | ) | const |
Up vector of this matrix.
This is the same as transforing the vector (0,1,0) by this matrix but faster.
decVector decMatrix::TransformView | ( | ) | const |
View vector of this matrix.
This is the same as transforing the vector (0,0,1) by this matrix but faster.
float decMatrix::a11 |
float decMatrix::a12 |
float decMatrix::a13 |
float decMatrix::a14 |
float decMatrix::a21 |
float decMatrix::a22 |
float decMatrix::a23 |
float decMatrix::a24 |
float decMatrix::a31 |
float decMatrix::a32 |
float decMatrix::a33 |
float decMatrix::a34 |
float decMatrix::a41 |
float decMatrix::a42 |
float decMatrix::a43 |
float decMatrix::a44 |