// TODO: Optimize this (super easy)
Matrix Matrix::CreateRotation(Vector3 rotation)
{
	Matrix x = CreateRotationX(rotation.x);
	Matrix y = CreateRotationY(rotation.y);
	Matrix z = CreateRotationZ(rotation.z);

	return z * x * y;
}
Exemple #2
0
Matrix Matrix::CreateRotationZ(float radians)
{
    Matrix m;
    
    CreateRotationZ(m,radians);
    
    return m;
    
}
Exemple #3
0
/* Rotate matrix around Z axis.
 * ARGUMENTS:
 * - rotation angle in degrees
 *     float angle;
 * RETURNS: 
 * - rotated matrix around axis Z
 *     Matrix &;
 */
Matrix &Matrix::RotateZ( float angle )
{
  Matrix temp = CreateRotationZ(angle);

  temp *= *this;
  *this = temp;

  return *this;
} /* End of 'RotateZ' function */
Exemple #4
0
Matrix Matrix::CreateRotation(float x, float y, float z)
{
    auto m = CreateRotationX(x) * CreateRotationY(y) * CreateRotationZ(z);
    
    return m;
}
Exemple #5
0
Matrix4x4 Matrix4x4::CreateRotation( const float pitch, const float yaw, const float roll, bool radians )
{
    return CreateRotationX( pitch, radians ) *
           CreateRotationY( yaw, radians ) *
           CreateRotationZ( roll, radians );
}