Castor3D 0.16.0
Multiplatform 3D engine
Functions
castor::matrix Namespace Reference

Matrix basic operations. More...

Functions

template<typename T , typename U >
static Matrix4x4< T > & rotate (Matrix4x4< T > &matrix, QuaternionT< U > const &orientation)
 Rotation function, builds a rotation matrix from the quaternion in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & setRotate (Matrix4x4< T > &matrix, QuaternionT< U > const &orientation)
 Rotation function, builds a rotation matrix from the quaternion in parameter.
 
template<typename T , typename U >
static void getRotate (Matrix4x4< T > const &matrix, QuaternionT< U > &orientation)
 Rotation function, builds a rotation matrix from the quaternion in parameter.
 
template<typename T >
static Matrix4x4< T > & yaw (Matrix4x4< T > &matrix, Angle const &angle)
 Rotation function, around Y axis. Builds a rotation matrix from the angle in parameter.
 
template<typename T >
static Matrix4x4< T > & pitch (Matrix4x4< T > &matrix, Angle const &angle)
 Rotation function, around X axis. Builds a rotation matrix from the angle in parameter.
 
template<typename T >
static Matrix4x4< T > & roll (Matrix4x4< T > &matrix, Angle const &angle)
 Rotation function, around Z axis. Builds a rotation matrix from the angle in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & scale (Matrix4x4< T > &matrix, U x, U y, U z)
 Scale function. Scales matrix from the three values in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & scale (Matrix4x4< T > &matrix, Point3< U > const &scaling)
 Scale function. Scales matrix from the value in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & setScale (Matrix4x4< T > &matrix, U x, U y, U z)
 Scale function. Scales matrix from the three values in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & setScale (Matrix4x4< T > &matrix, Point3< U > const &scaling)
 Scale function. Scales matrix from the value in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & translate (Matrix4x4< T > &matrix, U x, U y, U z)
 Translate function. Translates a matrix from the three values in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & translate (Matrix4x4< T > &matrix, Point3< U > const &translation)
 Translate function. Translates a matrix from the value in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & setTranslate (Matrix4x4< T > &matrix, U x, U y, U z)
 Translate function. Translates a matrix from the three values in parameter.
 
template<typename T , typename U >
static Matrix4x4< T > & setTranslate (Matrix4x4< T > &matrix, Point3< U > const &translation)
 Translate function. Translates a matrix from the value in parameter.
 
template<typename T , typename U , typename V >
static Matrix4x4< T > & setTransform (Matrix4x4< T > &matrix, Point3< U > const &position, Point3< U > const &scaling, QuaternionT< V > const &orientation)
 Retrieves transformation matrix from translation, scaling and rotation.
 
template<typename T , typename U , typename V >
static Matrix4x4< T > & transform (Matrix4x4< T > &matrix, Point3< U > const &position, Point3< U > const &scaling, QuaternionT< V > const &orientation)
 Retrieves transformation matrix from translation, scaling and rotation.
 
template<typename T , typename U >
static Point3< U > getTransformed (Matrix4x4< T > const &matrix, Point3< U > const &value)
 Transforms the position/scale through a transformation matrix.
 
template<typename T , typename U >
static Quaternion getTransformed (Matrix4x4< T > const &matrix, Quaternion const &value)
 Transforms the orientation through a transformation matrix.
 
template<typename T , typename U , typename V >
static void decompose (Matrix4x4< T > const &matrix, Point3< U > &position, Point3< U > &scaling, QuaternionT< V > &rotation)
 Retrieves the given transformation matrix components.
 
template<typename T >
static Matrix4x4< T > reverseDepth (Matrix4x4< T > const &matrix)
 Inverts depth for given projection matrix.
 
template<typename T , typename U >
static Matrix4x4< T > & perspective (Matrix4x4< T > &matrix, Angle const &fovy, U aspect, U zNear, U zFar)
 Builds a matrix that sets a centered perspective projection from the given parameters.
 
