Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Mezzanine::Quaternion Class Reference

This is used to store information about rotation in 3d space. More...

#include <quaternion.h>

Public Member Functions

 Quaternion ()
 Blank Constructor. More...
 
 Quaternion (const Real &X, const Real &Y, const Real &Z, const Real &W)
 Constructor. More...
 
 Quaternion (const Real &Angle, const Vector3 &Axis)
 Axis and Rotation Constructor. More...
 
 Quaternion (const Matrix3x3 &Mat)
 Rotation Matrix Constructor. More...
 
 Quaternion (const Vector3 &AxisX, const Vector3 &AxisY, const Vector3 &AxisZ)
 Axes Constructor. More...
 
 Quaternion (const Vector3 &DirectionAxis, const Vector3 &UpAxis)
 Rotation To Z constructor. More...
 
 Quaternion (const btQuaternion &Theirs)
 Bullet Quaternion constructor. More...
 
 Quaternion (const Ogre::Quaternion &Theirs)
 Ogre Quaternion constructor. More...
 
 Quaternion (const Mezzanine::Quaternion &Other)
 Copy Constructor. More...
 
 Quaternion (const XML::Node &OneNode)
 XML Constructor. More...
 
void ConvertToAngleAxis (Real &Angle, Vector3 &Axis) const
 Converts the rotation expressed by this Quaternion into it's individual rotation and axis components. More...
 
Real DotProduct (const Quaternion &Other) const
 Gets the Dot Product of this quaternion and another quaternion. More...
 
void ExtractBulletQuaternion (const btQuaternion &Ours)
 Copies an existing Bullet quaternion. More...
 
void ExtractOgreQuaternion (const Ogre::Quaternion &Ours)
 Copies an existing Ogre quaternion. More...
 
btQuaternion GetBulletQuaternion (Boole normalize=false) const
 Gets a Bullet quaternion. More...
 
Quaternion GetInverse () const
 Inverses this Quaternion. More...
 
Quaternion GetNormalizedCopy () const
 Get a normalized copy of this Quaternion without changing this one. More...
 
Ogre::Quaternion GetOgreQuaternion (Boole normalize=false) const
 Gets a Ogre quaternion. More...
 
Real Length () const
 Gets the length of the quaternion. More...
 
Real LengthSqrd () const
 Gets the squared length(len^2) of the quaternion. More...
 
QuaternionNormalize ()
 Normalizes this Quaternion. More...
 
Boole operator!= (const Mezzanine::Quaternion &Other) const
 Inequality Comparison Operator from Mezzanine::Quaternion. More...
 
Boole operator!= (const Ogre::Quaternion &Other) const
 Inequality Comparison Operator from Ogre::Quaternion. More...
 
Boole operator!= (const btQuaternion &Other) const
 Inequality Comparison Operator from btQuaternion. More...
 
Quaternion operator* (const Real &Scalar) const
 Scaling by multiplication. More...
 
Quaternion operator* (const Mezzanine::Quaternion &Other) const
 Multiplication operator with Mezzanine::Quaternion and Mezzanine::Quaternion. More...
 
Quaternion operator* (const Ogre::Quaternion &Other) const
 Multiplication operator with Mezzanine::Quaternion and Ogre::Quaternion. More...
 
Quaternion operator* (const btQuaternion &Other) const
 Multiplication operator with Mezzanine::Quaternion and btQuaternion. More...
 
Vector3 operator* (const Vector3 &Other) const
 Rotates a vector by the provided quaternion. More...
 
Quaternion operator+ (const Mezzanine::Quaternion &Other) const
 Addition operator with Mezzanine::Quaternion and Mezzanine::Quaternion. More...
 
Quaternion operator+ (const Ogre::Quaternion &Other) const
 Addition operator with Mezzanine::Quaternion and Ogre::Quaternion. More...
 
Quaternion operator+ (const btQuaternion &Other) const
 Addition operator with Mezzanine::Quaternion and btQuaternion. More...
 
Quaternionoperator+= (const Mezzanine::Quaternion &Other)
 Incrementing operator with Mezzanine::Quaternion and Mezzanine::Quaternion. More...
 
Quaternionoperator+= (const Ogre::Quaternion &Other)
 Incrementing operator with Mezzanine::Quaternion and Ogre::Quaternion. More...
 
