GLKMatrix3

Overview

The GLKMatrix3 type defines a 3x3 floating-point matrix as well as many mathematical operations commonly used to manipulate matrices. A 3x3 matrix is commonly used in graphics programming to represent scaling or rotation transformations to convert from one coordinate system to another.

The functions that manipulate GLKMatrix3 structures treat the inputs as immutable, instead returning a new matrix that represent the results of the operation.

Topics

Creating Matrices

GLKMatrix3Make

Returns a 3x3 matrix created from individual component values.

GLKMatrix3MakeAndTranspose

Returns a 3x3 transposed matrix created from individual component values.

GLKMatrix3MakeWithArray

Returns a 3x3 matrix created from an array of component values.

GLKMatrix3MakeWithArrayAndTranspose

Returns a 3x3 transposed matrix created from an array of component values.

GLKMatrix3MakeWithColumns

Returns a 3x3 matrix created from three column vectors.

GLKMatrix3MakeWithRows

Returns a 3x3 matrix created from three row vectors.

GLKMatrix3MakeRotation

Returns a 3x3 matrix that performs a rotation around an arbitrary vector.

GLKMatrix3MakeXRotation

Returns a 3x3 matrix that performs a rotation around the positive x-axis.

GLKMatrix3MakeYRotation

Returns a 3x3 matrix that performs a rotation around the positive y-axis.

GLKMatrix3MakeZRotation

Returns a 3x3 matrix that performs a rotation around the positive z-axis.

GLKMatrix3MakeWithQuaternion

Returns a 3x3 matrix that performs a rotation based on a quaternion.

GLKMatrix3MakeScale

Returns a 3x3 matrix that performs a scaling transformation.

Working With Parts of a Matrix

GLKMatrix3GetMatrix2

Returns the upper-left 2x2 section of a 3x3 matrix.

GLKMatrix3GetColumn

Retrieves a column from a 3x3 matrix.

GLKMatrix3GetRow

Retrieves a row from a 3x3 matrix.

GLKMatrix3SetColumn

Returns a new 3x3 matrix with one column replaced by a new vector.

GLKMatrix3SetRow

Returns a new 3x3 matrix with one row replaced by a new vector.

Performing Mathematical Operations on Matrices

GLKMatrix3Invert

Returns the inverse of a matrix.

GLKMatrix3Transpose

Returns the transpose of a matrix.

GLKMatrix3InvertAndTranspose

Returns the inverse transpose of a matrix.

GLKMatrix3Multiply

Returns the product of two matrices.

GLKMatrix3Rotate

Returns a new 3x3 matrix created by concatenating a matrix with a rotation around a vector.

GLKMatrix3RotateWithVector3

Returns a new 3x3 matrix created by concatenating a matrix with a rotation around a vector.

GLKMatrix3RotateWithVector4

Returns a new 3x3 matrix created by concatenating a matrix with a rotation around a vector.

GLKMatrix3RotateX

Returns a new 3x3 matrix created by concatenating a matrix with a rotation around the x-axis.

GLKMatrix3RotateY

Returns a new 3x3 matrix created by concatenating a matrix with a rotation around the y-axis.

GLKMatrix3RotateZ

Returns a new 3x3 matrix created by concatenating a matrix with a rotation around the z-axis.

GLKMatrix3Scale

Returns a new 3x3 matrix created by concatenating a matrix with a scaling transform.

GLKMatrix3ScaleWithVector3

Returns a new 3x3 matrix created by concatenating a matrix with a scaling transform defined by a vector.

GLKMatrix3ScaleWithVector4

Returns a new 3x3 matrix created by concatenating a matrix with a scaling transform defined by a vector.

GLKMatrix3Add

Returns a new 3x3 matrix created by performing a component-wise addition of two matrices.

GLKMatrix3Subtract

Returns a new 3x3 matrix created by performing a component-wise subtraction of two matrices.

Performing Mathematical Operations on Vectors

GLKMatrix3MultiplyVector3

Multiplies a 3x3 matrix by a vector.

GLKMatrix3MultiplyVector3Array

Multiplies a 3x3 matrix by an array of vectors.

Data Types

GLKMatrix2

A 2x2 matrix.

GLKMatrix3

A 3x3 matrix stored in column-major order.

Constants

GLKMatrix3Identity

A 3x3 identity matrix.

See Also

Math Utilties

GLKMatrixStackRef

An opaque type that represents a stack of 4 x 4 matrices, providing support for hierarchical transform modeling and similar tasks.