template<typename T , typename U >
static Matrix4x4< T > & perspective (Matrix4x4< T > &matrix, Angle const &fovy, U aspect, U zNear)
 Builds a matrix that sets a centered infinite perspective projection from the given parameters.
 
template<typename T >
static Matrix4x4< T > perspective (Angle const &fovy, T aspect, T nearVal, T farVal)
 Builds a matrix that sets a centered perspective projection from the given parameters.
 
template<typename T >
static Matrix4x4< T > perspective (Angle const &fovy, T aspect, T nearVal)
 Builds a matrix that sets a centered infinite perspective projection from the given parameters.
 
template<typename T , typename U >
static Matrix4x4< T > & frustum (Matrix4x4< T > &matrix, U left, U right, U bottom, U top, U nearVal, U farVal)
 Builds a matrix that sets a non centered perspective projection from the given parameters.
 
template<typename T >
static Matrix4x4< T > frustum (T left, T right, T bottom, T top, T nearVal, T farVal)
 Builds a matrix that sets a non centered perspective projection from the given parameters.
 
template<typename T , typename U >
static Matrix4x4< T > & ortho (Matrix4x4< T > &matrix, U left, U right, U bottom, U top, U zNear, U zFar)
 Builds a matrix that sets a non centered orthogonal projection from the given parameters.
 
template<typename T >
static Matrix4x4< T > ortho (T left, T right, T bottom, T top, T zNear, T zFar)
 Builds a matrix that sets a non centered orthogonal projection from the given parameters.
 
template<typename T , typename U >
static Matrix4x4< T > & lookAt (Matrix4x4< T > &matrix, Point3< U > const &eye, Point3< U > const &center, Point3< U > const &up)
 Builds a view matrix that looks at a given point.
 
template<typename T >
static Matrix4x4< T > lookAt (Point3< T > const &eye, Point3< T > const &center, Point3< T > const &up)
 Builds a view matrix that looks at a given point.
 
template<typename T >
static Matrix4x4< T > & switchHand (Matrix4x4< T > &matrix)
 Switches the handness of a matrix (from right to left or left to right)
 
template<typename T >
static Matrix4x4< T > getSwitchHand (Matrix4x4< T > const &matrix)
 Switches the handness of a matrix (from right to left or left to right)
 
template<typename T , typename U >
static Matrix3x3< T > & rotate (Matrix3x3< T > &matrix, Angle orientation)
 Rotation function, builds a rotation matrix from the quaternion in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & setRotate (Matrix3x3< T > &matrix, Angle orientation)
 Rotation function, builds a rotation matrix from the quaternion in parameter.
 
template<typename T , typename U >
static void getRotate (Matrix3x3< T > const &matrix, Angle orientation)
 Rotation function, builds a rotation matrix from the quaternion in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & scale (Matrix3x3< T > &matrix, U x, U y)
 Scale function. Scales matrix from the three values in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & scale (Matrix3x3< T > &matrix, Point2< U > const &scaling)
 Scale function. Scales matrix from the value in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & setScale (Matrix3x3< T > &matrix, U x, U y)
 Scale function. Scales matrix from the three values in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & setScale (Matrix3x3< T > &matrix, Point2< U > const &scaling)
 Scale function. Scales matrix from the value in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & translate (Matrix3x3< T > &matrix, U x, U y)
 Translate function. Translates a matrix from the three values in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & translate (Matrix3x3< T > &matrix, Point2< U > const &translation)
 Translate function. Translates a matrix from the value in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & setTranslate (Matrix3x3< T > &matrix, U x, U y)
 Translate function. Translates a matrix from the three values in parameter.
 
template<typename T , typename U >
static Matrix3x3< T > & setTranslate (Matrix3x3< T > &matrix, Point2< U > const &translation)
 Translate function. Translates a matrix from the value in parameter.
 
template<typename T , typename U , typename V >
static Matrix3x3< T > & setTransform (Matrix3x3< T > &matrix, Point2< U > const &position, Point2< U > const &scaling, Angle orientation)
 Retrieves transformation matrix from translation, scaling and rotation.
 