Quaternionoperator+= (const btQuaternion &Other)
 Incrementing operator with Mezzanine::Quaternion and btQuaternion. More...
 
Quaternion operator- (const Mezzanine::Quaternion &Other) const
 Subtraction operator with Mezzanine::Quaternion and Mezzanine::Quaternion. More...
 
Quaternion operator- (const Ogre::Quaternion &Other) const
 Subtraction operator with Mezzanine::Quaternion and Ogre::Quaternion. More...
 
Quaternion operator- (const btQuaternion &Other) const
 Subtraction operator with Mezzanine::Quaternion and btQuaternion. More...
 
Quaternionoperator-= (const Mezzanine::Quaternion &Other)
 Decrementing operator with Mezzanine::Quaternion and Mezzanine::Quaternion. More...
 
Quaternionoperator-= (const Ogre::Quaternion &Other)
 Decrementing operator with Mezzanine::Quaternion and Ogre::Quaternion. More...
 
Quaternionoperator-= (const btQuaternion &Other)
 Decrementing operator with Mezzanine::Quaternion and btQuaternion. More...
 
Quaternion operator/ (const Real &Scalar) const
 Scaling by division. More...
 
Boole operator<= (const Mezzanine::Quaternion &Other) const
 Is every value in this Quaternion less than or equal to its corresponding value in another. More...
 
Quaternionoperator= (const Mezzanine::Quaternion &Other)
 Assignment Operator from Mezzanine::Quaternion. More...
 
Quaternionoperator= (const Ogre::Quaternion &Other)
 Assignment Operator from Ogre::Quaternion. More...
 
Quaternionoperator= (const btQuaternion &Other)
 Assignment Operator from btQuaternion. More...
 
Boole operator== (const Mezzanine::Quaternion &Other) const
 Equality Comparison Operator from Mezzanine::Quaternion. More...
 
Boole operator== (const Ogre::Quaternion &Other) const
 Equality Comparison Operator from Ogre::Quaternion. More...
 
Boole operator== (const btQuaternion &Other) const
 Equality Comparison Operator from btQuaternion. More...
 
Boole operator>= (const Mezzanine::Quaternion &Other) const
 Is every value in this Quaternion greater than or equal to its corresponding value in another. More...
 
Real operator[] (const Whole &Index) const
 Allows Array style access to the members of this class. More...
 
Realoperator[] (const Whole &Index)
 Allows Array style access to the members of this class. More...
 
void ProtoDeSerialize (const XML::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it. More...
 
void ProtoSerialize (XML::Node &CurrentRoot) const
 Convert this class to an XML::Node ready for serialization. More...
 
void SetFromAxes (const Vector3 &AxisX, const Vector3 &AxisY, const Vector3 &AxisZ)
 Generates and sets the values of this quaternion from 3 Axis vectors. More...
 
void SetFromAxisAngle (const Real &Angle, const Vector3 &Axis)
 Generates and sets the values of this quaternion to describe a rotation from an axis and angle on that axis. More...
 
void SetFromAxisToZ (const Vector3 &DirectionAxis, const Vector3 &UpAxis)
 Generates and sets the values of this quaternion to describe a rotation from the direction axis to the Z axis. More...
 
void SetFromMatrix3x3 (const Matrix3x3 &Mat)
 Sets this quaternions values to express the same rotation as a Matrix3x3. More...
 
void SetIdentity ()
 Sets default/identity values to the members of this quaternion.
 
void SetValues (const Real &X, const Real &Y, const Real &Z, const Real &W)
 Sets the individual values of this quaterion directly. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag this class will leave behind as its instances are serialized. More...
 

Public Attributes

Real W
 Rotation on the Axis X, Y and Z defined.
 
Real X
 The X component of the Axis.
 
Real Y
 The Y component of the Axis.
 
Real Z
 The Z component of the Axis.
 

Detailed Description

This is used to store information about rotation in 3d space.

This is used to store information about rotation in 3d space. The X, Y and Z are used to identify a ray from the origin (0,0,0), about which W represents an amount of rotation.

Definition at line 68 of file quaternion.h.

Constructor & Destructor Documentation

Mezzanine::Quaternion::Quaternion ( )

Blank Constructor.

Basic no-initialization constructor.

Definition at line 61 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const Real X,
const Real Y,
const Real Z,
const Real W 
)

