sgMatrix4x4 Class Reference
#include <sgMatrix4x4.h>
List of all members.
Detailed Description
Matrix class. Stores a 4x4 matrix and provides functionality for it. A matrix is stored as column major!
Constructor & Destructor Documentation
sgMatrix4x4::sgMatrix4x4 |
( |
|
) |
|
Constructor. Initializes a new instance as identity matrix.
Constructor. Initializes a new instance from the given matrix.
- Parameters:
-
| other | the other matrix to copy the values from |
sgMatrix4x4::sgMatrix4x4 |
( |
float * |
other |
) |
|
Constructor. Initializes a new instance from a matrix given by an array.
- Parameters:
-
| other | pointer to the first element of the matrix array (column major!) |
Member Function Documentation
void sgMatrix4x4::makeIdentity |
( |
|
) |
|
Make identity matrix. Sets the matrix to the identity matrix.
void sgMatrix4x4::makeProjectionOrtho |
( |
float |
left, |
|
|
float |
right, |
|
|
float |
bottom, |
|
|
float |
top, |
|
|
float |
clipnear, |
|
|
float |
clipfar | |
|
) |
| | |
Make orthogonal projection matrix. Sets the matrix to the orthogonal projection matrix defined by the parameters.
- Parameters:
-
| left | the left clipping plane |
| right | the right clipping plane |
| bottom | the bottom clipping plane |
| top | the top clipping plane |
| clipnear | the near clipping plane |
| clipfar | the far clipping plane |
void sgMatrix4x4::makeProjectionPersp |
( |
float |
arc, |
|
|
float |
aspect, |
|
|
float |
clipnear, |
|
|
float |
clipfar | |
|
) |
| | |
Make perspective projection matrix. Sets the matrix to the perspective projection matrix defined by the parameters.
- Parameters:
-
| arc | the horizontal opening angle of the camera |
| aspect | the aspect ratio |
| clipnear | the near clipping plane |
| clipfar | the far clipping plane |
Make rotation matrix. Sets the matrix to the rotation defined by the parameter.
- Parameters:
-
| rot | the rotation to create a transformation matrix for as quaternion |
void sgMatrix4x4::makeRotate |
( |
const sgVector3 & |
rot |
) |
|
Make rotation matrix. Sets the matrix to the rotation defined by the parameter.
- Parameters:
-
| rot | the rotation to create a transformation matrix for as euler angles |
void sgMatrix4x4::makeRotate |
( |
const sgVector4 & |
rot |
) |
|
Make rotation matrix. Sets the matrix to the rotation defined by the parameter.
- Parameters:
-
| rot | the rotation to create a transformation matrix for in axis angle format |
void sgMatrix4x4::makeScale |
( |
const sgVector3 & |
scal |
) |
|
Make scale matrix. Sets the matrix to the scaling defined by the parameter.
- Parameters:
-
| scal | the scale to create a transformation matrix for |
void sgMatrix4x4::makeScale |
( |
const sgVector4 & |
scal |
) |
|
Make scale matrix. Sets the matrix to the scaling defined by the parameter.
- Parameters:
-
| scal | the scale to create a transformation matrix for |
void sgMatrix4x4::makeTranslate |
( |
const sgVector3 & |
trans |
) |
|
Make translation matrix. Sets the matrix to the translation defined by the parameter.
- Parameters:
-
| trans | the translation to create a transformation matrix for |
void sgMatrix4x4::makeTranslate |
( |
const sgVector4 & |
trans |
) |
|
Make translation matrix. Sets the matrix to the translation defined by the parameter.
- Parameters:
-
| trans | the translation to create a transformation matrix for |
bool sgMatrix4x4::operator!= |
( |
const sgMatrix4x4 & |
other |
) |
|
Not equal. Checks if two instances do not equal each other.
Multiply. Transforms the vector with the matrix, by multiplying them with the matrix on the left.
Multiply. Transforms the vector with the matrix, by multiplying them with the matrix on the left.
Multiply. Multiply the two matrices.
Multiply. Multiply the two matrices.
Copy. Copy the values from the matrix array (column major!) to the matrix.
Copy. Copy the values of one instance to the other.
bool sgMatrix4x4::operator== |
( |
const sgMatrix4x4 & |
other |
) |
|
Equal. Checks if two instances equal each other.
Rotate the matrix. Applies the rotation given by the parameter to the matrix.
- Parameters:
-
| rot | the translation to apply as quaternion |
void sgMatrix4x4::rotate |
( |
const sgVector3 & |
rot |
) |
|
Rotate the matrix. Applies the rotation given by the parameter to the matrix.
- Parameters:
-
| rot | the translation to apply as euler angles |
void sgMatrix4x4::rotate |
( |
const sgVector4 & |
rot |
) |
|
Rotate the matrix. Applies the rotation given by the parameter to the matrix.
- Parameters:
-
| rot | the translation to apply in axis angle format |
void sgMatrix4x4::scale |
( |
const sgVector3 & |
scal |
) |
|
Scale the matrix. Applies the scaling given by the parameter to the matrix.
- Parameters:
-
| scal | the scaling to apply |
void sgMatrix4x4::scale |
( |
const sgVector4 & |
scal |
) |
|
Scale the matrix. Applies the scaling given by the parameter to the matrix.
- Parameters:
-
| scal | the scaling to apply |
void sgMatrix4x4::set |
( |
float * |
other |
) |
|
Set to array. Copy the values from the given matrix array (column major!) to the matrix.
- Parameters:
-
| other | pointer to first element of the matrix array |
Transform. Transforms a vector with the matrix by multiplying them with the matrix on the left.
- Parameters:
-
| other | the vector to transform |
Transform. Transforms a vector with the matrix by multiplying them with the matrix on the left.
- Parameters:
-
| other | the vector to transform |
void sgMatrix4x4::translate |
( |
const sgVector3 & |
trans |
) |
|
Translate the matrix. Applies the translation given by the parameter to the matrix.
- Parameters:
-
| trans | the translation to apply |
void sgMatrix4x4::translate |
( |
const sgVector4 & |
trans |
) |
|
Translate the matrix. Applies the translation given by the parameter to the matrix.
- Parameters:
-
| trans | the translation to apply |
void sgMatrix4x4::transpose |
( |
|
) |
|
Transpose. Swap columns and rows.
Member Data Documentation
Matrix array. Array of the matrix components as column major.
The documentation for this class was generated from the following files:
- iSDGE/Engine/Common/sgMatrix4x4.h
- iSDGE/Engine/Common/sgMatrix4x4.mm