All Classes |Grouped Classes |Index

Class CL_Mat4

4D matrix More...

Derived from:

None

Derived by:

None

Group:

Math (Core)

#include <ClanLib/core.h>

Class Members:

Construction:

CL_Mat4

Constructs a 4x4 matrix (null)

null

Create a zero matrix.

identity

Create the identity matrix.

frustum

Create a frustum matrix.

perspective

Create a perspective matrix.

ortho

Create a ortho matrix.

ortho_2d

Create a ortho_2d matrix.

rotate

Create a rotation matrix.

scale

Create a scale matrix.

translate

Create a translation matrix.

look_at

Create the "look at; mat; matrix.

multiply

Multiply 2 matrices.

add

Add 2 matrices.

subtract

Subtract 2 matrices.

adjoint

Calculate the adjoint (or known as Adjugate or Conjugate Transpose) of a matrix.

inverse

Calculate the matrix inverse of a matrix.

transpose

Calculate the transpose of a matrix.


Attributes:

matrix

The matrix (in column-major format)

get_origin_x

Returns the x coordinate for the point (0,0,0) multiplied with this matrix.

get_origin_y

Returns the y coordinate for the point (0,0,0) multiplied with this matrix.

get_origin_z

Returns the z coordinate for the point (0,0,0) multiplied with this matrix.

get_euler

Extract the euler angles (in radians) from a matrix (in column-major format)

get_transformed_point

Get a transformed point from the matrix (in column-major format)


Operations:

multiply

Multiply this matrix and a specified matrix.

add

Add this matrix and a specified matrix.

subtract

Subtract this matrix and a specified matrix.

scale_self

Scale this matrix.

translate_self

Translate this matrix.

det

Calculate the matrix determinant of this matrix.

adjoint

Calculate the adjoint (or known as adjugate) of this matrix.

inverse

Calculate the matrix inverse of this matrix.

transpose

Calculate the transpose of this matrix.


Operators:

operator Type const *

Operator that returns the matrix as a array.

operator Type *

Operator that returns the matrix as a array.

operator[]

Operator that returns the matrix cell at the given index.

operator*

Multiplication operator.

operator+

Addition operator.

operator-

Subtraction operator.

operator==

Equality operator.

operator!=

Not-equal operator.

Detailed description:

These matrix templates are defined for: int (CL_Mat4i), float (CL_Mat4f), double (CL_Mat4d)