GLUS
Functions
glus_matrix.c File Reference
#include "GL/glus.h"

Functions

GLUSvoid GLUSAPIENTRY glusMatrix4x4Identityf (GLUSfloat matrix[16])
 Sets the given 4x4 matrix to an identity matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Identityf (GLUSfloat matrix[9])
 Sets the given 3x3 matrix to an identity matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Identityf (GLUSfloat matrix[4])
 Sets the given 2x2 matrix to an identity matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Initf (GLUSfloat matrix[16], const GLUSfloat column0[4], const GLUSfloat column1[4], const GLUSfloat column2[4], const GLUSfloat column3[4])
 Initializes the given 4x4 matrix with the provided column vectors. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Initf (GLUSfloat matrix[9], const GLUSfloat column0[3], const GLUSfloat column1[3], const GLUSfloat column2[3])
 Initializes the given 3x3 matrix with the provided column vectors. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Initf (GLUSfloat matrix[4], const GLUSfloat column0[2], const GLUSfloat column1[2])
 Initializes the given 2x2 matrix with the provided column vectors. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Copyf (GLUSfloat matrix[16], const GLUSfloat source[16], const GLUSboolean rotationOnly)
 Copies a 4x4 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Copyf (GLUSfloat matrix[9], const GLUSfloat source[9], const GLUSboolean rotationOnly)
 Copies a 3x3 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Copyf (GLUSfloat matrix[4], const GLUSfloat source[4])
 Copies a 3x3 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4ExtractMatrix3x3f (GLUSfloat matrix[9], const GLUSfloat source[16])
 Extracts a 3x3 matrix out of a 4x4 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4ExtractMatrix2x2f (GLUSfloat matrix[4], const GLUSfloat source[16])
 Extracts a 2x2 matrix out of a 4x4 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3ExtractMatrix2x2f (GLUSfloat matrix[4], const GLUSfloat source[9])
 Extracts a 2x2 matrix out of a 3x3 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3CreateMatrix4x4f (GLUSfloat matrix[16], const GLUSfloat source[9])
 Creates a 4x4 matrix out of a 3x3 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2CreateMatrix4x4f (GLUSfloat matrix[16], const GLUSfloat source[4])
 Creates a 4x4 matrix out of a 2x2 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2CreateMatrix3x3f (GLUSfloat matrix[9], const GLUSfloat source[4])
 Creates a 3x3 matrix out of a 2x2 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Addf (GLUSfloat matrix[16], const GLUSfloat matrix0[16], const GLUSfloat matrix1[16])
 Adds two 4x4 matrices: matrix0 + matrix1. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Addf (GLUSfloat matrix[9], const GLUSfloat matrix0[9], const GLUSfloat matrix1[9])
 Adds two 3x3 matrices: matrix0 + matrix1. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Addf (GLUSfloat matrix[4], const GLUSfloat matrix0[4], const GLUSfloat matrix1[4])
 Adds two 2x2 matrices: matrix0 + matrix1. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Subtractf (GLUSfloat matrix[16], const GLUSfloat matrix0[16], const GLUSfloat matrix1[16])
 Subtracts two 4x4 matrices: matrix0 - matrix1. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Subtractf (GLUSfloat matrix[9], const GLUSfloat matrix0[9], const GLUSfloat matrix1[9])
 Subtracts two 3x3 matrices: matrix0 - matrix1. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Subtractf (GLUSfloat matrix[4], const GLUSfloat matrix0[4], const GLUSfloat matrix1[4])
 Subtracts two 2x2 matrices: matrix0 - matrix1. More...
 
GLUSfloat GLUSAPIENTRY glusMatrix4x4Determinantf (const GLUSfloat matrix[16])
 Calculates the determinant of a 4x4 matrix. More...
 
GLUSfloat GLUSAPIENTRY glusMatrix3x3Determinantf (const GLUSfloat matrix[9])
 Calculates the determinant of a 3x3 matrix. More...
 
GLUSfloat GLUSAPIENTRY glusMatrix2x2Determinantf (const GLUSfloat matrix[4])
 Calculates the determinant of a 2x2 matrix. More...
 
GLUSboolean GLUSAPIENTRY glusMatrix4x4Inversef (GLUSfloat matrix[16])
 Calculates the inverse of a 4x4 matrix using Gaussian Elimination. More...
 
GLUSboolean GLUSAPIENTRY glusMatrix3x3Inversef (GLUSfloat matrix[9])
 Calculates the inverse of a 3x3 matrix using the determinant and adjunct of a matrix. More...
 