template<typename T , typename U , typename V >
static Matrix3x3< T > & transform (Matrix3x3< T > &matrix, Point2< U > const &position, Point2< U > const &scaling, Angle orientation)
 Retrieves transformation matrix from translation, scaling and rotation.
 

Detailed Description

Matrix basic operations.

Remarks
Holds rotation, translation, scale, multiplication operations over 4x4 matrix.
Also computes frustum, perspective, ortho, switches left-hand to right-hand and reciprocally

Function Documentation

◆ decompose()

template<typename T , typename U , typename V >
static void castor::matrix::decompose ( Matrix4x4< T > const & matrix,
Point3< U > & position,
Point3< U > & scaling,
QuaternionT< V > & rotation )
static

Retrieves the given transformation matrix components.

Parameters
[in]matrixThe transformation matrix.
[out]positionThe position component.
[out]scalingThe scaling component.
[out]rotationThe rotation component.

◆ frustum() [1/2]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::frustum ( Matrix4x4< T > & matrix,
U left,
U right,
U bottom,
U top,
U nearVal,
U farVal )
static

Builds a matrix that sets a non centered perspective projection from the given parameters.

Parameters
[out]matrixThe matrix that will receive the perspective matrix
[in]leftLeft clipping plane value
[in]rightRight clipping plane value
[in]bottomBottom clipping plane value
[in]topTop clipping plane value
[in]nearValNear clipping plane value
[in]farValFar clipping plane value

◆ frustum() [2/2]

template<typename T >
static Matrix4x4< T > castor::matrix::frustum ( T left,
T right,
T bottom,
T top,
T nearVal,
T farVal )
static

Builds a matrix that sets a non centered perspective projection from the given parameters.

Parameters
[in]leftLeft clipping plane value
[in]rightRight clipping plane value
[in]bottomBottom clipping plane value
[in]topTop clipping plane value
[in]nearValNear clipping plane value
[in]farValFar clipping plane value
Returns
The resulting matrix

◆ getRotate() [1/2]

template<typename T , typename U >
static void castor::matrix::getRotate ( Matrix3x3< T > const & matrix,
Angle orientation )
static

Rotation function, builds a rotation matrix from the quaternion in parameter.

Parameters
[in]matrixThe matrix holding the scale transformation
[out]orientationReceives the rotation

◆ getRotate() [2/2]

template<typename T , typename U >
static void castor::matrix::getRotate ( Matrix4x4< T > const & matrix,
QuaternionT< U > & orientation )
static

Rotation function, builds a rotation matrix from the quaternion in parameter.

Parameters
[in]matrixThe matrix holding the scale transformation
[out]orientationReceives the rotation

◆ getSwitchHand()

template<typename T >
static Matrix4x4< T > castor::matrix::getSwitchHand ( Matrix4x4< T > const & matrix)
static

Switches the handness of a matrix (from right to left or left to right)

Parameters
[in]matrixThe matrix to switch
Returns
The switched matrix

◆ getTransformed() [1/2]

template<typename T , typename U >
static Point3< U > castor::matrix::getTransformed ( Matrix4x4< T > const & matrix,
Point3< U > const & value )
static

Transforms the position/scale through a transformation matrix.

Parameters
[out]matrixThe transformation matrix
[in]valueThe position/scale.
Returns
The transformed position.

◆ getTransformed() [2/2]

template<typename T , typename U >
static Quaternion castor::matrix::getTransformed ( Matrix4x4< T > const & matrix,
Quaternion const & value )
static

Transforms the orientation through a transformation matrix.

Parameters
[out]matrixThe transformation matrix.
[in]valueThe orientation.
Returns
The transformed orientation.

◆ lookAt() [1/2]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::lookAt ( Matrix4x4< T > & matrix,
Point3< U > const & eye,
Point3< U > const & center,
Point3< U > const & up )
static

Builds a view matrix that looks at a given point.

Parameters
[out]matrixThe matrix that will receive the perspective matrix
[in]eyeThe eye position
[in]centerThe point to look at
[in]upThe up direction

◆ lookAt() [2/2]