Constructor.

Constructor that sets all four axis' of rotation.

Parameters
XThe X component of the Axis.
YThe Y component of the Axis.
ZThe Z component of the Axis.
WRotation on the Axis X, Y and Z defined.

Definition at line 64 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const Real Angle,
const Vector3 Axis 
)

Axis and Rotation Constructor.

This assembles a quaternion based on an axis and a rotation in radians.

Parameters
AngleReal representing the angle to be applied along the axis in radians.
AxisVector3 representing the axis to apply the rotation.

Definition at line 67 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const Matrix3x3 Mat)

Rotation Matrix Constructor.

Parameters
MatThe matrix to set this quaternion from.

Definition at line 70 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const Vector3 AxisX,
const Vector3 AxisY,
const Vector3 AxisZ 
)

Axes Constructor.

Parameters
AxisXThe vector expressing the X axis.
AxisYThe vector expressing the Y axis.
AxisZThe vector expressing the Z axis.

Definition at line 73 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const Vector3 DirectionAxis,
const Vector3 UpAxis 
)

Rotation To Z constructor.

Parameters
DirectionAxisThe axis to get the rotation to Z for.
UpAxisThe up axis in local space.

Definition at line 76 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const btQuaternion &  Theirs)
explicit

Bullet Quaternion constructor.

Constructor that sets all values to match the Bullet quaternion.

Parameters
TheirsThe quaternion to be copied to make this quaternion.

Definition at line 79 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const Ogre::Quaternion &  Theirs)
explicit

Ogre Quaternion constructor.

Constructor that sets all values to match the Ogre quaternion.

Parameters
TheirsThe quaternion to be copied to make this quaternion.

Definition at line 82 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const Mezzanine::Quaternion Other)

Copy Constructor.

Parameters
OtherThe Quaternion to copy.

Definition at line 85 of file quaternion.cpp.

Mezzanine::Quaternion::Quaternion ( const XML::Node OneNode)
explicit

XML Constructor.

Parameters
OneNodeThe XML node to deserialize from.

Definition at line 93 of file quaternion.cpp.

Member Function Documentation

void Mezzanine::Quaternion::ConvertToAngleAxis ( Real Angle,
Vector3 Axis 
) const

Converts the rotation expressed by this Quaternion into it's individual rotation and axis components.

Parameters
AngleThe amount of rotation to apply to the axis.
AxisThe Axis this quaternions rotation is on.

Definition at line 190 of file quaternion.cpp.

Real Mezzanine::Quaternion::DotProduct ( const Quaternion Other) const

Gets the Dot Product of this quaternion and another quaternion.

Parameters
OtherThe other quaternion to calculate the dot product from.
Returns
Returns a Real that is the Dot Product of the two quaternions.

Definition at line 203 of file quaternion.cpp.

void Mezzanine::Quaternion::ExtractBulletQuaternion ( const btQuaternion &  Ours)

Copies an existing Bullet quaternion.

This function will copy the values stored in an existing Bullet quaternion and set the values of this class to be the same.

Parameters
OursThe quaternion to be extracted.

Definition at line 255 of file quaternion.cpp.

void Mezzanine::Quaternion::ExtractOgreQuaternion ( const Ogre::Quaternion &  Ours)

Copies an existing Ogre quaternion.

This function will copy the values stored in an existing Ogre quaternion and set the values of this class to be the same.

Parameters
OursThe quaternion to be extracted.

Definition at line 275 of file quaternion.cpp.

btQuaternion Mezzanine::Quaternion::GetBulletQuaternion ( Boole  normalize = false) const

Gets a Bullet quaternion.

Creates a Bullet quaternion with values equal to this class and returns it.

Parameters
normalizeWhether or not you want this function to normalize the quaternion for you.
Returns
A btQuaternion that has the same contents as this Mezzanine::Quaternion.

Definition at line 243 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::GetInverse ( ) const

Inverses this Quaternion.

Returns
Returns a quaternion that is a copy of this one after it has been inversed.

Definition at line 228 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::GetNormalizedCopy ( ) const

Get a normalized copy of this Quaternion without changing this one.

