#include <ExQuaternion.h>
Public Methods | |
| ExQuaternion () | |
| ExQuaternion (float w, float x, float y, float z) | |
| ~ExQuaternion () | |
| void | LoadIdentity (void) |
| void | SetQuaternion (float w, float x, float y, float z) |
| void | Normalize (void) |
| void | Conjugate (void) |
| float | GetMagnitude (void) |
| void | SetEuler (float yaw, float pitch, float roll) |
| ExQuaternion | operator- (const ExQuaternion &Q) |
| ExQuaternion | operator+ (const ExQuaternion &Q) |
| ExQuaternion | operator * (const float scalar) |
| ExQuaternion | operator * (const ExQuaternion &Q) |
Data Fields | |
| float | qw |
| float | qx |
| float | qy |
| float | qz |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const ExQuaternion &q) |
|
|
Definition at line 26 of file ExQuaternion.cpp. References SetQuaternion().
00027 {
00028 SetQuaternion(1,0,0,0);
00029 }
|
|
||||||||||||||||||||
|
Definition at line 31 of file ExQuaternion.cpp. References SetQuaternion().
00032 {
00033 SetQuaternion(w,x,y,z);
00034 }
|
|
|
Definition at line 36 of file ExQuaternion.cpp.
00037 {
00038
00039 }
|
|
|
Definition at line 52 of file ExQuaternion.cpp.
00053 {
00054
00055 }
|
|
|
Definition at line 63 of file ExQuaternion.cpp. References qw, qx, qy, and qz. Referenced by Normalize().
|
|
|
Definition at line 57 of file ExQuaternion.cpp.
|
|
|
Definition at line 68 of file ExQuaternion.cpp. References GetMagnitude(), qw, qx, qy, and qz.
|
|
|
Definition at line 96 of file ExQuaternion.cpp. References qw, qx, qy, and qz.
00097 {
00098 ExQuaternion result;
00099 result.qw=(Q.qw*result.qw)-(Q.qx*result.qx)-(Q.qy*result.qy)-(Q.qz*result.qz);
00100 result.qx=(Q.qw*result.qx)-(Q.qx*result.qw)-(Q.qy*result.qz)-(Q.qz*result.qw);
00101 result.qy=(Q.qw*result.qy)-(Q.qx*result.qz)-(Q.qy*result.qw)-(Q.qz*result.qx);
00102 result.qz=(Q.qw*result.qz)-(Q.qx*result.qy)-(Q.qy*result.qx)-(Q.qz*result.qw);
00103 return result;
00104 }
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
Definition at line 78 of file ExQuaternion.cpp. References qw, qx, qy, and qz.
00079 {
00080 float cosY = cosf(yaw/2.0f);
00081 float sinY = sinf(yaw/2.0f);
00082 float cosP = cosf(pitch/2.0f);
00083 float sinP = sinf(pitch/2.0f);
00084 float cosR = cosf(roll/2.0f);
00085 float sinR = sinf(roll/2.0f);
00086
00087 qw=cosR*sinP*cosY+sinR*cosP*sinY;
00088 qx=cosR*cosP*sinY-sinR*sinP*cosY;
00089 qy=sinR*cosP*cosY-cosR*sinP*sinY;
00090 qz=cosR*cosP*cosY+sinR*sinP*sinY;
00091
00092 }
|
|
||||||||||||||||||||
|
Definition at line 44 of file ExQuaternion.cpp. Referenced by ExQuaternion().
|
|
||||||||||||
|
Definition at line 109 of file ExQuaternion.cpp.
|
|
|
Definition at line 55 of file ExQuaternion.h. Referenced by GetMagnitude(), GetMatrixFromQuaternion(), GetQuaternionFromEuler(), Normalize(), operator *(), operator<<(), and SetEuler(). |
|
|
Definition at line 55 of file ExQuaternion.h. Referenced by GetAxisFromQuaternion(), GetMagnitude(), GetMatrixFromQuaternion(), GetQuaternionFromEuler(), LoadIdentity(), Normalize(), operator *(), operator<<(), and SetEuler(). |
|
|
Definition at line 55 of file ExQuaternion.h. Referenced by GetAxisFromQuaternion(), GetMagnitude(), GetMatrixFromQuaternion(), GetQuaternionFromEuler(), LoadIdentity(), Normalize(), operator *(), operator<<(), and SetEuler(). |
|
|
Definition at line 55 of file ExQuaternion.h. Referenced by GetAxisFromQuaternion(), GetMagnitude(), GetMatrixFromQuaternion(), GetQuaternionFromEuler(), LoadIdentity(), Normalize(), operator *(), operator<<(), and SetEuler(). |
1.3-rc1