#include <matrix.h>
Public Member Functions | |
f_inline | Matrix () |
do nothing constructor, the matrix values are undefined for performance reasons | |
f_inline | Matrix (float *newMatrix) |
copy constructs the matrix from newMatrix, a pointer to a float array | |
f_inline | Matrix (const Matrix &newMatrix) |
copy constructs the matrix from newMatrix, a reference to another Matrix | |
f_inline | Matrix (Matrix *newMatrix) |
copy constructs the matrix from newMatrix, a pointer to another Matrix | |
f_inline | Matrix (float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) |
constructs the matrix from 16 float values | |
f_inline void | Identity () |
sets up the identity matrix | |
f_inline void | RotationX (float inAngle) |
sets up a X-rotation matrix with inAngle degrees | |
f_inline void | RotationY (float inAngle) |
sets up a Y-rotation matrix with inAngle degrees | |
f_inline void | RotationZ (float inAngle) |
sets up a Z-rotation matrix with inAngle degrees | |
f_inline void | Translation (const Vector3f &inVector) |
sets up a translation matrix with inVector | |
f_inline void | Scale (const Vector3f &inVector) |
sets up a scaling matrix with inVector | |
void | LookAt (const Vector3f &inEye, const Vector3f &inDirection, const Vector3f &inUp) |
sets up a rotation matrix, looking from inEye in inDirection, with inUp pointing up | |
void | Dump () const |
print the matrix to stdout for debugging purposes | |
f_inline void | Set (float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) |
sets up the matrix from 16 float values | |
f_inline const Matrix & | RotateX (float inAngle) |
rotate the matrix around the axis X with inAngle radians | |
f_inline const Matrix & | RotateY (float inAngle) |
Rotate the matrix around the axis Y with inAngle radians. | |
f_inline const Matrix & | RotateZ (float inAngle) |
Rotate the matrix around the axis Z with inAngle radians. | |
f_inline const Matrix & | Translate (const Vector3f &inVector) |
Translate the matrix by vector inVector. | |
f_inline const Vector3f & | Right () const |
returns a const reference to the right vector of the matrix | |
f_inline Vector3f & | Right () |
returns a reference to the right vector of the matrix | |
f_inline const Vector3f & | Up () const |
returns a const reference to the up vector of the matrix | |
f_inline Vector3f & | Up () |
returns a reference to the up vector of the matrix | |
f_inline const Vector3f & | Forward () const |
returns a const reference to the forward vector of the matrix | |
f_inline Vector3f & | Forward () |
returns a reference to the forward vector of the matrix | |
f_inline const Vector3f & | Pos () const |
returns a const reference to the pos vector of the matrix | |
f_inline Vector3f & | Pos () |
returns a reference to the pos vector of the matrix | |
bool | IsEqual (const Matrix &matrix) const |
returns true if this matrix is equal to <matrix> | |
f_inline void | InvertRotationMatrix () |
inverts a matrix, spezialized for rotation matrices only | |
f_inline Vector3f | Transform (const Vector3f &inVector) const |
multiplies the matrix with inVector | |
f_inline Vector3f | Rotate (const Vector3f &inVector) const |
rotates the matrix by inVector | |
f_inline Vector3f | InverseRotate (const Vector3f &inVector) const |
inverse rotates the matrix by inVector | |
void | CalcAttenuationNoRotation (const Vector3f &pos, float radius) |
sets up an attenuation matrix without rotation | |
void | CalcAttenuationWithRotation (const Matrix &lightWorldMatrix, float radius) |
sets up an attenuation matrix with rotation | |
void | CalcInfiniteProjection (float width, float height, float fov, float zNear) |
sets up an infinite projection matrix | |
void | CalcInfiniteFrustum (float left, float right, float bottom, float top, float zNear) |
sets up an infinite frustum | |
void | CalcSpotLight (const Matrix &lightWorldTransform, float fov, float width, float height, float zNear) |
sets up a special lighting matrix for a spotlight | |
f_inline const Matrix | operator * (const Matrix &inRHS) const |
multiplies the matrix with another matrix | |
f_inline const Matrix & | operator *= (const Matrix &inRHS) |
multiplies the matrix with another Matrix | |
f_inline const Vector3f | operator * (const Vector3f &inRHS) const |
Multipies the matrix with a 3 dimensional vector. | |
f_inline const Vector3f | operator * (const Vector2f &inRHS) const |
multiplies the matrix with a 2 dimensional vector | |
f_inline float & | operator() (int inRow, int inColumn) |
returns a reference to a single element of the matrix | |
f_inline const float & | operator() (int inRow, int inColumn) const |
returns a const reference to a single element of the matrix | |
Static Public Member Functions | |
static float * | GetIdentity () |
returns a pointer to a float array describing an identity matrix | |
Public Attributes | |
float | m [16] |
the values of the matrix | |
Protected Member Functions | |
f_inline float & | El (int inRow, int inColumn) |
returns a reference to a single element of the matrix | |
f_inline const float & | El (int inRow, int inColumn) const |
returns a const reference to a single element of the matrix | |
Static Private Attributes | |
static float | mIdentity [16] |
the identity matrix |
Definition at line 42 of file matrix.h.
|
do nothing constructor, the matrix values are undefined for performance reasons
|
|
copy constructs the matrix from newMatrix, a pointer to a float array
|
|
copy constructs the matrix from newMatrix, a reference to another Matrix
Definition at line 55 of file matrix.h. References m. |
|
copy constructs the matrix from newMatrix, a pointer to another Matrix
Definition at line 58 of file matrix.h. References m. |
|
constructs the matrix from 16 float values
Definition at line 202 of file matrix.h. References m. |
|
sets up an attenuation matrix without rotation Calculate an attenuation matrix. pos = world space position of light radius = radius of light (used for distance attenuation) Definition at line 66 of file matrix.cpp. References Identity(), and Translation(). Here is the call graph for this function: ![]() |
|
sets up an attenuation matrix with rotation
Definition at line 87 of file matrix.cpp. References Identity(), InvertRotationMatrix(), and Translation(). Here is the call graph for this function: ![]() |
|
sets up an infinite frustum
Definition at line 117 of file matrix.cpp. References El(), and Identity(). Referenced by oxygen::Camera::Bind(), and CalcInfiniteProjection(). Here is the call graph for this function: ![]() |
|
sets up an infinite projection matrix
Definition at line 109 of file matrix.cpp. References CalcInfiniteFrustum(), and salt::gDegToRad(). Referenced by CalcSpotLight(). Here is the call graph for this function: ![]() |
|
sets up a special lighting matrix for a spotlight
Definition at line 137 of file matrix.cpp. References CalcInfiniteProjection(), Identity(), InvertRotationMatrix(), Scale(), scale(), and Translation(). Here is the call graph for this function: ![]() |
|
print the matrix to stdout for debugging purposes
Definition at line 35 of file matrix.cpp. References m. |
|
returns a const reference to a single element of the matrix
|
|
returns a reference to a single element of the matrix
Definition at line 192 of file matrix.h. Referenced by CalcInfiniteFrustum(), InvertRotationMatrix(), operator *(), RotateX(), RotateY(), RotateZ(), RotationX(), RotationY(), RotationZ(), Scale(), Translate(), and Translation(). |
|
returns a reference to the forward vector of the matrix
|
|
returns a const reference to the forward vector of the matrix
|
|
returns a pointer to a float array describing an identity matrix
|
|
sets up the identity matrix
Definition at line 67 of file matrix.h. Referenced by CalcAttenuationNoRotation(), CalcAttenuationWithRotation(), CalcInfiniteFrustum(), CalcSpotLight(), oxygen::Camera::Camera(), RotationX(), RotationY(), RotationZ(), Scale(), salt::Frustum::Set(), oxygen::Transform::Transform(), and Translation(). |
|
inverse rotates the matrix by inVector
Definition at line 407 of file matrix.h. References m, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
inverts a matrix, spezialized for rotation matrices only
Definition at line 376 of file matrix.h. References El(), salt::gSwap(), Pos(), and Rotate(). Referenced by oxygen::Camera::Bind(), CalcAttenuationWithRotation(), CalcSpotLight(), oxygen::BaseNode::GetLocalPos(), and salt::Frustum::Set(). Here is the call graph for this function: ![]() |
|
returns true if this matrix is equal to <matrix>
Definition at line 159 of file matrix.cpp. References m. |
|
sets up a rotation matrix, looking from inEye in inDirection, with inUp pointing up
Definition at line 44 of file matrix.cpp. References salt::TVector3< DATATYPE, TYPE >::Cross(), salt::TVector< DATATYPE, ELEMENTS, TYPE >::Normalize(), salt::TVector< DATATYPE, ELEMENTS, TYPE >::Normalized(), Pos(), Rotate(), Set(), salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
multiplies the matrix with a 2 dimensional vector
Definition at line 438 of file matrix.h. References m, salt::TVector2< DATATYPE, TYPE >::x(), and salt::TVector2< DATATYPE, TYPE >::y(). Here is the call graph for this function: ![]() |
|
Multipies the matrix with a 3 dimensional vector.
Definition at line 428 of file matrix.h. References m, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
multiplies the matrix with another matrix
Definition at line 416 of file matrix.h. References El(). Here is the call graph for this function: ![]() |
|
multiplies the matrix with another Matrix
|
|
returns a const reference to a single element of the matrix
|
|
returns a reference to a single element of the matrix
|
|
returns a reference to the pos vector of the matrix
|
|
returns a const reference to the pos vector of the matrix
Definition at line 132 of file matrix.h. Referenced by oxygen::Camera::DescribeFrustum(), InvertRotationMatrix(), LookAt(), oxygen::Body::OnLink(), kerosin::Light::Prepare(), oxygen::Transform::SetLocalPos(), and oxygen::Transform::SetLocalRotation(). |
|
returns a reference to the right vector of the matrix
|
|
returns a const reference to the right vector of the matrix
Definition at line 114 of file matrix.h. Referenced by oxygen::FPSController::PrePhysicsUpdateInternal(). |
|
rotates the matrix by inVector
Definition at line 398 of file matrix.h. References m, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Referenced by InvertRotationMatrix(), and LookAt(). Here is the call graph for this function: ![]() |
|
rotate the matrix around the axis X with inAngle radians
Definition at line 280 of file matrix.h. References El(), salt::gCos(), and salt::gSin(). Referenced by oxygen::Camera::Bind(), and oxygen::FPSController::PrePhysicsUpdateInternal(). Here is the call graph for this function: ![]() |
|
Rotate the matrix around the axis Y with inAngle radians.
Definition at line 308 of file matrix.h. References El(), salt::gCos(), and salt::gSin(). Referenced by oxygen::Transform::SetLocalRotation(). Here is the call graph for this function: ![]() |
|
Rotate the matrix around the axis Z with inAngle radians.
Definition at line 336 of file matrix.h. References El(), salt::gCos(), and salt::gSin(). Referenced by oxygen::Transform::SetLocalRotation(). Here is the call graph for this function: ![]() |
|
sets up a X-rotation matrix with inAngle degrees
Definition at line 213 of file matrix.h. References El(), salt::gCos(), salt::gSin(), and Identity(). Referenced by oxygen::FPSController::PrePhysicsUpdateInternal(), and oxygen::Transform::SetLocalRotation(). Here is the call graph for this function: ![]() |
|
sets up a Y-rotation matrix with inAngle degrees
Definition at line 225 of file matrix.h. References El(), salt::gCos(), salt::gSin(), and Identity(). Here is the call graph for this function: ![]() |
|
sets up a Z-rotation matrix with inAngle degrees
Definition at line 237 of file matrix.h. References El(), salt::gCos(), salt::gSin(), and Identity(). Referenced by oxygen::FPSController::PrePhysicsUpdateInternal(). Here is the call graph for this function: ![]() |
|
sets up a scaling matrix with inVector
Definition at line 258 of file matrix.h. References El(), Identity(), salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Referenced by CalcSpotLight(). Here is the call graph for this function: ![]() |
|
sets up the matrix from 16 float values
Definition at line 267 of file matrix.h. References m. Referenced by LookAt(). |
|
multiplies the matrix with inVector
Definition at line 388 of file matrix.h. References m, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Referenced by oxygen::BaseNode::GetLocalPos(), and salt::AABB3::TransformBy(). Here is the call graph for this function: ![]() |
|
Translate the matrix by vector inVector.
Definition at line 364 of file matrix.h. References El(), m, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
sets up a translation matrix with inVector
Definition at line 249 of file matrix.h. References El(), Identity(), salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Referenced by CalcAttenuationNoRotation(), CalcAttenuationWithRotation(), and CalcSpotLight(). Here is the call graph for this function: ![]() |
|
returns a reference to the up vector of the matrix
|
|
returns a const reference to the up vector of the matrix
Definition at line 120 of file matrix.h. Referenced by oxygen::FPSController::PrePhysicsUpdateInternal(). |
|
the values of the matrix
Definition at line 46 of file matrix.h. Referenced by oxygen::ODEObject::ConvertRotationMatrix(), oxygen::Camera::DescribeFrustum(), Dump(), InverseRotate(), IsEqual(), Matrix(), operator *(), oxygen::Body::PostPhysicsUpdateInternal(), Rotate(), Set(), salt::Frustum::Set(), Transform(), and Translate(). |
|
Initial value: { 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 }
|