Returns
A Copy of this Quaternion after the copy has been normalized.

Definition at line 224 of file quaternion.cpp.

Ogre::Quaternion Mezzanine::Quaternion::GetOgreQuaternion ( Boole  normalize = false) const

Gets a Ogre quaternion.

Creates a Ogre quaternion with values equal to this class and returns it.

Parameters
normalizeWhether or not you want this function to normalize the quaternion for you.

Definition at line 263 of file quaternion.cpp.

String Mezzanine::Quaternion::GetSerializableName ( )
static

Get the name of the the XML tag this class will leave behind as its instances are serialized.

Returns
A string containing "Quaternion"

Definition at line 544 of file quaternion.cpp.

Real Mezzanine::Quaternion::Length ( ) const

Gets the length of the quaternion.

Returns
Returns a Real representing the length of the quaternion.

Definition at line 208 of file quaternion.cpp.

Real Mezzanine::Quaternion::LengthSqrd ( ) const

Gets the squared length(len^2) of the quaternion.

Returns
Returns a Real representing the squared length(len^2) of the quaternion.

Definition at line 213 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::Normalize ( )

Normalizes this Quaternion.

Returns
Returns a normalized reference of this quaternion.

Definition at line 218 of file quaternion.cpp.

Boole Mezzanine::Quaternion::operator!= ( const Mezzanine::Quaternion Other) const

Inequality Comparison Operator from Mezzanine::Quaternion.

Parameters
OtherThe other quaternion to compare with.
Returns
True if the Quaternions are not semantically equal, false otherwise.

Definition at line 487 of file quaternion.cpp.

Boole Mezzanine::Quaternion::operator!= ( const Ogre::Quaternion &  Other) const

Inequality Comparison Operator from Ogre::Quaternion.

Parameters
OtherThe other quaternion to compare with.
Returns
True if the Quaternions are not semantically equal, false otherwise.

Definition at line 490 of file quaternion.cpp.

Boole Mezzanine::Quaternion::operator!= ( const btQuaternion &  Other) const

Inequality Comparison Operator from btQuaternion.

Parameters
OtherThe other quaternion to compare with.
Returns
True if the Quaternions are not semantically equal, false otherwise.

Definition at line 493 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator* ( const Real Scalar) const

Scaling by multiplication.

Parameters
ScalarThis is the amount to scale the quaternion by.
Returns
Returns a scaled quaternion.

Definition at line 315 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator* ( const Mezzanine::Quaternion Other) const

Multiplication operator with Mezzanine::Quaternion and Mezzanine::Quaternion.

Parameters
OtherThe other Quaternion to multiply from this one.
Returns
A Mezzanine::Quaternion with the result.

Definition at line 348 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator* ( const Ogre::Quaternion &  Other) const

Multiplication operator with Mezzanine::Quaternion and Ogre::Quaternion.

Parameters
OtherThe other Quaternion to multiply from this one.
Returns
A Mezzanine::Quaternion with the result.

Definition at line 359 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator* ( const btQuaternion &  Other) const

Multiplication operator with Mezzanine::Quaternion and btQuaternion.

Parameters
OtherThe other Quaternion to multiply from this one.
Returns
A Mezzanine::Quaternion with the result.

Definition at line 370 of file quaternion.cpp.

Vector3 Mezzanine::Quaternion::operator* ( const Vector3 Other) const

Rotates a vector by the provided quaternion.

Parameters
OtherThe vector to rotate.
Returns
Returns a rotated version of the provided vector.

Definition at line 384 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator+ ( const Mezzanine::Quaternion Other) const

Addition operator with Mezzanine::Quaternion and Mezzanine::Quaternion.

Parameters
OtherThe other Quaternion to add to this one.
Returns
A Mezzanine::Quaternion with the sum.

Definition at line 330 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator+ ( const Ogre::Quaternion &  Other) const

Addition operator with Mezzanine::Quaternion and Ogre::Quaternion.

Parameters
OtherThe other Quaternion to add to this one.
Returns
A Mezzanine::Quaternion with the sum.

Definition at line 333 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator+ ( const btQuaternion &  Other) const

Addition operator with Mezzanine::Quaternion and btQuaternion.

Parameters
OtherThe other Quaternion to add to this one.
Returns
A Mezzanine::Quaternion with the sum.