GLUSboolean GLUSAPIENTRY glusMatrix2x2Inversef (GLUSfloat matrix[4])
 Calculates the inverse of a 2x2 matrix using the determinant and adjunct of a matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4InverseRigidBodyf (GLUSfloat matrix[16])
 Calculates the inverse of a 4x4 matrix by assuming it is a rigid body matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3InverseRigidBodyf (GLUSfloat matrix[9], const GLUSboolean is2D)
 Calculates the inverse of a 3x3 matrix by assuming it is a rigid body matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2InverseRigidBodyf (GLUSfloat matrix[4])
 Calculates the inverse of a 2x2 matrix by assuming it is a rigid body matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Transposef (GLUSfloat matrix[16])
 Transposes a 4x4 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Transposef (GLUSfloat matrix[9])
 Transposes a 3x3 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Transposef (GLUSfloat matrix[4])
 Transposes a 2x2 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Translatef (GLUSfloat matrix[16], const GLUSfloat x, const GLUSfloat y, const GLUSfloat z)
 Creates a 4x4 translation matrix and multiplies it with the provided one: matrix = matrix * translateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Translatef (GLUSfloat matrix[9], const GLUSfloat x, const GLUSfloat y)
 Creates a 3x3 translation matrix and multiplies it with the provided one: matrix = matrix * translateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Rotatef (GLUSfloat matrix[16], const GLUSfloat angle, const GLUSfloat x, const GLUSfloat y, const GLUSfloat z)
 Creates a 4x4 matrix for rotation around a given axis and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Rotatef (GLUSfloat matrix[9], const GLUSfloat angle, const GLUSfloat x, const GLUSfloat y, const GLUSfloat z)
 Creates a 3x3 matrix for rotation around a given axis and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Rotatef (GLUSfloat matrix[4], const GLUSfloat angle)
 Creates a 2x2 matrix for a rotation around in 2D and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRxf (GLUSfloat matrix[16], const GLUSfloat angle)
 Creates a 4x4 matrix for rotation around the x axis and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRxf (GLUSfloat matrix[9], const GLUSfloat angle)
 Creates a 3x3 matrix for rotation around the x axis and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRyf (GLUSfloat matrix[16], const GLUSfloat angle)
 Creates a 4x4 matrix for rotation around the y axis and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRyf (GLUSfloat matrix[9], const GLUSfloat angle)
 Creates a 3x3 matrix for rotation around the y axis and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRzf (GLUSfloat matrix[16], const GLUSfloat angle)
 Creates a 4x4 matrix for rotation around the z axis and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRzf (GLUSfloat matrix[9], const GLUSfloat angle)
 Creates a 3x3 matrix for rotation around the z axis and multiplies it with the given one: matrix = matrix * rotateMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRzRxRyf (GLUSfloat matrix[16], const GLUSfloat anglez, const GLUSfloat anglex, const GLUSfloat angley)
 Creates a 4x4 matrix for rotation using Euler angles and multiplies it with the given one: matrix = matrix * Rz * Rx * Ry. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRzRyRxf (GLUSfloat matrix[16], const GLUSfloat anglez, const GLUSfloat angley, const GLUSfloat anglex)
 Creates a 4x4 matrix for rotation using Euler angles and multiplies it with the given one: matrix = matrix * Rz * Ry * Rx. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRzRxRyf (GLUSfloat matrix[9], const GLUSfloat anglez, const GLUSfloat anglex, const GLUSfloat angley)
 Creates a 3x3 matrix for rotation using Euler angles and multiplies it with the given one: matrix = matrix * Rz * Rx * Ry. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRzRyRxf (GLUSfloat matrix[9], const GLUSfloat anglez, const GLUSfloat angley, const GLUSfloat anglex)
 Creates a 3x3 matrix for rotation using Euler angles and multiplies it with the given one: matrix = matrix * Rz * Ry * Rx. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Scalef (GLUSfloat matrix[16], const GLUSfloat x, const GLUSfloat y, const GLUSfloat z)
 Creates a 4x4 matrix for scaling and multiplies it with the given one: matrix = matrix * scaleMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Scalef (GLUSfloat matrix[9], const GLUSfloat x, const GLUSfloat y, const GLUSfloat z)
 Creates a 3x3 matrix for scaling and multiplies it with the given one: matrix = matrix * scaleMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Scalef (GLUSfloat matrix[4], const GLUSfloat x, const GLUSfloat y)
 Creates a 2x2 matrix for scaling and multiplies it with the given one: matrix = matrix * scaleMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4Shearf (GLUSfloat matrix[16], const GLUSfloat shxy, const GLUSfloat shxz, const GLUSfloat shyx, const GLUSfloat shyz, const GLUSfloat shzx, const GLUSfloat shzy)
 Creates a 4x4 matrix for shearing and multiplies it with the given one: matrix = matrix * shearMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3Shearf (GLUSfloat matrix[9], const GLUSfloat shxy, const GLUSfloat shxz, const GLUSfloat shyx, const GLUSfloat shyz, const GLUSfloat shzx, const GLUSfloat shzy)
 Creates a 3x3 matrix for shearing and multiplies it with the given one: matrix = matrix * shearMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2Shearf (GLUSfloat matrix[4], const GLUSfloat shx, const GLUSfloat shy)
 Creates a 2x2 matrix for shearing and multiplies it with the given one: matrix = matrix * shearMatrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4MultiplyVector3f (GLUSfloat result[3], const GLUSfloat matrix[16], const GLUSfloat vector[3])
 Multiplies a 4x4 matrix with a 3D Vector. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4MultiplyVector2f (GLUSfloat result[2], const GLUSfloat matrix[16], const GLUSfloat vector[2])
 Multiplies a 4x4 matrix with a 2D Vector. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3MultiplyVector3f (GLUSfloat result[3], const GLUSfloat matrix[9], const GLUSfloat vector[3])
 Multiplies a 3x3 matrix with a 3D Vector. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3MultiplyVector2f (GLUSfloat result[2], const GLUSfloat matrix[9], const GLUSfloat vector[2])
 Multiplies a 3x3 matrix with a 2D Vector. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2MultiplyVector2f (GLUSfloat result[2], const GLUSfloat matrix[4], const GLUSfloat vector[2])
 Multiplies a 2x2 matrix with a 2D Vector. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4MultiplyPoint4f (GLUSfloat result[4], const GLUSfloat matrix[16], const GLUSfloat point[4])
 Multiplies a 4x4 matrix with a 3D Point, given as homogeneous coordinates. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3MultiplyPoint3f (GLUSfloat result[3], const GLUSfloat matrix[9], const GLUSfloat point[3])
 Multiplies a 3x3 matrix with a 2D Point, given as homogeneous coordinates. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4MultiplyPlanef (GLUSfloat result[4], const GLUSfloat matrix[16], const GLUSfloat plane[4])
 Multiplies a 4x4 matrix with a plane. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4GetEulerRzRxRyf (GLUSfloat angles[3], const GLUSfloat matrix[16])
 Extracts the Euler angles from a 4x4 matrix, which was created by a Rz * Rx * Ry transformation. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4GetEulerRzRyRxf (GLUSfloat angles[3], const GLUSfloat matrix[16])
 Extracts the Euler angles from a 4x4 matrix, which was created by a Rz * Ry * Rz transformation. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetEulerRzRxRyf (GLUSfloat angles[3], const GLUSfloat matrix[9])
 Extracts the Euler angles from a 3x3 matrix, which was created by a Rz * Rx * Ry transformation. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetEulerRzRyRxf (GLUSfloat angles[3], const GLUSfloat matrix[9])
 Extracts the Euler angles from a 3x3 matrix, which was created by a Rz * Ry * Rx transformation. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetAnglef (GLUSfloat *angle, const GLUSfloat matrix[9])
 Extracts the angle from a 3x3 matrix, which is used in 2D. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2GetAnglef (GLUSfloat *angle, const GLUSfloat matrix[4])
 Extracts the angle from a 2x2 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4GetScalef (GLUSfloat scales[3], const GLUSfloat matrix[16])
 Extracts the scales from a 4x4 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetScalef (GLUSfloat scales[3], const GLUSfloat matrix[9])
 Extracts the scales from a 3x3 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix2x2GetScalef (GLUSfloat scales[2], const GLUSfloat matrix[4])
 Extracts the scales from a 2x2 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix4x4GetTranslatef (GLUSfloat translates[3], const GLUSfloat matrix[16])
 Extracts the translates from a 4x4 matrix. More...
 
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetTranslatef (GLUSfloat translates[2], const GLUSfloat matrix[9])
 Extracts the translates from a 3x3 matrix, which is used for 2D. More...
 
