Typedefs | |
typedef float | AtMatrix [4][4] |
4-by-4 matrix | |
Functions | |
AI_API void | AiM4Identity (AtMatrix mout) |
Create an identity matrix. More... | |
AI_API void | AiM4Translation (AtMatrix mout, const AtVector *t) |
Create a translation matrix from a translation vector. More... | |
AI_API void | AiM4RotationX (AtMatrix mout, float x) |
Create a X-axis rotation matrix. More... | |
AI_API void | AiM4RotationY (AtMatrix mout, float y) |
Create a Y-axis rotation matrix. More... | |
AI_API void | AiM4RotationZ (AtMatrix mout, float z) |
Create a Z-axis rotation matrix. More... | |
AI_API void | AiM4Scaling (AtMatrix mout, const AtVector *s) |
Create a scaling matrix from a scaling vector. More... | |
AI_API void | AiM4Frame (AtMatrix mout, const AtVector *o, const AtVector *u, const AtVector *v, const AtVector *w) |
Create a matrix that transforms into a new coordinate frame. More... | |
AI_API void | AiM4PointByMatrixMult (AtPoint *pout, const AtMatrix m, const AtPoint *pin) |
Left-multiply a point by a matrix. More... | |
AI_API void | AiM4HPointByMatrixMult (AtHPoint *pout, const AtMatrix m, const AtHPoint *pin) |
Left-multiply a 4D point by a matrix. More... | |
AI_API void | AiM4VectorByMatrixMult (AtVector *vout, const AtMatrix m, const AtVector *vin) |
Left-multiply a vector by a matrix. More... | |
AI_API void | AiM4VectorByMatrixTMult (AtVector *vout, const AtMatrix m, const AtVector *vin) |
Right-multiply a vector by a matrix. More... | |
AI_API void | AiM4Mult (AtMatrix mout, const AtMatrix ma, const AtMatrix mb) |
Multiply two matrices. More... | |
AI_API void | AiM4Copy (AtMatrix dest, const AtMatrix src) |
Copy a matrix. More... | |
AI_API void | AiM4Transpose (const AtMatrix min, AtMatrix mout) |
Calculate the transpose of a matrix. More... | |
AI_API void | AiM4Invert (const AtMatrix min, AtMatrix mout) |
Calculate the inverse of a matrix. More... | |
AI_API float | AiM4Determinant (const AtMatrix m) |
Determinant of a matrix. More... | |
AI_API void | AiM4Lerp (AtMatrix mout, float t, const AtMatrix ma, const AtMatrix mb) |
Linear interpolation of two matrices. More... | |
AI_API void | AiM4Berp (float bu, float bv, const AtMatrix m0, const AtMatrix m1, const AtMatrix m2, AtMatrix mout) |
Perform barycentric interpolation on the three incoming matrices. More... | |
AI_API bool | AiM4IsIdentity (const AtMatrix m) |
Is this an identity matrix? More... | |
AI_API bool | AiM4IsSingular (const AtMatrix m) |
Is this a singular matrix? More... | |
Variables | |
AI_API AtMatrix | AI_M4_IDENTITY |
AI_API AtMatrix | AI_M4_ZERO |
AI_API void AiM4Identity | ( | AtMatrix | mout | ) |
Create an identity matrix.
[out] | mout | identity matrix result |
Create a translation matrix from a translation vector.
[out] | mout | matrix result |
t | translation vector |
AI_API void AiM4RotationX | ( | AtMatrix | mout, |
float | x | ||
) |
Create a X-axis rotation matrix.
[out] | mout | matrix result |
x | angle from the X axis (in degrees) |
AI_API void AiM4RotationY | ( | AtMatrix | mout, |
float | y | ||
) |
Create a Y-axis rotation matrix.
[out] | mout | matrix result |
y | angle from the Y axis (in degrees) |
AI_API void AiM4RotationZ | ( | AtMatrix | mout, |
float | z | ||
) |
Create a Z-axis rotation matrix.
[out] | mout | matrix result |
z | angle from the Z axis (in degrees) |
Create a scaling matrix from a scaling vector.
[out] | mout | matrix result |
s | scaling vector |
AI_API void AiM4Frame | ( | AtMatrix | mout, |
const AtVector * | o, | ||
const AtVector * | u, | ||
const AtVector * | v, | ||
const AtVector * | w | ||
) |
Create a matrix that transforms into a new coordinate frame.
The new coordinate frame is formed from an origin and a set of orthonormal vectors {U,V,W}, all expressed in world coordinates.
[out] | mout | matrix result |
o | origin vector | |
u | U basis vector | |
v | V basis vector | |
w | W basis vector |
Left-multiply a point by a matrix.
[out] | pout | multiplied point pout = m pin |
m | input matrix | |
pin | input point |
Left-multiply a 4D point by a matrix.
[out] | pout | multiplied 4D point, pout = m pin |
m | input matrix | |
pin | input 4D point |
Left-multiply a vector by a matrix.
Note that multiplying a vector by a matrix is different than multiplying a point by a matrix.
[out] | vout | multiplied vector, vout = m vin |
m | input matrix | |
vin | input vector |
Right-multiply a vector by a matrix.
This is equivalent to left-multiply vector by transpose of a matrix: vout = (m^T) vin
[out] | vout | multiplied vector, vout = vin m |
m | input matrix | |
vin | input vector |
Multiply two matrices.
[out] | mout | multiplied matrix result, mout = ma mb |
ma | input matrix | |
mb | input matrix |
Copy a matrix.
[out] | dest | destination matrix |
src | source matrix |
Calculate the transpose of a matrix.
min | input matrix | |
[out] | mout | transpose matrix: mout = min^T |
Calculate the inverse of a matrix.
min | input matrix to be inverted | |
[out] | mout | inverted matrix: mout = min^-1 |
AI_API float AiM4Determinant | ( | const AtMatrix | m | ) |
Determinant of a matrix.
m | input matrix |
Linear interpolation of two matrices.
[out] | mout | interpolated matrix: mout = (1-t)*ma + t*mb |
t | interpolation parameter, in [0,1] | |
ma | input matrix at t=0 | |
mb | input matrix at t=1 |
AI_API void AiM4Berp | ( | float | bu, |
float | bv, | ||
const AtMatrix | m0, | ||
const AtMatrix | m1, | ||
const AtMatrix | m2, | ||
AtMatrix | mout | ||
) |
Perform barycentric interpolation on the three incoming matrices.
bu | U barycentric coordinate | |
bv | V barycentric coordinate | |
m0 | matrix at barycentric coords (0,0) | |
m1 | matrix at barycentric coords (1,0) | |
m2 | matrix at barycentric coords (0,1) | |
[out] | mout | interpolated matrix at (bu,bv) |
AI_API bool AiM4IsIdentity | ( | const AtMatrix | m | ) |
Is this an identity matrix?
m | input matrix |
AI_API bool AiM4IsSingular | ( | const AtMatrix | m | ) |
Is this a singular matrix?
m | input matrix |