template<typename T >
static Matrix4x4< T > castor::matrix::lookAt ( Point3< T > const & eye,
Point3< T > const & center,
Point3< T > const & up )
static

Builds a view matrix that looks at a given point.

Parameters
[in]eyeThe eye position
[in]centerThe point to look at
[in]upThe up direction
Returns
The resulting matrix

◆ ortho() [1/2]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::ortho ( Matrix4x4< T > & matrix,
U left,
U right,
U bottom,
U top,
U zNear,
U zFar )
static

Builds a matrix that sets a non centered orthogonal projection from the given parameters.

Parameters
[out]matrixThe matrix that will receive the perspective matrix
[in]leftLeft clipping plane value
[in]rightRight clipping plane value
[in]bottomBottom clipping plane value
[in]topTop clipping plane value
[in]zNearNear clipping plane value
[in]zFarFar clipping plane value

◆ ortho() [2/2]

template<typename T >
static Matrix4x4< T > castor::matrix::ortho ( T left,
T right,
T bottom,
T top,
T zNear,
T zFar )
static

Builds a matrix that sets a non centered orthogonal projection from the given parameters.

Parameters
[in]leftLeft clipping plane value
[in]rightRight clipping plane value
[in]bottomBottom clipping plane value
[in]topTop clipping plane value
[in]zNearNear clipping plane value
[in]zFarFar clipping plane value
Returns
The resulting matrix

◆ perspective() [1/4]

template<typename T >
static Matrix4x4< T > castor::matrix::perspective ( Angle const & fovy,
T aspect,
T nearVal )
static

Builds a matrix that sets a centered infinite perspective projection from the given parameters.

Parameters
[in]fovyY Field of View
[in]aspectWidth / Height ratio
[in]nearValNear clipping plane value
Returns
The resulting matrix

◆ perspective() [2/4]

template<typename T >
static Matrix4x4< T > castor::matrix::perspective ( Angle const & fovy,
T aspect,
T nearVal,
T farVal )
static

Builds a matrix that sets a centered perspective projection from the given parameters.

Parameters
[in]fovyY Field of View
[in]aspectWidth / Height ratio
[in]nearValNear clipping plane value
[in]farValFar clipping plane value
Returns
The resulting matrix