Definition at line 336 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator+= ( const Mezzanine::Quaternion Other)

Incrementing operator with Mezzanine::Quaternion and Mezzanine::Quaternion.

Parameters
OtherThe other Quaternion to add to this one.
Returns
This Mezzanine::Quaternion with the sum.

Definition at line 398 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator+= ( const Ogre::Quaternion &  Other)

Incrementing operator with Mezzanine::Quaternion and Ogre::Quaternion.

Parameters
OtherThe other Quaternion to add to this one.
Returns
This Mezzanine::Quaternion with the sum.

Definition at line 407 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator+= ( const btQuaternion &  Other)

Incrementing operator with Mezzanine::Quaternion and btQuaternion.

Parameters
OtherThe other Quaternion to add to this one.
Returns
This Mezzanine::Quaternion with the sum.

Definition at line 416 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator- ( const Mezzanine::Quaternion Other) const

Subtraction operator with Mezzanine::Quaternion and Mezzanine::Quaternion.

Parameters
OtherThe other Quaternion to subtract from this one.
Returns
A Mezzanine::Quaternion with the difference.

Definition at line 339 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator- ( const Ogre::Quaternion &  Other) const

Subtraction operator with Mezzanine::Quaternion and Ogre::Quaternion.

Parameters
OtherThe other Quaternion to subtract from this one.
Returns
A Mezzanine::Quaternion with the difference.

Definition at line 342 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator- ( const btQuaternion &  Other) const

Subtraction operator with Mezzanine::Quaternion and btQuaternion.

Parameters
OtherThe other Quaternion to subtract from this one.
Returns
A Mezzanine::Quaternion with the difference.

Definition at line 345 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator-= ( const Mezzanine::Quaternion Other)

Decrementing operator with Mezzanine::Quaternion and Mezzanine::Quaternion.

Parameters
OtherThe other Quaternion to subtract from this one.
Returns
This Mezzanine::Quaternion with the difference.

Definition at line 425 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator-= ( const Ogre::Quaternion &  Other)

Decrementing operator with Mezzanine::Quaternion and Ogre::Quaternion.

Parameters
OtherThe other Quaternion to subtract from this one.
Returns
This Mezzanine::Quaternion with the difference.

Definition at line 434 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator-= ( const btQuaternion &  Other)

Decrementing operator with Mezzanine::Quaternion and btQuaternion.

Parameters
OtherThe other Quaternion to subtract from this one.
Returns
This Mezzanine::Quaternion with the difference.

Definition at line 443 of file quaternion.cpp.

Quaternion Mezzanine::Quaternion::operator/ ( const Real Scalar) const

Scaling by division.

Parameters
ScalarThis is the amount to scale the quaternion by.
Returns
Returns a scaled quaternion.

Definition at line 320 of file quaternion.cpp.

Boole Mezzanine::Quaternion::operator<= ( const Mezzanine::Quaternion Other) const

Is every value in this Quaternion less than or equal to its corresponding value in another.

Parameters
OtherThe Quaternion on the right hand side of the sign.
Note
Used primarily for testing. This is not implemented for use with other kinds of Quaternion implementations as it is widely considered useless.

Definition at line 496 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator= ( const Mezzanine::Quaternion Other)

Assignment Operator from Mezzanine::Quaternion.

Parameters
OtherThe other quaternion to overwrite this one.
Returns
This Quaternion after being assigned fresh values.

Definition at line 454 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator= ( const Ogre::Quaternion &  Other)

Assignment Operator from Ogre::Quaternion.

Parameters
OtherThe other quaternion to overwrite this one.
Returns
This Quaternion after being assigned fresh values.

Definition at line 469 of file quaternion.cpp.

Quaternion & Mezzanine::Quaternion::operator= ( const btQuaternion &  Other)

Assignment Operator from btQuaternion.

Parameters
OtherThe other quaternion to overwrite this one.
Returns
This Quaternion after being assigned fresh values.

Definition at line 463 of file quaternion.cpp.

Boole Mezzanine::Quaternion::operator== ( const Mezzanine::Quaternion Other) const

Equality Comparison Operator from Mezzanine::Quaternion.

