openTRI 0.1
|
Data Structures | |
union | triMat3 |
3D (3x3) Matrix More... | |
union | triMat4 |
4D (4x4) Matrix More... |
Typedefs | |
typedef union triMat3 | triMat3 |
3D (3x3) Matrix | |
typedef union triMat3 | triMat3f |
typedef union triMat4 | triMat4 |
4D (4x4) Matrix | |
typedef union triMat4 | triMat4f |
Functions | |
triMat4f * | triMat4Identity (triMat4f *a) |
Make a matrix identity. | |
triMat4f * | triMat4Zero (triMat4f *a) |
Make a matrix zero. | |
triMat4f * | triMat4Copy (triMat4f *a, const triMat4f *b) |
Copy a matrix. | |
triMat4f * | triMat4Mul (triMat4f *a, const triMat4f *b, const triMat4f *c) |
Matrix multiply (a = b*c). | |
triMat4f * | triMat4Inv (triMat4f *a, const triMat4f *b) |
Invert a matrix. | |
triMat4f * | triMat4Trans (triMat4f *a, const triMat4f *b) |
Transpose a matrix. | |
triFloat | triMat4Det (const triMat4f *a) |
Calculate matrix determinant. | |
triFloat | triMat4Trace (const triMat4f *a) |
Calculate matrix trace. | |
triVec4f * | triMat4Apply (triVec4f *a, const triMat4f *b, const triVec4f *c) |
4x4 Matrix-Vector multiply (a = b*c). | |
triVec4f * | triMat4Apply3 (triVec4f *a, const triMat4f *b, const triVec4f *c) |
3x3 Matrix-Vector multiply (a = b*c). |
Make a matrix identity.
Matrix will contain the following after call:
| 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 |
a | - Pointer to destination matrix |
Make a matrix zero.
Matrix will contain the following after call:
| 0.0 0.0 0.0 0.0 |
| 0.0 0.0 0.0 0.0 |
| 0.0 0.0 0.0 0.0 |
| 0.0 0.0 0.0 0.0 |
a | - Pointer to destination matrix |
Copy a matrix.
a | - Pointer to destination matrix |
b | - Pointer to matrix to be copied |
Matrix multiply (a = b*c).
a | - Pointer to destination matrix |
b | - Pointer to first input matrix |
c | - Pointer to second input matrix |
Invert a matrix.
Full Inverse. For orthogonal matrices, triMat4Trans does the same.
a | - Pointer to destination matrix |
b | - Pointer to matrix to be inverted |
Transpose a matrix.
a | - Pointer to destination matrix |
b | - Pointer to matrix to be transposed |
triFloat triMat4Det | ( | const triMat4f * | a | ) |
Calculate matrix determinant.
a | - Pointer to source matrix |
triFloat triMat4Trace | ( | const triMat4f * | a | ) |
Calculate matrix trace.
a | - Pointer to source matrix |
4x4 Matrix-Vector multiply (a = b*c).
a | - Pointer to dest vector |
b | - Pointer to source matrix |
c | - Pointer to source vector |
3x3 Matrix-Vector multiply (a = b*c).
Vectors are treated as 3D Vectors and the matrix as 3D matrix. This is useful if you only want to rotate a vector by the 4x4 Matrix (no translation).
a | - Pointer to dest vector |
b | - Pointer to source matrix |
c | - Pointer to source vector |