GLUSboolean GLUSAPIENTRY glusMatrixNxNMultiplyVectorNc (GLUScomplex *result, const GLUScomplex *matrix, const GLUScomplex *vector, const GLUSint n)
 Multiplies a NxN matrix with a Vector with N elements. More...
 

Function Documentation

GLUSvoid GLUSAPIENTRY glusMatrix2x2Addf ( GLUSfloat  matrix[4],
const GLUSfloat  matrix0[4],
const GLUSfloat  matrix1[4] 
)

Adds two 2x2 matrices: matrix0 + matrix1.

Parameters
matrixThe resulting matrix.
matrix0The first matrix.
matrix1The second matrix.
GLUSvoid GLUSAPIENTRY glusMatrix2x2Copyf ( GLUSfloat  matrix[4],
const GLUSfloat  source[4] 
)

Copies a 3x3 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
GLUSvoid GLUSAPIENTRY glusMatrix2x2CreateMatrix3x3f ( GLUSfloat  matrix[9],
const GLUSfloat  source[4] 
)

Creates a 3x3 matrix out of a 2x2 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
GLUSvoid GLUSAPIENTRY glusMatrix2x2CreateMatrix4x4f ( GLUSfloat  matrix[16],
const GLUSfloat  source[4] 
)

Creates a 4x4 matrix out of a 2x2 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
GLUSfloat GLUSAPIENTRY glusMatrix2x2Determinantf ( const GLUSfloat  matrix[4])

