Alpha Engine: AEMtx33.h File Reference

AlphaEngine

AEMtx33.h File Reference

Header file for the 3x3 matrix library. More...

Go to the source code of this file.

Classes

struct  AEMtx33
 

Macros

#define AEMtx33RowCol(pMtx, row, col)   (pMtx)->m[(row)][(col)]
 

Typedefs

typedef struct AEMtx33 AEMtx33
 

Functions

void AEMtx33Identity (AEMtx33 *pResult)
 Set pResult to identity matrix. More...
 
void AEMtx33Transpose (AEMtx33 *pResult, AEMtx33 *pMtx)
 Set pResult to the transpose of pMtx. More...
 
f32 AEMtx33Inverse (AEMtx33 *pResult, AEMtx33 *pMtx)
 Set pResult to the inverse of pMtx. More...
 
void AEMtx33InvTranspose (AEMtx33 *pResult, AEMtx33 *pMtx)
 Set pResult to the transpose of the inverse of pMtx. More...
 
void AEMtx33Concat (AEMtx33 *pResult, AEMtx33 *pMtx0, AEMtx33 *pMtx1)
 Set pResult to the multiplication of pMtx0 with pMtx1. More...
 
void AEMtx33Orthogonalize (AEMtx33 *pResult, AEMtx33 *pMtx)
 Set pResult to the orthogonalization of pMtx. More...
 
f32 AEMtx33Determinant (AEMtx33 *pMtx)
 Calculate the determinant of pMtx. More...
 
void AEMtx33SetCol (AEMtx33 *pResult, u32 col, AEVec2 *pVec)
 Set the first and second element of the selected column of pResult to the x and y values of pVec respectively. The last element of the column will be set automatically. More...
 
void AEMtx33SetRow (AEMtx33 *pResult, u32 row, AEVec2 *pVec)
 Set the first and second element of the selected row of pResult to the x and y values of pVec respectively. The last element of the row will be set automatically. More...
 
void AEMtx33GetCol (AEVec2 *pResult, AEMtx33 *pMtx, u32 col)
 Set the x and y values of pResult with the first and second element of the selected column of pMtx respectively. More...
 
void AEMtx33GetRow (AEVec2 *pResult, AEMtx33 *pMtx, u32 row)
 
void AEMtx33Trans (AEMtx33 *pResult, f32 x, f32 y)
 Set pResult to the translation matrix of x and y. More...
 
void AEMtx33TransApply (AEMtx33 *pResult, AEMtx33 *pMtx, f32 x, f32 y)
 Set pResult to the multiplication of translation matrix of x and y with pMtx. More...
 
void AEMtx33Scale (AEMtx33 *pResult, f32 x, f32 y)
 Set pResult to the scaling matrix of x and y. More...
 
void AEMtx33ScaleApply (AEMtx33 *pResult, AEMtx33 *pMtx, f32 x, f32 y)
 Set pResult to the multiplication of scaling matrix of x and y with pMtx. More...
 
void AEMtx33Rot (AEMtx33 *pResult, f32 angle)
 Set pResult to the rotation matrix of angle in radians rotating counter-clockwise. More...
 
void AEMtx33RotDeg (AEMtx33 *pResult, f32 angle)
 Set pResult to the rotation matrix of angle in degrees rotating counter-clockwise. More...
 
void AEMtx33MultVec (AEVec2 *pResult, AEMtx33 *pMtx, AEVec2 *pVec)
 Set pResult to the multiplication of pMtx with pVec. More...
 
void AEMtx33MultVecArray (AEVec2 *pResult, AEMtx33 *pMtx, AEVec2 *pVec, u32 count)
 Set an array of vectors (pResult) to the multiplication of pMtx with an array of vectors (pVec) of size (count). More...
 
void AEMtx33MultVecSR (AEVec2 *pResult, AEMtx33 *pMtx, AEVec2 *pVec)
 
void AEMtx33MultVecArraySR (AEVec2 *pResult, AEMtx33 *pMtx, AEVec2 *pVec, u32 count)
 

Detailed Description

Header file for the 3x3 matrix library.

Project: Alpha Engine
Author
Sun Tjen Fam
Date
January 31, 2008
Copyright
Copyright (C) 2013 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited.

Definition in file AEMtx33.h.

Macro Definition Documentation

#define AEMtx33RowCol (   pMtx,
  row,
  col 
)    (pMtx)->m[(row)][(col)]

Definition at line 23 of file AEMtx33.h.

Typedef Documentation

typedef struct AEMtx33 AEMtx33

Matrix is stored in column major format, ie. the translation term is in the right most column.

m[0][0] m[0][1] m[0][2]
m[1][0] m[1][1] m[1][2]
m[2][0] m[2][1] m[2][2]

Function Documentation

void AEMtx33Concat ( AEMtx33 pResult,
AEMtx33 pMtx0,
AEMtx33 pMtx1 
)

Set pResult to the multiplication of pMtx0 with pMtx1.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]pMtx0Pointer to AEMtx33 for input.
[in]pMtx1Pointer to AEMtx33 for input.
Return values
voidNo return.
f32 AEMtx33Determinant ( AEMtx33 pMtx)

Calculate the determinant of pMtx.

Parameters
[in]pMtxPointer to AEMtx33 for input.
Return values
f32Returns the determinant of pMtx.
void AEMtx33GetCol ( AEVec2 pResult,
AEMtx33 pMtx,
u32  col 
)

