Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Moteur3D::Quaternion Class Reference

#include <Quaternion.h>

List of all members.

Public Member Functions

 Quaternion ()
 Default constructor. Initialises x, y, z and w to 0.
 Quaternion (float vx, float vy, float vz, float vw)
 Constructor that initialises x, y, z and w from arguments.
 Quaternion (const Quaternion &q)
 Copy constructor.
float Magnitude ()
 Returns the magnitude of a quaternion. Primarily used for normalization.
void Normalize ()
 Normalises a given quaternion. Sets its Magnitude to 1.
std::string ToString ()
 Returns a string that represents the actual object.
float & operator[] (unsigned int i)
 Array indexing operator.
const float & operator[] (unsigned int i) const
 Array indexing operator.
Quaternionoperator+= (const Quaternion &q)
 Adds a Quaternion to this one.
Quaternionoperator-= (const Quaternion &q)
 Subtracts a Quaternion from this one.
Quaternionoperator *= (float f)
 Multiplies the Quaternion by a float.
Quaternionoperator/= (float f)
 Divides the Quaternion by a float.

Public Attributes

float x
float y
float z
float w

Friends

bool operator== (const Quaternion &q1, const Quaternion &q2)
 Are these two Quaternions equal ?
bool operator!= (const Quaternion &q1, const Quaternion &q2)
 Are these two Quaternions not equal ?
Quaternion operator- (const Quaternion &q)
 Gets the conjugate of this Quaternion.
Quaternion operator+ (const Quaternion &q1, const Quaternion &q2)
 Adds two Quaternions.
Quaternion operator- (const Quaternion &q1, const Quaternion &q2)
 Subtracts one Quaternion from another.
Quaternion operator * (const Quaternion &q, float f)
 Multiplies a Quaternion by a float.
Quaternion operator * (float f, const Quaternion &q)
 Multiplies a Quaternion by a float.
Quaternion operator/ (const Quaternion &q, float f)
 Divides a Quaternion by a float.
Quaternion operator * (const Quaternion &q1, const Quaternion &q2)
 Multiplies 2 Quaternions.
Quaternion operator/ (const Quaternion &q1, const Quaternion &q2)
 Divides 2 Quaternions.


Constructor & Destructor Documentation

Moteur3D::Quaternion::Quaternion  )  [inline]
 

Default constructor. Initialises x, y, z and w to 0.

Moteur3D::Quaternion::Quaternion float  vx,
float  vy,
float  vz,
float  vw
[inline]
 

Constructor that initialises x, y, z and w from arguments.

Moteur3D::Quaternion::Quaternion const Quaternion q  )  [inline]
 

Copy constructor.


Member Function Documentation

float Moteur3D::Quaternion::Magnitude  ) 
 

Returns the magnitude of a quaternion. Primarily used for normalization.

void Moteur3D::Quaternion::Normalize  ) 
 

Normalises a given quaternion. Sets its Magnitude to 1.

Quaternion& Moteur3D::Quaternion::operator *= float  f  )  [inline]
 

Multiplies the Quaternion by a float.

Quaternion& Moteur3D::Quaternion::operator+= const Quaternion q  )  [inline]
 

Adds a Quaternion to this one.

Quaternion& Moteur3D::Quaternion::operator-= const Quaternion q  )  [inline]
 

Subtracts a Quaternion from this one.

Quaternion& Moteur3D::Quaternion::operator/= float  f  )  [inline]
 

Divides the Quaternion by a float.

const float& Moteur3D::Quaternion::operator[] unsigned int  i  )  const [inline]
 

Array indexing operator.

float& Moteur3D::Quaternion::operator[] unsigned int  i  )  [inline]
 

Array indexing operator.

std::string Moteur3D::Quaternion::ToString  ) 
 

Returns a string that represents the actual object.

Returns:
see brief :)


Friends And Related Function Documentation

Quaternion operator * const Quaternion q1,
const Quaternion q2
[friend]
 

Multiplies 2 Quaternions.

Quaternion operator * float  f,
const Quaternion q
[friend]
 

Multiplies a Quaternion by a float.

Quaternion operator * const Quaternion q,
float  f
[friend]
 

Multiplies a Quaternion by a float.

bool operator!= const Quaternion q1,
const Quaternion q2
[friend]
 

Are these two Quaternions not equal ?

Quaternion operator+ const Quaternion q1,
const Quaternion q2
[friend]
 

Adds two Quaternions.

Quaternion operator- const Quaternion q1,
const Quaternion q2
[friend]
 

Subtracts one Quaternion from another.

Quaternion operator- const Quaternion q  )  [friend]
 

Gets the conjugate of this Quaternion.

Quaternion operator/ const Quaternion q1,
const Quaternion q2
[friend]
 

Divides 2 Quaternions.

Quaternion operator/ const Quaternion q,
float  f
[friend]
 

Divides a Quaternion by a float.

bool operator== const Quaternion q1,
const Quaternion q2
[friend]
 

Are these two Quaternions equal ?


Member Data Documentation

float Moteur3D::Quaternion::w
 

float Moteur3D::Quaternion::x
 

float Moteur3D::Quaternion::y
 

float Moteur3D::Quaternion::z
 


The documentation for this class was generated from the following file:
Generated on Sat Oct 15 15:05:51 2005 for Moteur3D by  doxygen 1.4.4