Parameters
OtherThe other quaternion to compare with.
Returns
True if the Quaternions are semantically equal, false otherwise.

Definition at line 478 of file quaternion.cpp.

Boole Mezzanine::Quaternion::operator== ( const Ogre::Quaternion &  Other) const

Equality Comparison Operator from Ogre::Quaternion.

Parameters
OtherThe other quaternion to compare with.
Returns
True if the Quaternions are semantically equal, false otherwise.

Definition at line 481 of file quaternion.cpp.

Boole Mezzanine::Quaternion::operator== ( const btQuaternion &  Other) const

Equality Comparison Operator from btQuaternion.

Parameters
OtherThe other quaternion to compare with.
Returns
True if the Quaternions are semantically equal, false otherwise.

Definition at line 484 of file quaternion.cpp.

Boole Mezzanine::Quaternion::operator>= ( const Mezzanine::Quaternion Other) const

Is every value in this Quaternion greater than or equal to its corresponding value in another.

Parameters
OtherThe Quaternion on the right hand side of the sign.
Note
Used primarily for testing. This is not implemented for use with other kinds of Quaternion implementations as it is widely considered useless.

Definition at line 498 of file quaternion.cpp.

Real Mezzanine::Quaternion::operator[] ( const Whole Index) const

Allows Array style access to the members of this class.

Parameters
IndexThe number corresponding to the Index you want. 0 = X, 1 = Y, 2 = Z, 3 = W.
Returns
Returns a copy of the number at the index requested.

Definition at line 286 of file quaternion.cpp.

Real & Mezzanine::Quaternion::operator[] ( const Whole Index)

Allows Array style access to the members of this class.

Parameters
IndexThe number corresponding to the Index you want. 0 = X, 1 = Y, 2 = Z, 3 = W.
Returns
Returns a writable reference to the number at the index requested.

Definition at line 299 of file quaternion.cpp.

void Mezzanine::Quaternion::ProtoDeSerialize ( const XML::Node OneNode)

Take the data stored in an XML and overwrite this instance of this object with it.

Parameters
OneNodeand XML::Node containing the data.

Definition at line 526 of file quaternion.cpp.

void Mezzanine::Quaternion::ProtoSerialize ( XML::Node CurrentRoot) const

Convert this class to an XML::Node ready for serialization.

Parameters
CurrentRootThe point in the XML hierarchy that all this quaternion should be appended to.

Definition at line 502 of file quaternion.cpp.

void Mezzanine::Quaternion::SetFromAxes ( const Vector3 AxisX,
const Vector3 AxisY,
const Vector3 AxisZ 
)

Generates and sets the values of this quaternion from 3 Axis vectors.

Parameters
AxisXThe vector expressing the X axis.
AxisYThe vector expressing the Y axis.
AxisZThe vector expressing the Z axis.

Definition at line 158 of file quaternion.cpp.

void Mezzanine::Quaternion::SetFromAxisAngle ( const Real Angle,
const Vector3 Axis 
)

Generates and sets the values of this quaternion to describe a rotation from an axis and angle on that axis.

Parameters
AngleReal representing the angle to be applied along the axis in radians.
AxisVector3 representing the axis to apply the rotation.

Definition at line 115 of file quaternion.cpp.

void Mezzanine::Quaternion::SetFromAxisToZ ( const Vector3 DirectionAxis,
const Vector3 UpAxis 
)

Generates and sets the values of this quaternion to describe a rotation from the direction axis to the Z axis.

Parameters
DirectionAxisThe axis to get the rotation to Z for.
UpAxisThe up axis in local space.

Definition at line 175 of file quaternion.cpp.

void Mezzanine::Quaternion::SetFromMatrix3x3 ( const Matrix3x3 Mat)

Sets this quaternions values to express the same rotation as a Matrix3x3.

Parameters
MatThe matrix to set this quaternion from.

Definition at line 125 of file quaternion.cpp.

void Mezzanine::Quaternion::SetValues ( const Real X,
const Real Y,
const Real Z,
const Real W 
)

Sets the individual values of this quaterion directly.

Parameters
XThe X component of the Axis.
YThe Y component of the Axis.
ZThe Z component of the Axis.
WRotation on the Axis X, Y and Z defined.

Definition at line 107 of file quaternion.cpp.


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