![]() |
Blamite Game Engine - blam!
00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
|
Class for Euler rotations. More...
#include <OgreEuler.h>
Public Member Functions | |
| Euler () | |
| Default constructor. More... | |
| Euler (const Radian &y, const Radian &p=Radian(0.0f), const Radian &r=Radian(0.0f)) | |
| Constructor which takes yaw, pitch and roll values. More... | |
| Euler (Real y, Real p=0.0f, Real r=0.0f) | |
| Constructor which takes yaw, pitch and roll values as reals (radians). More... | |
| Euler (const Quaternion &quaternion) | |
| Default constructor with presets. More... | |
| Euler (const Matrix3 &matrix) | |
| Radian | yaw () const |
| Get the Yaw angle. More... | |
| Radian | pitch () const |
| Get the Pitch angle. More... | |
| Radian | roll () const |
| Get the Roll angle. More... | |
| Euler & | setYaw (Radian y) |
| Set the yaw. More... | |
| Euler & | setPitch (Radian p) |
| Set the pitch. More... | |
| Euler & | setRoll (Radian r) |
| Set the roll. More... | |
| Euler & | orientation (const Radian &y, const Radian &p, const Radian &r) |
| Set all rotations at once. More... | |
| Euler & | yaw (const Radian &y) |
| Apply a relative yaw. More... | |
| Euler & | pitch (const Radian &p) |
| Apply a relative pitch. More... | |
| Euler & | roll (const Radian &r) |
| Apply a relative roll. More... | |
| Euler & | rotate (const Radian &y, const Radian &p, const Radian &r) |
| Apply all relative rotations at once. More... | |
| Vector3 | forward () const |
| Get a vector pointing forwards. More... | |
| Vector3 | right () const |
| Get a vector pointing to the right. More... | |
| Vector3 | up () const |
| Get a vector pointing up. More... | |
| Quaternion | toQuaternion () const |
| Calculate the quaternion of the euler object. More... | |
| operator Quaternion () const | |
| Casting operator. This allows any ogre function that wants a Quaternion to accept a Euler instead. More... | |
| Euler & | fromQuaternion (const Quaternion &quaternion) |
| Calculate the current euler angles of a given quaternion object. More... | |
| Euler & | fromMatrix3 (const Matrix3 &matrix) |
| Calculate the current euler angles of a given matrix object. More... | |
| Euler & | direction (const Vector3 &v, bool setYaw=true, bool setPitch=true) |
| Set the yaw and pitch to face in the given direction. More... | |
| Euler & | normalise (bool normYaw=true, bool normPitch=true, bool normRoll=true) |
| Normalise the selected rotations to be within the +/-180 degree range. More... | |
| Euler | rotationTo (const Vector3 &dir, bool setYaw=true, bool setPitch=true, bool shortest=true) const |
| Return the relative euler angles required to rotate from the current forward direction to the specified dir vector. More... | |
| Euler & | limitYaw (const Radian &limit) |
| Clamp the yaw angle to a range of +/-limit. More... | |
| Euler & | limitPitch (const Radian &limit) |
| Clamp the pitch angle to a range of +/-limit. More... | |
| Euler & | limitRoll (const Radian &limit) |
| Clamp the roll angle to a range of +/-limit. More... | |
| Euler | operator+ (const Euler &rhs) const |
| Add two euler objects. More... | |
| Euler | operator- (const Euler &rhs) const |
| Subtract two euler objects. More... | |
| Euler | operator* (Real rhs) const |
| Interpolate the euler angles by rhs. More... | |
| Quaternion | operator* (Euler rhs) const |
| Multiply two eulers. More... | |
| Vector3 | operator* (const Vector3 &rhs) const |
| Apply the euler rotation to the vector rhs. More... | |
| Euler & | operator= (const Euler &src) |
| Copy assignment operator (Euler) More... | |
| Euler & | operator= (const Quaternion &quaternion) |
| Copy assignment operator (Quaternion) More... | |
| Euler & | operator= (const Matrix3 &matrix) |
| Copy assignment operator (Matrix3) More... | |
Protected Member Functions | |
| void | wrapAngle (Radian &angle) |
| void | limitAngle (Radian &angle, const Radian &limit) |
Protected Attributes | |
| Radian | mYaw |
| Rotation around the Y axis. More... | |
| Radian | mPitch |
| Rotation around the X axis. More... | |
| Radian | mRoll |
| Rotation around the Z axis. More... | |
| Quaternion | mCachedQuaternion |
| Cached quaternion equivalent of this euler object. More... | |
| bool | mChanged |
| Is the cached quaternion out of date? More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const Euler &e) |
| Stream operator, for printing the euler component angles to a stream. More... | |
| Euler | operator* (Real lhs, const Euler &rhs) |
| Interpolate the euler angle by lhs. More... | |
| bool | operator== (const Euler &left, const Euler &right) |
| bool | operator!= (const Euler &left, const Euler &right) |
| bool | sameOrientation (const Euler &left, const Euler &right) |
Class for Euler rotations.
| Yaw is a rotation around the Y axis. | Pitch is a rotation around the X axis. | Roll is a rotation around the Z axis. |
|
inline |
Default constructor.
Here is the caller graph for this function:
|
inline |
Constructor which takes yaw, pitch and roll values.
| y | Starting value for yaw |
| p | Starting value for pitch |
| r | Starting value for roll |
|
inline |
Constructor which takes yaw, pitch and roll values as reals (radians).
| y | Starting value for yaw [radian] |
| p | Starting value for pitch [radian] |
| r | Starting value for roll [radian] |
|
inlineexplicit |
Default constructor with presets.
| quaternion | Calculate starting values from this quaternion |
Here is the call graph for this function:
|
inlineexplicit |
Here is the call graph for this function:
|
inline |
Set the yaw and pitch to face in the given direction.
The direction doesn't need to be normalised. Roll is always unaffected.
| setYaw | If false, the yaw isn't changed. |
| setPitch | If false, the pitch isn't changed. |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get a vector pointing forwards.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Calculate the current euler angles of a given matrix object.
| matrix | Matrix3 which is used to calculate current euler angles. |
Here is the caller graph for this function:
|
inline |
Calculate the current euler angles of a given quaternion object.
| quaternion | Quaternion which is used to calculate current euler angles. |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotected |
Here is the caller graph for this function:
|
inline |
Clamp the pitch angle to a range of +/-limit.
Here is the call graph for this function:
|
inline |
Clamp the roll angle to a range of +/-limit.
Here is the call graph for this function:
|
inline |
Clamp the yaw angle to a range of +/-limit.
Here is the call graph for this function:
|
inline |
Normalise the selected rotations to be within the +/-180 degree range.
The normalise uses a wrap around, so for example a yaw of 360 degrees becomes 0 degrees, and -190 degrees becomes 170.
| normYaw | If false, the yaw isn't normalized. |
| normPitch | If false, the pitch isn't normalized. |
| normRoll | If false, the roll isn't normalized. |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Casting operator. This allows any ogre function that wants a Quaternion to accept a Euler instead.
Here is the call graph for this function:
|
inline |
Apply the euler rotation to the vector rhs.
Here is the call graph for this function:
|
inline |
Multiply two eulers.
This has the same effect as multiplying quaternions.
Here is the call graph for this function:
|
inline |
Interpolate the euler angles by rhs.
Here is the call graph for this function:Add two euler objects.
Here is the call graph for this function:Subtract two euler objects.
This finds the difference as relative angles.
Here is the call graph for this function:
|
inline |
Copy assignment operator (Matrix3)
Here is the call graph for this function:
|
inline |
Copy assignment operator (Quaternion)
Here is the call graph for this function:
|
inline |
Set all rotations at once.
| y | New value for yaw |
| p | New value for pitch |
| r | New value for roll |
Here is the caller graph for this function:
|
inline |
Get the Pitch angle.
Here is the caller graph for this function:
|
inline |
Apply a relative pitch.
| p | Angle to add on current pitch |
|
inline |
Get a vector pointing to the right.
Here is the call graph for this function:
|
inline |
Get the Roll angle.
Here is the caller graph for this function:
|
inline |
Apply a relative roll.
| r | Angle to add on current roll |
|
inline |
Apply all relative rotations at once.
| y | Angle to add on current yaw |
| p | Angle to add on current pitch |
| r | Angle to add on current roll |
|
inline |
Return the relative euler angles required to rotate from the current forward direction to the specified dir vector.
The result euler can then be added to the current euler to immediately face dir. The rotation won't flip upside down then roll instead of a 180 degree yaw.
| setYaw | If false, the angle is set to 0. If true, the angle is calculated. |
| setPitch | If false, the angle is set to 0. If true, the angle is calculated. |
| shortest | If false, the full value of each angle is used. If true, the angles are normalised and the shortest rotation is found to face the correct direction. For example, when false a yaw of 1000 degrees and a dir of (0,0,-1) will return a -1000 degree yaw. When true, the same yaw and dir would give 80 degrees (1080 degrees faces the same way as (0,0,-1). |
Here is the call graph for this function:
|
inline |
Set the pitch.
| p | New value for pitch |
Here is the caller graph for this function:
|
inline |
Set the roll.
| r | New value for roll |
Here is the caller graph for this function:
|
inline |
Set the yaw.
| y | New value for yaw |
Here is the caller graph for this function:
|
inline |
Calculate the quaternion of the euler object.
The result is cached, it is only recalculated when the component euler angles are changed.
Here is the caller graph for this function:
|
inline |
Get a vector pointing up.
Here is the call graph for this function:
|
inlineprotected |
Here is the caller graph for this function:
|
inline |
Get the Yaw angle.
Here is the caller graph for this function:
|
inline |
Apply a relative yaw.
| y | Angle to add on current yaw |
|
friend |
Stream operator, for printing the euler component angles to a stream.
|
mutableprotected |
Cached quaternion equivalent of this euler object.
|
mutableprotected |
Is the cached quaternion out of date?
|
protected |
Rotation around the X axis.
|
protected |
Rotation around the Z axis.
|
protected |
Rotation around the Y axis.