示例#1
0
// 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;
}
示例#2
0
Matrix Matrix::CreateRotationY(float radians)
{
    Matrix m;
    
    CreateRotationY(m,radians);
    
    return m;
    
}
示例#3
0
/* Rotate matrix around Y axis.
 * ARGUMENTS:
 * - rotation angle in degrees
 *     float angle;
 * RETURNS: 
 * - rotated matrix around axis Y
 *     Matrix &;
 */
Matrix &Matrix::RotateY( float angle )
{
  Matrix temp = CreateRotationY(angle);

  temp *= *this;
  *this = temp;

  return *this;
} /* End of 'RotateY' function */
示例#4
0
Matrix Matrix::CreateRotation(float x, float y, float z)
{
    auto m = CreateRotationX(x) * CreateRotationY(y) * CreateRotationZ(z);
    
    return m;
}
示例#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 );
}