Calculates the determinant of a 2x2 matrix.

Parameters
matrixThe used matrix.
Returns
The calculated determinant.
GLUSvoid GLUSAPIENTRY glusMatrix2x2GetAnglef ( GLUSfloat angle,
const GLUSfloat  matrix[4] 
)

Extracts the angle from a 2x2 matrix.

Parameters
angleResulting angle in degrees.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix2x2GetScalef ( GLUSfloat  scales[2],
const GLUSfloat  matrix[4] 
)

Extracts the scales from a 2x2 matrix.

Parameters
scalesResulting sx, sy.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix2x2Identityf ( GLUSfloat  matrix[4])

Sets the given 2x2 matrix to an identity matrix.

Parameters
matrixThe matrix, which is set to the identity matrix.
GLUSvoid GLUSAPIENTRY glusMatrix2x2Initf ( GLUSfloat  matrix[4],
const GLUSfloat  column0[2],
const GLUSfloat  column1[2] 
)

Initializes the given 2x2 matrix with the provided column vectors.

Parameters
matrixThe matrix, which is initalized with the given column vectors.
column0The first column of the matrix.
column1The second column of the matrix.
GLUSboolean GLUSAPIENTRY glusMatrix2x2Inversef ( GLUSfloat  matrix[4])

Calculates the inverse of a 2x2 matrix using the determinant and adjunct of a matrix.

Parameters
matrixThe matrix to be inverted.
Returns
GLUS_TRUE, if creation succeeded.
GLUSvoid GLUSAPIENTRY glusMatrix2x2InverseRigidBodyf ( GLUSfloat  matrix[4])

Calculates the inverse of a 2x2 matrix by assuming it is a rigid body matrix.

Parameters
matrixThe matrix to be inverted.
GLUSvoid GLUSAPIENTRY glusMatrix2x2MultiplyVector2f ( GLUSfloat  result[2],
const GLUSfloat  matrix[4],
const GLUSfloat  vector[2] 
)

Multiplies a 2x2 matrix with a 2D Vector.

Parameters
resultThe transformed vector.
matrixThe matrix used for the transformation.
vectorThe used vector for the transformation.
GLUSvoid GLUSAPIENTRY glusMatrix2x2Rotatef ( GLUSfloat  matrix[4],
const GLUSfloat  angle 
)

Creates a 2x2 matrix for a rotation around in 2D and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
GLUSvoid GLUSAPIENTRY glusMatrix2x2Scalef ( GLUSfloat  matrix[4],
const GLUSfloat  x,
const GLUSfloat  y 
)

Creates a 2x2 matrix for scaling and multiplies it with the given one: matrix = matrix * scaleMatrix.

Parameters
matrixThe final matrix.
xThe value to scale in the x axis.
yThe value to scale in the y axis.
GLUSvoid GLUSAPIENTRY glusMatrix2x2Shearf ( GLUSfloat  matrix[4],
const GLUSfloat  shx,
const GLUSfloat  shy 
)

Creates a 2x2 matrix for shearing and multiplies it with the given one: matrix = matrix * shearMatrix.

Parameters
matrixThe final matrix.
shxValue for shearing in x direction.
shyValue for shearing in y direction.
GLUSvoid GLUSAPIENTRY glusMatrix2x2Subtractf ( GLUSfloat  matrix[4],
const GLUSfloat  matrix0[4],
const GLUSfloat  matrix1[4] 
)

Subtracts two 2x2 matrices: matrix0 - matrix1.

Parameters
matrixThe resulting matrix.
matrix0The first matrix.
matrix1The second matrix.
GLUSvoid GLUSAPIENTRY glusMatrix2x2Transposef ( GLUSfloat  matrix[4])

Transposes a 2x2 matrix.

Parameters
matrixThe matrix to be transposed.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Addf ( GLUSfloat  matrix[9],
const GLUSfloat  matrix0[9],
const GLUSfloat  matrix1[9] 
)

Adds two 3x3 matrices: matrix0 + matrix1.

Parameters
matrixThe resulting matrix.
matrix0The first matrix.
matrix1The second matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Copyf ( GLUSfloat  matrix[9],
const GLUSfloat  source[9],
const GLUSboolean  rotationOnly 
)

Copies a 3x3 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
rotationOnlyIf GLUS_TRUE, only the 2x2 Matrix is copied into an identity 3x3 matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3CreateMatrix4x4f ( GLUSfloat  matrix[16],
const GLUSfloat  source[9] 
)

Creates a 4x4 matrix out of a 3x3 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
GLUSfloat GLUSAPIENTRY glusMatrix3x3Determinantf ( const GLUSfloat  matrix[9])

Calculates the determinant of a 3x3 matrix.

Parameters
matrixThe used matrix.
Returns
The calculated determinant.
GLUSvoid GLUSAPIENTRY glusMatrix3x3ExtractMatrix2x2f ( GLUSfloat  matrix[4],
const GLUSfloat  source[9] 
)

Extracts a 2x2 matrix out of a 3x3 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetAnglef ( GLUSfloat angle,
const GLUSfloat  matrix[9] 
)

Extracts the angle from a 3x3 matrix, which is used in 2D.

Parameters
angleResulting angle in degrees.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetEulerRzRxRyf ( GLUSfloat  angles[3],
const GLUSfloat  matrix[9] 
)

Extracts the Euler angles from a 3x3 matrix, which was created by a Rz * Rx * Ry transformation.

Parameters
anglesResulting anglex (Pitch), angley (Yaw) and anglez (Roll) in degrees.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetEulerRzRyRxf ( GLUSfloat  angles[3],
const GLUSfloat  matrix[9] 
)

Extracts the Euler angles from a 3x3 matrix, which was created by a Rz * Ry * Rx transformation.

Parameters
anglesResulting anglex (Pitch), angley (Yaw) and anglez (Roll) in degrees.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetScalef ( GLUSfloat  scales[3],
const GLUSfloat  matrix[9] 
)

Extracts the scales from a 3x3 matrix.

Parameters
scalesResulting sx, sy, sz.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3GetTranslatef ( GLUSfloat  translates[2],
const GLUSfloat  matrix[9] 
)

Extracts the translates from a 3x3 matrix, which is used for 2D.

Parameters
translatesResulting x and y.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Identityf ( GLUSfloat  matrix[9])

Sets the given 3x3 matrix to an identity matrix.

Parameters
matrixThe matrix, which is set to the identity matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Initf ( GLUSfloat  matrix[9],
const GLUSfloat  column0[3],
const GLUSfloat  column1[3],
const GLUSfloat  column2[3] 
)

Initializes the given 3x3 matrix with the provided column vectors.

Parameters
matrixThe matrix, which is initalized with the given column vectors.
column0The first column of the matrix.
column1The second column of the matrix.
column2The third column of the matrix.
GLUSboolean GLUSAPIENTRY glusMatrix3x3Inversef ( GLUSfloat  matrix[9])

Calculates the inverse of a 3x3 matrix using the determinant and adjunct of a matrix.

Parameters
matrixThe matrix to be inverted.
Returns
GLUS_TRUE, if creation succeeded.
GLUSvoid GLUSAPIENTRY glusMatrix3x3InverseRigidBodyf ( GLUSfloat  matrix[9],
const GLUSboolean  is2D 
)

Calculates the inverse of a 3x3 matrix by assuming it is a rigid body matrix.

Parameters
matrixThe matrix to be inverted.
is2DSet to GLUS_TRUE, if this matrix should be treated as a 2D matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3MultiplyPoint3f ( GLUSfloat  result[3],
const GLUSfloat  matrix[9],
const GLUSfloat  point[3] 
)

Multiplies a 3x3 matrix with a 2D Point, given as homogeneous coordinates.

Parameters
resultThe transformed point.
matrixThe matrix used for the transformation.
pointThe used point for the transformation.
GLUSvoid GLUSAPIENTRY glusMatrix3x3MultiplyVector2f ( GLUSfloat  result[2],
const GLUSfloat  matrix[9],
const GLUSfloat  vector[2] 
)

Multiplies a 3x3 matrix with a 2D Vector.

