Matrix4x4f class

From Solid Graphics Wiki

(Redirected from Matrix)
Jump to: navigation, search
Matrix4x4f class
Namespace: SKL3D
Base type: (None)
Include: Skl3D.h
Lib (Release): SKL.lib
Lib (Debug): SKL_D.lib

The Matrix4x4f class is representation of 4x4 matrix of float values. The class is used mainly for rotational, translating or scaling transformation of points and types derived or using the Point class, such as PointList class or Shape class. Single Matrix4x4f object's values can represent all the operations at once - translation, and rotation and scaling. In fact, multiple rotations, translations and scaling operations can be represented by single 4x4 matrix instance.


Constructors

Default Matrix4x4f class constructor does not initialize the matrix fields to any value. This is on purpose for performance reasons. Use Initialize method to set the matrix values into the "identity matrix" state.

Default copy constructor can be used to copy one Matrix4x4f object to another.

Fields

Field name Type Description
value float[ 16 ] Array of sixteen matrix's float values.

Methods

Method name Description
Initialize Initializes the matrix to the "identity matrix" values. Identity matrix is an matrix which when it is used to transform a point coordinates the transformation will not modify the point coordinates.
RotateXYZ Modifies matrix by adding rotation first around X, then Y, and then Z axis.
RotateZYX Modifies matrix by adding rotation first around Z, then Y, and then X axis.
RotateYXZ Modifies matrix by adding rotation first around Y, then X, and then Z axis.
RotateZXY Modifies matrix by adding rotation first around Z, then X, and then Y axis.
InverseRotateXYZ Modifies the matrix values by adding rotation inverse to the RotateXYZ method.
InverseRotateZYX Modifies the matrix values by adding rotation inverse to the RotateZYX method.
InverseRotateYXZ Modifies the matrix values by adding rotation inverse to the RotateYXZ method.
InverseRotateZXY Modifies the matrix values by adding rotation inverse to the RotateZXY method.
GetRotationAnglesXYZ Retrieves X, Y, Z angle values (in degrees) of XYZ rotation which the current matrix's value field values represent.
GetRotationAnglesZYX Retrieves Z, Y, X angle values (in degrees) of XYZ rotation which the current matrix's value field values represent.
GetRotationAnglesYXZ Retrieves Y, X, Z angle values (in degrees) of XYZ rotation which the current matrix's value field values represent.
GetRotationAnglesZXY Retrieves Z, X, Y angle values (in degrees) of XYZ rotation which the current matrix's value field values represent.
Translate Adds translation to the matrix values using specified translation vector.
Scale Scales matrix values by given factor.
Transpose Transposes the matrix values.

Operators

= Assigns another Matrix4x4f, Matrix3x3d, or Matrix4x4f or Matrix4x4d to the matrix instance
const float* Returns const pointer to the nine matrix's float values.
float* Returns pointer to the nine matrix's float values.
*= Multiplies the matrix with other Matrix4x4f instance.
* Multiplies the matrix with other Matrix4x4f instance. The matrix's instance values are not modified by this operation, the result of multiplication is returned as new matrix object.

See Also

   


SolidKit Library Documentation

Personal tools