Set the x and y values of pResult with the first and second element of the selected column of pMtx respectively.

Parameters
[out]pResultPointer to AEVec2 to be set.
[in]pMtxPointer to AEMtx33 for input.
[in]colThe selected column of pResult.
Return values
voidNo return.
void AEMtx33GetRow ( AEVec2 pResult,
AEMtx33 pMtx,
u32  row 
)
void AEMtx33Identity ( AEMtx33 pResult)

Set pResult to identity matrix.

Parameters
[out]pResultPointer to AEMtx33 to be set.
Return values
voidNo return.
f32 AEMtx33Inverse ( AEMtx33 pResult,
AEMtx33 pMtx 
)

Set pResult to the inverse of pMtx.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]pMtxPointer to AEMtx33 for input.
Return values
f32Returns the determinant of pMtx.
void AEMtx33InvTranspose ( AEMtx33 pResult,
AEMtx33 pMtx 
)

Set pResult to the transpose of the inverse of pMtx.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]pMtxPointer to AEMtx33 for input.
Return values
voidNo return.
void AEMtx33MultVec ( AEVec2 pResult,
AEMtx33 pMtx,
AEVec2 pVec 
)

Set pResult to the multiplication of pMtx with pVec.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]pMtxPointer to AEMtx33 for input.
[in]pVecPointer to AEVec2 for input.
Return values
voidNo return.
void AEMtx33MultVecArray ( AEVec2 pResult,
AEMtx33 pMtx,
AEVec2 pVec,
u32  count 
)

Set an array of vectors (pResult) to the multiplication of pMtx with an array of vectors (pVec) of size (count).

Warning
Size of pResult should be not less than count.
Parameters
[out]pResultPointer to an array of AEMtx33 to be set.
[in]pMtxPointer to AEMtx33 for input.
[in]pVecPointer to an array of AEVec2 for input.
[in]countNumber of elements in pVec to be multiplied.
Return values
voidNo return.
void AEMtx33MultVecArraySR ( AEVec2 pResult,
AEMtx33 pMtx,
AEVec2 pVec,
u32  count 
)
void AEMtx33MultVecSR ( AEVec2 pResult,
AEMtx33 pMtx,
AEVec2 pVec 
)
void AEMtx33Orthogonalize ( AEMtx33 pResult,
AEMtx33 pMtx 
)

Set pResult to the orthogonalization of pMtx.

Warning
Function not implemented.
Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]pMtxPointer to AEMtx33 for input.
Return values
voidNo return.
void AEMtx33Rot ( AEMtx33 pResult,
f32  angle 
)

Set pResult to the rotation matrix of angle in radians rotating counter-clockwise.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]angleAngle in radians rotating counter-clockwise.
Return values
voidNo return.
void AEMtx33RotDeg ( AEMtx33 pResult,
f32  angle 
)

Set pResult to the rotation matrix of angle in degrees rotating counter-clockwise.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]angleAngle in degress rotating counter-clockwise.
Return values
voidNo return.
void AEMtx33Scale ( AEMtx33 pResult,
f32  x,
f32  y 
)

Set pResult to the scaling matrix of x and y.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]xScaling along the x-axis.
[in]yScaling along the y-axis.
Return values
voidNo return.
void AEMtx33ScaleApply ( AEMtx33 pResult,
AEMtx33 pMtx,
f32  x,
f32  y 
)

Set pResult to the multiplication of scaling matrix of x and y with pMtx.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]pMtxPointer to AEMtx33 for input.
[in]xScaling along the x-axis.
[in]yScaling along the y-axis.
Return values
voidNo return.
void AEMtx33SetCol ( AEMtx33 pResult,
u32  col,
AEVec2 pVec 
)

Set the first and second element of the selected column of pResult to the x and y values of pVec respectively. The last element of the column will be set automatically.

Parameters
[in,out]pResultPointer to AEMtx33 to be set.
[in]colThe selected column of pResult.
[in]pVecPointer to AEVec2 for input.
Return values
voidNo return.
void AEMtx33SetRow ( AEMtx33 pResult,
u32  row,
AEVec2 pVec 
)

Set the first and second element of the selected row of pResult to the x and y values of pVec respectively. The last element of the row will be set automatically.

Parameters
[in,out]pResultPointer to AEMtx33 to be set.
[in]rowThe selected row of pResult.
[in]pVecPointer to AEVec2 for input.
Return values
voidNo return.
void AEMtx33Trans ( AEMtx33 pResult,
f32  x,
f32  y 
)

Set pResult to the translation matrix of x and y.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]xTranslation along the x-axis.
[in]yTranslation along the y-axis.
Return values
voidNo return.
void AEMtx33TransApply ( AEMtx33 pResult,
AEMtx33 pMtx,
f32  x,
f32  y 
)

Set pResult to the multiplication of translation matrix of x and y with pMtx.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]pMtxPointer to AEMtx33 for input.
[in]xTranslation along the x-axis.
[in]yTranslation along the y-axis.
Return values
voidNo return.
void AEMtx33Transpose ( AEMtx33 pResult,
AEMtx33 pMtx 
)

Set pResult to the transpose of pMtx.

Parameters
[out]pResultPointer to AEMtx33 to be set.
[in]pMtxPointer to AEMtx33 for input.
Return values
voidNo return.
Generated on Sat Jan 4 2014 02:06:22 for Alpha Engine by   doxygen 1.8.5