Parameters
resultThe transformed vector.
matrixThe matrix used for the transformation.
vectorThe used vector for the transformation.
GLUSvoid GLUSAPIENTRY glusMatrix3x3MultiplyVector3f ( GLUSfloat  result[3],
const GLUSfloat  matrix[9],
const GLUSfloat  vector[3] 
)

Multiplies a 3x3 matrix with a 3D Vector.

Parameters
resultThe transformed vector.
matrixThe matrix used for the transformation.
vectorThe used vector for the transformation.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Rotatef ( GLUSfloat  matrix[9],
const GLUSfloat  angle,
const GLUSfloat  x,
const GLUSfloat  y,
const GLUSfloat  z 
)

Creates a 3x3 matrix for rotation around a given axis and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
xX coordinate of axis.
yY coordinate of axis.
zZ coordinate of axis.
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRxf ( GLUSfloat  matrix[9],
const GLUSfloat  angle 
)

Creates a 3x3 matrix for rotation around the x axis and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRyf ( GLUSfloat  matrix[9],
const GLUSfloat  angle 
)

Creates a 3x3 matrix for rotation around the y axis and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRzf ( GLUSfloat  matrix[9],
const GLUSfloat  angle 
)

Creates a 3x3 matrix for rotation around the z axis and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRzRxRyf ( GLUSfloat  matrix[9],
const GLUSfloat  anglez,
const GLUSfloat  anglex,
const GLUSfloat  angley 
)

Creates a 3x3 matrix for rotation using Euler angles and multiplies it with the given one: matrix = matrix * Rz * Rx * Ry.

Parameters
matrixThe final matrix.
anglezThe rotation angle for the z axis in degree.
anglexThe rotation angle for the x axis in degree.
angleyThe rotation angle for the y axis in degree.
GLUSvoid GLUSAPIENTRY glusMatrix3x3RotateRzRyRxf ( GLUSfloat  matrix[9],
const GLUSfloat  anglez,
const GLUSfloat  angley,
const GLUSfloat  anglex 
)

Creates a 3x3 matrix for rotation using Euler angles and multiplies it with the given one: matrix = matrix * Rz * Ry * Rx.

Parameters
matrixThe final matrix.
anglezThe rotation angle for the z axis in degree.
angleyThe rotation angle for the y axis in degree.
anglexThe rotation angle for the x axis in degree.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Scalef ( GLUSfloat  matrix[9],
const GLUSfloat  x,
const GLUSfloat  y,
const GLUSfloat  z 
)

Creates a 3x3 matrix for scaling and multiplies it with the given one: matrix = matrix * scaleMatrix.

Parameters
matrixThe final matrix.
xThe value to scale in the x axis.
yThe value to scale in the y axis.
zThe value to scale in the z axis.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Shearf ( GLUSfloat  matrix[9],
const GLUSfloat  shxy,
const GLUSfloat  shxz,
const GLUSfloat  shyx,
const GLUSfloat  shyz,
const GLUSfloat  shzx,
const GLUSfloat  shzy 
)

Creates a 3x3 matrix for shearing and multiplies it with the given one: matrix = matrix * shearMatrix.

Parameters
matrixThe final matrix.
shxyValue for shearing x in y direction.
shxzValue for shearing x in z direction.
shyxValue for shearing y in x direction.
shyzValue for shearing y in z direction.
shzxValue for shearing z in x direction.
shzyValue for shearing z in y direction.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Subtractf ( GLUSfloat  matrix[9],
const GLUSfloat  matrix0[9],
const GLUSfloat  matrix1[9] 
)

Subtracts two 3x3 matrices: matrix0 - matrix1.

Parameters
matrixThe resulting matrix.
matrix0The first matrix.
matrix1The second matrix.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Translatef ( GLUSfloat  matrix[9],
const GLUSfloat  x,
const GLUSfloat  y 
)

Creates a 3x3 translation matrix and multiplies it with the provided one: matrix = matrix * translateMatrix.

Parameters
matrixThe final matrix.
xAmount to translate in x direction.
yAmount to translate in y direction.
GLUSvoid GLUSAPIENTRY glusMatrix3x3Transposef ( GLUSfloat  matrix[9])

Transposes a 3x3 matrix.

Parameters
matrixThe matrix to be transposed.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Addf ( GLUSfloat  matrix[16],
const GLUSfloat  matrix0[16],
const GLUSfloat  matrix1[16] 
)

Adds two 4x4 matrices: matrix0 + matrix1.

Parameters
matrixThe resulting matrix.
matrix0The first matrix.
matrix1The second matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Copyf ( GLUSfloat  matrix[16],
const GLUSfloat  source[16],
const GLUSboolean  rotationOnly 
)

