PixelLightAPI  .
Public Types | Static Public Member Functions
PLMath::EulerAngles Class Reference

Static Euler angles conversion tool class. More...

#include <EulerAngles.h>

List of all members.

Public Types

enum  EOrder {
  XYZs = 0, XYXs = 2, XZYs = 4, XZXs = 6,
  YZXs = 8, YZYs = 10, YXZs = 12, YXYs = 14,
  ZXYs = 16, ZXZs = 18, ZYXs = 20, ZYZs = 22,
  ZYXr = 1, XYXr = 3, YZXr = 5, XZXr = 7,
  XZYr = 9, YZYr = 11, ZXYr = 13, YXYr = 15,
  YXZr = 17, ZXZr = 19, XYZr = 21, ZYZr = 23
}
 Euler angles order. More...

Static Public Member Functions

static PLMATH_API void ToQuaternion (float fAngleX, float fAngleY, float fAngleZ, Quaternion &qRotation, EOrder nOrder=XYZs)
 Sets a rotation quaternion by using three given Euler angles.
static PLMATH_API void FromQuaternion (const Quaternion &qRotation, float &fAngleX, float &fAngleY, float &fAngleZ, EOrder nOrder=XYZs)
 Returns the Euler angles from a rotation quaternion.
static PLMATH_API void ToMatrix (float fAngleX, float fAngleY, float fAngleZ, Matrix3x3 &mRot, EOrder nOrder=XYZs)
 Sets a rotation matrix by using three given Euler angles.
static PLMATH_API void ToMatrix (float fAngleX, float fAngleY, float fAngleZ, Matrix3x4 &mRot, EOrder nOrder=XYZs)
static PLMATH_API void ToMatrix (float fAngleX, float fAngleY, float fAngleZ, Matrix4x4 &mRot, EOrder nOrder=XYZs)
static PLMATH_API void FromMatrix (const Matrix3x3 &mRot, float &fAngleX, float &fAngleY, float &fAngleZ, EOrder nOrder=XYZs)
 Returns the Euler angles from a rotation matrix.
static PLMATH_API void FromMatrix (const Matrix3x4 &mRot, float &fAngleX, float &fAngleY, float &fAngleZ, EOrder nOrder=XYZs)
static PLMATH_API void FromMatrix (const Matrix4x4 &mRot, float &fAngleX, float &fAngleY, float &fAngleZ, EOrder nOrder=XYZs)

Detailed Description

Static Euler angles conversion tool class.

Remarks:
The implementation of this class is basing on the 'Euler Angle Conversion' gem from Ken Shoemake (1993) published in the 'Graphics Gems IV' book. The original code is available here: http://www.graphicsgems.org/gemsiv/euler_angle/
Note:

Member Enumeration Documentation

Euler angles order.

Enumerator:
XYZs 

XYZ static axis

XYXs 

XYX static axis

XZYs 

XZY static axis

XZXs 

XZX static axis

YZXs 

YZX static axis

YZYs 

YZY static axis

YXZs 

YXZ static axis

YXYs 

YXY static axis

ZXYs 

ZXY static axis

ZXZs 

ZXZ static axis

ZYXs 

ZYX static axis

ZYZs 

ZYZ static axis

ZYXr 

ZYX rotating axis

XYXr 

XYX rotating axis

YZXr 

YZX rotating axis

XZXr 

XZX rotating axis

XZYr 

XZY rotating axis

YZYr 

YZY rotating axis

ZXYr 

ZXY rotating axis

YXYr 

YXY rotating axis

YXZr 

YXZ rotating axis

ZXZr 

ZXZ rotating axis

XYZr 

XYZ rotating axis

ZYZr 

ZYZ rotating axis


Member Function Documentation

static PLMATH_API void PLMath::EulerAngles::ToQuaternion ( float  fAngleX,
float  fAngleY,
float  fAngleZ,
Quaternion qRotation,
EOrder  nOrder = XYZs 
) [static]

Sets a rotation quaternion by using three given Euler angles.

Parameters:
[in]fAngleXRotation angle around the x axis (in radian) where fAngleX > 0 indicates a counterclockwise rotation in the yz-plane (if you look along -x)
[in]fAngleYRotation angle around the y axis (in radian) where fAngleY > 0 indicates a counterclockwise rotation in the zx-plane (if you look along -y)
[in]fAngleZRotation angle around the z axis (in radian) where fAngleZ > 0 indicates a counterclockwise rotation in the xy-plane (if you look along -z)
[out]qRotationResulting rotation quaternion
[in]nOrderOrder of the Euler angles
static PLMATH_API void PLMath::EulerAngles::FromQuaternion ( const Quaternion qRotation,
float &  fAngleX,
float &  fAngleY,
float &  fAngleZ,
EOrder  nOrder = XYZs 
) [static]

Returns the Euler angles from a rotation quaternion.

Parameters:
[in]qRotationRotation quaternion
[out]fAngleXWill receive the rotation angle around the x axis (in radian)
[out]fAngleYWill receive the rotation angle around the y axis (in radian)
[out]fAngleZWill receive the rotation angle around the z axis (in radian)
[in]nOrderOrder of the Euler angles
static PLMATH_API void PLMath::EulerAngles::ToMatrix ( float  fAngleX,
float  fAngleY,
float  fAngleZ,
Matrix3x3 mRot,
EOrder  nOrder = XYZs 
) [static]

Sets a rotation matrix by using three given Euler angles.

Parameters:
[in]fAngleXRotation angle around the x axis (in radian) where fAngleX > 0 indicates a counterclockwise rotation in the yz-plane (if you look along -x)
[in]fAngleYRotation angle around the y axis (in radian) where fAngleY > 0 indicates a counterclockwise rotation in the zx-plane (if you look along -y)
[in]fAngleZRotation angle around the z axis (in radian) where fAngleZ > 0 indicates a counterclockwise rotation in the xy-plane (if you look along -z)
[out]mRotResulting rotation matrix
[in]nOrderOrder of the Euler angles
static PLMATH_API void PLMath::EulerAngles::ToMatrix ( float  fAngleX,
float  fAngleY,
float  fAngleZ,
Matrix3x4 mRot,
EOrder  nOrder = XYZs 
) [static]
static PLMATH_API void PLMath::EulerAngles::ToMatrix ( float  fAngleX,
float  fAngleY,
float  fAngleZ,
Matrix4x4 mRot,
EOrder  nOrder = XYZs 
) [static]
static PLMATH_API void PLMath::EulerAngles::FromMatrix ( const Matrix3x3 mRot,
float &  fAngleX,
float &  fAngleY,
float &  fAngleZ,
EOrder  nOrder = XYZs 
) [static]

Returns the Euler angles from a rotation matrix.

Parameters:
[in]mRotRotation matrix
[out]fAngleXWill receive the rotation angle around the x axis (in radian)
[out]fAngleYWill receive the rotation angle around the y axis (in radian)
[out]fAngleZWill receive the rotation angle around the z axis (in radian)
[in]nOrderOrder of the Euler angles
static PLMATH_API void PLMath::EulerAngles::FromMatrix ( const Matrix3x4 mRot,
float &  fAngleX,
float &  fAngleY,
float &  fAngleZ,
EOrder  nOrder = XYZs 
) [static]
static PLMATH_API void PLMath::EulerAngles::FromMatrix ( const Matrix4x4 mRot,
float &  fAngleX,
float &  fAngleY,
float &  fAngleZ,
EOrder  nOrder = XYZs 
) [static]

The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:34
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported