True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

EulerAngles.h

00001 //---------------------------------------------------------------------------------
00002 // File Name: EulerAngles.h
00003 // Description:
00004 //      3D rotation defined by 3 rotation angles, in radians.
00005 //      Rotation order is Z, X, Y
00006 //
00007 // Copyright (C) 2004 - 2006 True Axis Pty Ltd, Australia. 
00008 // All Rights Reserved.
00009 //
00010 // History:
00011 //      Luke Ryan:          Created
00012 //---------------------------------------------------------------------------------
00013 
00014 #ifndef TA_EULERANGLES_H
00015 #define TA_EULERANGLES_H
00016 
00017 #ifndef TA_COMMON_H
00018 #include "Common.h"
00019 #endif // TA_COMMON_H
00020 
00021 TA_OBFUSCATION_SKIP_PASS_2
00022 
00023 namespace TA
00024 {
00025 
00026 struct Mat33;
00027 
00028 struct TACOMMON_CLASS EulerAngles
00029 {
00030     TA_OBFUSCATION_RESERVED_ON
00031     // no hungarian notation for ease of access
00032     float x;
00033     float y;
00034     float z;
00035 
00036     EulerAngles() {}
00037     EulerAngles(const EulerAngles& eulerAngles) { x = eulerAngles.x; y = eulerAngles.y; z = eulerAngles.z; }
00038     EulerAngles(float fX, float fY, float fZ) { x = fX; y = fY; z = fZ; }
00039     explicit EulerAngles(Mat33& m33) { Initialise(m33); }
00040 
00041     void Initialise(const Mat33& m33);
00042     void Initialise(float fX, float fY, float fZ) { x = fX; y = fY; z = fZ; }
00043 
00044     void UpdateTo(const EulerAngles& eulerAngles);
00045 
00046     void Clear() { x = 0.0f, y = 0.0f, z = 0.0f; }
00047 
00048     Mat33 GetAsMat33();
00049 
00050     void WrapYRotation();
00051     TA_OBFUSCATION_RESERVED_OFF
00052 
00053 };
00054 
00055 };
00056 
00057 #endif // TA_EULERANGLES_H


© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.