Copies a 4x4 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
rotationOnlyIf GLUS_TRUE, only the 3x3 Matrix is copied into an identity 4x4 matrix.
GLUSfloat GLUSAPIENTRY glusMatrix4x4Determinantf ( const GLUSfloat  matrix[16])

Calculates the determinant of a 4x4 matrix.

Parameters
matrixThe used matrix.
Returns
The calculated determinant.
GLUSvoid GLUSAPIENTRY glusMatrix4x4ExtractMatrix2x2f ( GLUSfloat  matrix[4],
const GLUSfloat  source[16] 
)

Extracts a 2x2 matrix out of a 4x4 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4ExtractMatrix3x3f ( GLUSfloat  matrix[9],
const GLUSfloat  source[16] 
)

Extracts a 3x3 matrix out of a 4x4 matrix.

Parameters
matrixThe destination matrix.
sourceThe source matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4GetEulerRzRxRyf ( GLUSfloat  angles[3],
const GLUSfloat  matrix[16] 
)

Extracts the Euler angles from a 4x4 matrix, which was created by a Rz * Rx * Ry transformation.

Parameters
anglesResulting anglex (Pitch), angley (Yaw) and anglez (Roll) in degrees.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4GetEulerRzRyRxf ( GLUSfloat  angles[3],
const GLUSfloat  matrix[16] 
)

Extracts the Euler angles from a 4x4 matrix, which was created by a Rz * Ry * Rz transformation.

Parameters
anglesResulting anglex (Pitch), angley (Yaw) and anglez (Roll) in degrees.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4GetScalef ( GLUSfloat  scales[3],
const GLUSfloat  matrix[16] 
)

Extracts the scales from a 4x4 matrix.

Parameters
scalesResulting sx, sy, sz.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4GetTranslatef ( GLUSfloat  translates[3],
const GLUSfloat  matrix[16] 
)

Extracts the translates from a 4x4 matrix.

Parameters
translatesResulting x, y and z.
matrixThe used matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Identityf ( GLUSfloat  matrix[16])

Sets the given 4x4 matrix to an identity matrix.

Parameters
matrixThe matrix, which is set to the identity matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Initf ( GLUSfloat  matrix[16],
const GLUSfloat  column0[4],
const GLUSfloat  column1[4],
const GLUSfloat  column2[4],
const GLUSfloat  column3[4] 
)

Initializes the given 4x4 matrix with the provided column vectors.

Parameters
matrixThe matrix, which is initalized with the given column vectors.
column0The first column of the matrix.
column1The second column of the matrix.
column2The third column of the matrix.
column3The fourth column of the matrix.
GLUSboolean GLUSAPIENTRY glusMatrix4x4Inversef ( GLUSfloat  matrix[16])

Calculates the inverse of a 4x4 matrix using Gaussian Elimination.

Parameters
matrixThe matrix to be inverted.
Returns
GLUS_TRUE, if creation succeeded.
GLUSvoid GLUSAPIENTRY glusMatrix4x4InverseRigidBodyf ( GLUSfloat  matrix[16])

Calculates the inverse of a 4x4 matrix by assuming it is a rigid body matrix.

Parameters
matrixThe matrix to be inverted.
GLUSvoid GLUSAPIENTRY glusMatrix4x4MultiplyPlanef ( GLUSfloat  result[4],
const GLUSfloat  matrix[16],
const GLUSfloat  plane[4] 
)

Multiplies a 4x4 matrix with a plane.

Parameters
resultThe transformed plaen.
matrixThe matrix used for the transformation.
planeThe used plane for the transformation.
GLUSvoid GLUSAPIENTRY glusMatrix4x4MultiplyPoint4f ( GLUSfloat  result[4],
const GLUSfloat  matrix[16],
const GLUSfloat  point[4] 
)

Multiplies a 4x4 matrix with a 3D Point, given as homogeneous coordinates.

Parameters
resultThe transformed point.
matrixThe matrix used for the transformation.
pointThe used point for the transformation.
GLUSvoid GLUSAPIENTRY glusMatrix4x4MultiplyVector2f ( GLUSfloat  result[2],
const GLUSfloat  matrix[16],
const GLUSfloat  vector[2] 
)

Multiplies a 4x4 matrix with a 2D Vector.

Parameters
resultThe transformed vector.
matrixThe matrix used for the transformation.
vectorThe used vector for the transformation.
GLUSvoid GLUSAPIENTRY glusMatrix4x4MultiplyVector3f ( GLUSfloat  result[3],
const GLUSfloat  matrix[16],
const GLUSfloat  vector[3] 
)