◆ perspective() [3/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::perspective ( Matrix4x4< T > & matrix,
Angle const & fovy,
U aspect,
U zNear )
static

Builds a matrix that sets a centered infinite perspective projection from the given parameters.

Parameters
[out]matrixThe matrix that will receive the perspective matrix
[in]fovyY Field of View
[in]aspectWidth / Height ratio
[in]zNearNear clipping plane value

◆ perspective() [4/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::perspective ( Matrix4x4< T > & matrix,
Angle const & fovy,
U aspect,
U zNear,
U zFar )
static

Builds a matrix that sets a centered perspective projection from the given parameters.

Parameters
[out]matrixThe matrix that will receive the perspective matrix
[in]fovyY Field of View
[in]aspectWidth / Height ratio
[in]zNearNear clipping plane value
[in]zFarFar clipping plane value

◆ pitch()

template<typename T >
static Matrix4x4< T > & castor::matrix::pitch ( Matrix4x4< T > & matrix,
Angle const & angle )
static

Rotation function, around X axis. Builds a rotation matrix from the angle in parameter.

Parameters
[out]matrixThe matrix that will receive the rotation matrix
[in]angleThe rotation angle

◆ reverseDepth()

template<typename T >
static Matrix4x4< T > castor::matrix::reverseDepth ( Matrix4x4< T > const & matrix)
static

Inverts depth for given projection matrix.

Parameters
[in]matrixThe projection matrix.
Returns
The reversed depth projection matrix.

◆ roll()

template<typename T >
static Matrix4x4< T > & castor::matrix::roll ( Matrix4x4< T > & matrix,
Angle const & angle )
static

Rotation function, around Z axis. Builds a rotation matrix from the angle in parameter.

Parameters
[out]matrixThe matrix that will receive the rotation matrix
[in]angleThe rotation angle

◆ rotate() [1/2]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::rotate ( Matrix3x3< T > & matrix,
Angle orientation )
static

Rotation function, builds a rotation matrix from the quaternion in parameter.

Parameters
[out]matrixThe matrix that will receive the rotation matrix
[in]orientationThe quaterion used to compute the matrix

◆ rotate() [2/2]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::rotate ( Matrix4x4< T > & matrix,
QuaternionT< U > const & orientation )
static

Rotation function, builds a rotation matrix from the quaternion in parameter.

Parameters
[out]matrixThe matrix that will receive the rotation matrix
[in]orientationThe quaterion used to compute the matrix

◆ scale() [1/4]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::scale ( Matrix3x3< T > & matrix,
Point2< U > const & scaling )
static

Scale function. Scales matrix from the value in parameter.

Parameters
[out]matrixThe matrix that will be scaled
[in]scalingThe scale value

◆ scale() [2/4]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::scale ( Matrix3x3< T > & matrix,
U x,
U y )
static

Scale function. Scales matrix from the three values in parameter.

Parameters
[out]matrixThe matrix that will be scaled
[in]x,yThe scale values

◆ scale() [3/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::scale ( Matrix4x4< T > & matrix,
Point3< U > const & scaling )
static

Scale function. Scales matrix from the value in parameter.

Parameters
[out]matrixThe matrix that will be scaled
[in]scalingThe scale value

◆ scale() [4/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::scale ( Matrix4x4< T > & matrix,
U x,
U y,
U z )
static

Scale function. Scales matrix from the three values in parameter.

Parameters
[out]matrixThe matrix that will be scaled
[in]x,y,zThe scale values

◆ setRotate() [1/2]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::setRotate ( Matrix3x3< T > & matrix,
Angle orientation )
static

Rotation function, builds a rotation matrix from the quaternion in parameter.

Parameters
[out]matrixThe matrix that will receive the rotation matrix
[in]orientationThe quaterion used to compute the matrix

◆ setRotate() [2/2]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::setRotate ( Matrix4x4< T > & matrix,
QuaternionT< U > const & orientation )
static

Rotation function, builds a rotation matrix from the quaternion in parameter.

Parameters
[out]matrixThe matrix that will receive the rotation matrix
[in]orientationThe quaterion used to compute the matrix

◆ setScale() [1/4]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::setScale ( Matrix3x3< T > & matrix,
Point2< U > const & scaling )
static

Scale function. Scales matrix from the value in parameter.

Parameters
[out]matrixThe matrix that will be scaled
[in]scalingThe scale value

◆ setScale() [2/4]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::setScale ( Matrix3x3< T > & matrix,
U x,
U y )
static

Scale function. Scales matrix from the three values in parameter.

Parameters
[out]matrixThe matrix that will be scaled
[in]x,yThe scale values

◆ setScale() [3/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::setScale ( Matrix4x4< T > & matrix,
Point3< U > const & scaling )
static

Scale function. Scales matrix from the value in parameter.

Parameters
[out]matrixThe matrix that will be scaled
[in]scalingThe scale value

◆ setScale() [4/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::setScale ( Matrix4x4< T > & matrix,
U x,
U y,
U z )
static

Scale function. Scales matrix from the three values in parameter.

Parameters
[out]matrixThe matrix that will be scaled
[in]x,y,zThe scale values

◆ setTransform() [1/2]

template<typename T , typename U , typename V >
static Matrix3x3< T > & castor::matrix::setTransform ( Matrix3x3< T > & matrix,
Point2< U > const & position,
Point2< U > const & scaling,
Angle orientation )
static

Retrieves transformation matrix from translation, scaling and rotation.

Parameters
[out]matrixReceives the transformation
[in]positionThe translation value
[in]scalingThe scaling value
[in]orientationThe rotation value

◆ setTransform() [2/2]

template<typename T , typename U , typename V >
static Matrix4x4< T > & castor::matrix::setTransform ( Matrix4x4< T > & matrix,
Point3< U > const & position,
Point3< U > const & scaling,
QuaternionT< V > const & orientation )
static

Retrieves transformation matrix from translation, scaling and rotation.

Parameters
[out]matrixReceives the transformation
[in]positionThe translation value
[in]scalingThe scaling value
[in]orientationThe rotation value

◆ setTranslate() [1/4]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::setTranslate ( Matrix3x3< T > & matrix,
Point2< U > const & translation )
static

Translate function. Translates a matrix from the value in parameter.

Parameters
[out]matrixThe matrix that will be translated
[in]translationThe translate value

◆ setTranslate() [2/4]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::setTranslate ( Matrix3x3< T > & matrix,
U x,
U y )
static

Translate function. Translates a matrix from the three values in parameter.

Parameters
[out]matrixThe matrix that will be translated
[in]x,yThe translate values

◆ setTranslate() [3/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::setTranslate ( Matrix4x4< T > & matrix,
Point3< U > const & translation )
static

Translate function. Translates a matrix from the value in parameter.

Parameters
[out]matrixThe matrix that will be translated
[in]translationThe translate value

◆ setTranslate() [4/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::setTranslate ( Matrix4x4< T > & matrix,
U x,
U y,
U z )
static

Translate function. Translates a matrix from the three values in parameter.

Parameters
[out]matrixThe matrix that will be translated
[in]x,y,zThe translate values

◆ switchHand()

template<typename T >
static Matrix4x4< T > & castor::matrix::switchHand ( Matrix4x4< T > & matrix)
static

Switches the handness of a matrix (from right to left or left to right)

Parameters
[in,out]matrixThe matrix to switch, receives the switched matrix
Returns
The switched matrix

◆ transform() [1/2]

template<typename T , typename U , typename V >
static Matrix3x3< T > & castor::matrix::transform ( Matrix3x3< T > & matrix,
Point2< U > const & position,
Point2< U > const & scaling,
Angle orientation )
static

Retrieves transformation matrix from translation, scaling and rotation.

Parameters
[out]matrixReceives the transformation
[in]positionThe translation value
[in]scalingThe scaling value
[in]orientationThe rotation value

◆ transform() [2/2]

template<typename T , typename U , typename V >
static Matrix4x4< T > & castor::matrix::transform ( Matrix4x4< T > & matrix,
Point3< U > const & position,
Point3< U > const & scaling,
QuaternionT< V > const & orientation )
static

Retrieves transformation matrix from translation, scaling and rotation.

Parameters
[out]matrixReceives the transformation
[in]positionThe translation value
[in]scalingThe scaling value
[in]orientationThe rotation value

◆ translate() [1/4]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::translate ( Matrix3x3< T > & matrix,
Point2< U > const & translation )
static

Translate function. Translates a matrix from the value in parameter.

Parameters
[out]matrixThe matrix that will be translated
[in]translationThe translate value

◆ translate() [2/4]

template<typename T , typename U >
static Matrix3x3< T > & castor::matrix::translate ( Matrix3x3< T > & matrix,
U x,
U y )
static

Translate function. Translates a matrix from the three values in parameter.

Parameters
[out]matrixThe matrix that will be translated
[in]x,yThe translate values

◆ translate() [3/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::translate ( Matrix4x4< T > & matrix,
Point3< U > const & translation )
static

Translate function. Translates a matrix from the value in parameter.

Parameters
[out]matrixThe matrix that will be translated
[in]translationThe translate value

◆ translate() [4/4]

template<typename T , typename U >
static Matrix4x4< T > & castor::matrix::translate ( Matrix4x4< T > & matrix,
U x,
U y,
U z )
static

Translate function. Translates a matrix from the three values in parameter.

Parameters
[out]matrixThe matrix that will be translated
[in]x,y,zThe translate values

◆ yaw()

template<typename T >
static Matrix4x4< T > & castor::matrix::yaw ( Matrix4x4< T > & matrix,
Angle const & angle )
static

Rotation function, around Y axis. Builds a rotation matrix from the angle in parameter.

Parameters
[out]matrixThe matrix that will receive the rotation matrix
[in]angleThe rotation angle