FMath/FMQuaternion.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2005-2006 Feeling Software Inc.
00003     MIT License: http://www.opensource.org/licenses/mit-license.php
00004 */
00005 
00011 #ifndef _FM_QUATERNION_H_
00012 #define _FM_QUATERNION_H_
00013 
00022 class FCOLLADA_EXPORT FMQuaternion
00023 {
00024 public:
00025     float x;    
00026     float y;    
00027     float z;    
00028     float w;    
00030     #ifndef _DEBUG
00031 
00036     FMQuaternion() {}
00037     #else
00038     FMQuaternion() { x = 123456789.0f; y = 123456789.0f; z = 123456789.0f; w = 123456789.0f; }
00039     #endif 
00040 
00049     FMQuaternion(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }
00050 
00057     FMQuaternion(const FMVector3& axis, float angle);
00058 
00064     inline operator float*() { return &x; }
00065 
00071     inline operator const float*() const { return &x; }
00072 
00084     inline FMQuaternion& operator =(const float* v) { x = *v; y = *(v + 1); z = *(v + 2); w = *(v + 3); return *this; }
00085 
00093     FMQuaternion operator*(const FMQuaternion& q) const;
00094 
00102     static FMQuaternion EulerRotationQuaternion(float _x, float _y, float _z);
00103 };
00104 
00105 #endif // _FM_QUATERNION_H_

Generated on Fri May 12 16:44:39 2006 for FCollada by  doxygen 1.4.6-NO