Multiplies a 4x4 matrix with a 3D Vector.

Parameters
resultThe transformed vector.
matrixThe matrix used for the transformation.
vectorThe used vector for the transformation.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Rotatef ( GLUSfloat  matrix[16],
const GLUSfloat  angle,
const GLUSfloat  x,
const GLUSfloat  y,
const GLUSfloat  z 
)

Creates a 4x4 matrix for rotation around a given axis and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
xX coordinate of axis.
yY coordinate of axis.
zZ coordinate of axis.
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRxf ( GLUSfloat  matrix[16],
const GLUSfloat  angle 
)

Creates a 4x4 matrix for rotation around the x axis and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRyf ( GLUSfloat  matrix[16],
const GLUSfloat  angle 
)

Creates a 4x4 matrix for rotation around the y axis and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRzf ( GLUSfloat  matrix[16],
const GLUSfloat  angle 
)

Creates a 4x4 matrix for rotation around the z axis and multiplies it with the given one: matrix = matrix * rotateMatrix.

Parameters
matrixThe final matrix.
angleThe rotation angle in degree.
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRzRxRyf ( GLUSfloat  matrix[16],
const GLUSfloat  anglez,
const GLUSfloat  anglex,
const GLUSfloat  angley 
)

Creates a 4x4 matrix for rotation using Euler angles and multiplies it with the given one: matrix = matrix * Rz * Rx * Ry.

Parameters
matrixThe final matrix.
anglezThe rotation angle for the z axis in degree.
anglexThe rotation angle for the x axis in degree.
angleyThe rotation angle for the y axis in degree.
GLUSvoid GLUSAPIENTRY glusMatrix4x4RotateRzRyRxf ( GLUSfloat  matrix[16],
const GLUSfloat  anglez,
const GLUSfloat  angley,
const GLUSfloat  anglex 
)

Creates a 4x4 matrix for rotation using Euler angles and multiplies it with the given one: matrix = matrix * Rz * Ry * Rx.

Parameters
matrixThe final matrix.
anglezThe rotation angle for the z axis in degree.
angleyThe rotation angle for the y axis in degree.
anglexThe rotation angle for the x axis in degree.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Scalef ( GLUSfloat  matrix[16],
const GLUSfloat  x,
const GLUSfloat  y,
const GLUSfloat  z 
)

Creates a 4x4 matrix for scaling and multiplies it with the given one: matrix = matrix * scaleMatrix.

Parameters
matrixThe final matrix.
xThe value to scale in the x axis.
yThe value to scale in the y axis.
zThe value to scale in the z axis.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Shearf ( GLUSfloat  matrix[16],
const GLUSfloat  shxy,
const GLUSfloat  shxz,
const GLUSfloat  shyx,
const GLUSfloat  shyz,
const GLUSfloat  shzx,
const GLUSfloat  shzy 
)

Creates a 4x4 matrix for shearing and multiplies it with the given one: matrix = matrix * shearMatrix.

Parameters
matrixThe final matrix.
shxyValue for shearing x in y direction.
shxzValue for shearing x in z direction.
shyxValue for shearing y in x direction.
shyzValue for shearing y in z direction.
shzxValue for shearing z in x direction.
shzyValue for shearing z in y direction.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Subtractf ( GLUSfloat  matrix[16],
const GLUSfloat  matrix0[16],
const GLUSfloat  matrix1[16] 
)

Subtracts two 4x4 matrices: matrix0 - matrix1.

Parameters
matrixThe resulting matrix.
matrix0The first matrix.
matrix1The second matrix.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Translatef ( GLUSfloat  matrix[16],
const GLUSfloat  x,
const GLUSfloat  y,
const GLUSfloat  z 
)

Creates a 4x4 translation matrix and multiplies it with the provided one: matrix = matrix * translateMatrix.

Parameters
matrixThe final matrix.
xAmount to translate in x direction.
yAmount to translate in y direction.
zAmount to translate in z direction.
GLUSvoid GLUSAPIENTRY glusMatrix4x4Transposef ( GLUSfloat  matrix[16])

Transposes a 4x4 matrix.

Parameters
matrixThe matrix to be transposed.
GLUSboolean GLUSAPIENTRY glusMatrixNxNMultiplyVectorNc ( GLUScomplex result,
const GLUScomplex matrix,
const GLUScomplex vector,
const GLUSint  n 
)

Multiplies a NxN matrix with a Vector with N elements.

Parameters
resultThe transformed vector.
matrixThe matrix used for the transformation.
vectorThe used vector for the transformation.
nThe number of elements.
Returns
GLUS_TRUE, if succeeded.