Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

CSIBCQuaterniond Class Reference

Generic class representing quaternions. More...

#include <SIBCQuaterniond.h>

List of all members.

Public Methods

Friends


Detailed Description

Generic class representing quaternions.

The notation used in this quaternion class (W, X, Y, Z) makes the quaternions closely related to 4D vectors (See CSIBCVector4Dd). In general, the quaternion can be thought of as a scalar plus a vector, where the W component is the vector, and X, Y and Z are the coefficients of the I, J and K matricies respectively.

The components of the CSIBCQuaterniond class are represented by doulbe precision floating-point numbers. Its corresponding single precision class, CSIBCQuaternion, has much less functionality, thus this class is preferred.


Constructor & Destructor Documentation

CSIBCQuaterniond::CSIBCQuaterniond  
 

Default Constructor. Sets all components of the quaternion to zero, except W, which is set to one.

See also:
CSIBCQuaterniond::SetIdentity

CSIBCQuaterniond::CSIBCQuaterniond const double    in_dW,
const double    in_dX,
const double    in_dY,
const double    in_dZ
 

Sets the new quaternion's values to those given as the parameters.

Parameters:
in_dW  The value for the W component of the quaternion.
in_dX  The value for the X component of the quaternion.
in_dY  The value for the Y component of the quaternion.
in_dZ  The value for the Z component of the quaternion.
See also:
CSIBCQuaterniond::Set

CSIBCQuaterniond::CSIBCQuaterniond const CSIBCVector3Dd   in_vct
 

Sets the new quaternion's vector values (X, Y, Z) as the corresponding component values in in_vct, and the W component to zero.

Parameters:
in_vct  Vector containing values for the new quaternion's vector components.
See also:
CSIBCQuaterniond::Set(const CSIBCVector3Dd&)

CSIBCQuaterniond::CSIBCQuaterniond const CSIBCVector4Dd   in_vct
 

Sets the new quaternion's values as their corresponding components in in_vct.

Parameters:
in_vct  4D Vector containing component values for the new quaternion.
See also:
CSIBCQuaterniond::Set(const CSIBCVector4Dd&)


Member Function Documentation

CSIBCQuaterniond & CSIBCQuaterniond::Add const CSIBCQuaterniond &    in_quat1,
const CSIBCQuaterniond &    in_quat2
 

Adds in_quat1 and in_quat2 and stores the result in this quaternion.

Parameters:
in_quat1  First quaternion for addition.
in_quat2  Second quaternion for addition.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Add , CSIBCQuaterniond::Sub

CSIBCQuaterniond & CSIBCQuaterniond::Add const CSIBCQuaterniond &    in_quat
 

Adds in_quat to this quaternion.

Parameters:
in_quat  Quaternion to add to this quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Add , CSIBCQuaterniond::Sub

CSIBCQuaterniond& CSIBCQuaterniond::BisectSlerp const CSIBCQuaterniond &    in_quatStart,
const CSIBCQuaterniond &    in_quatEnd
 

Not implemented yet.

CSIBCQuaterniond & CSIBCQuaterniond::Conjugate  
 

Sets this quaternion to its conjugate. A conjugate quaternion is a quaternion that has each of its vector components negated.

Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Invert , CSIBCQuaterniond::Conjugate , CSIBCQuaterniond::Normalize

CSIBCQuaterniond & CSIBCQuaterniond::Conjugate const CSIBCQuaterniond &    in_quat
 

Sets this quaternion to the conjugate of in_quat. A conjugate quaternion is a quaternion that has each of its vector components negated.

Parameters:
in_quat  Quaternion whose conjugate contains the new values for this quaternion's components.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Invert , CSIBCQuaterniond::Conjugate , CSIBCQuaterniond::Normalize

CSIBCQuaterniond& CSIBCQuaterniond::DoubleSlerp const CSIBCQuaterniond &    in_quatStart,
const CSIBCQuaterniond &    in_quatEnd
 

Not implemented yet.

bool CSIBCQuaterniond::Exp CSIBCQuaterniond &    out_quat
 

Not implemented yet.

void CSIBCQuaterniond::Get double &    out_dW,
double &    out_dX,
double &    out_dY,
double &    out_dZ
const
 

Gets the quaternion values.

Parameters:
out_dW  double to receive the W component of the quaternion.
out_dX  double to receive the X component of the quaternion.
out_dY  double to receive the Y component of the quaternion.
out_dZ  double to receive the Z component of the quaternion.
See also:
CSIBCQuaterniond::Get , CSIBCQuaterniond::Set

CSIBCVector4Dd & CSIBCQuaterniond::Get CSIBCVector4Dd   out_vct const
 

Gets the quaternion values with a CSIBCVector4Dd.

Parameters:
out_vct  Vector to receive the values of this quaternion.
Returns:
CSIBCVector4Dd& Reference to out_vct.
See also:
CSIBCQuaterniond::Get , CSIBCQuaterniond::Set

double CSIBCQuaterniond::GetLength   const
 

Returns the length of this quaternion.

Returns:
double The length of this quaternion.
See also:
CSIBCQuaterniond::GetSquaredLength , CSIBCQuaterniond::Normalize

double CSIBCQuaterniond::GetSquaredLength   const
 

Returns the squared length of this quaternion.

Returns:
double The squared length of this quaternion.
See also:
CSIBCQuaterniond::GetLength , CSIBCQuaterniond::Normalize

double CSIBCQuaterniond::GetW   const
 

Returns the W (scalar) component of the quaternion.

Returns:
double The W component of the quaternion.
See also:
CSIBCQuaterniond::Get , CSIBCQuaterniond::Set , CSIBCQuaterniond::GetX , CSIBCQuaterniond::GetY , CSIBCQuaterniond::GetZ

double CSIBCQuaterniond::GetX   const
 

Returns the X component of the quaternion.

Returns:
double The X component of the quaternion.
See also:
CSIBCQuaterniond::Get , CSIBCQuaterniond::Set , CSIBCQuaterniond::GetW , CSIBCQuaterniond::GetY , CSIBCQuaterniond::GetZ

double CSIBCQuaterniond::GetY   const
 

Returns the Y component of the quaternion.

Returns:
double The Y component of the quaternion.
See also:
CSIBCQuaterniond::Get , CSIBCQuaterniond::Set , CSIBCQuaterniond::GetW , CSIBCQuaterniond::GetX , CSIBCQuaterniond::GetZ

double CSIBCQuaterniond::GetZ   const
 

Returns the Z component of the quaternion.

Returns:
double The Z component of the quaternion.
See also:
CSIBCQuaterniond::Get , CSIBCQuaterniond::Set , CSIBCQuaterniond::GetW , CSIBCQuaterniond::GetX , CSIBCQuaterniond::GetY

CSIBCQuaterniond & CSIBCQuaterniond::Invert void   
 

Sets this quaternion to its inverse. It is assumed that this quaternion is a unit quaternion.

Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Invert , CSIBCQuaterniond::Conjugate , CSIBCQuaterniond::Normalize

CSIBCQuaterniond & CSIBCQuaterniond::Invert const CSIBCQuaterniond &    in_quat
 

Sets this quaternion to the inverse of the unit quaternion in_quat. Since a unitary input quaternion is assumed, this function is equivalent to CSIBCQuaterniond::Conjugate(const CSIBCQuateriond &).

Parameters:
in_quat  Quaternion whose inverse contains the new values for this quaternion's components.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Invert , CSIBCQuaterniond::Conjugate , CSIBCQuaterniond::Normalize

bool CSIBCQuaterniond::IsIdentity  
 

Determines whether this quaternion is the identity quaternion (all components zero, except W is set to one). Note that this function uses exact equality comparison, thus the components must be their exact values.

Returns:
bool true if the quaternion is the identity quaternion, false otherwise.
See also:
CSIBCQuaterniond::SetIdentity

bool CSIBCQuaterniond::IsPure double    in_dEpsilon = PICO_EPS const
 

Determines whether this quaternion is a 'pure' quaternion. Pure quaternions have a zero scalar (W) component. Since this function uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison.

Parameters:
in_dEpsilon  Floating-point comparison error range. Defaults to PICO_EPS.
Returns:
bool true if the quaternion is pure, false otherwise.
See also:
CSIBCQuaterniond::IsIdentity

bool CSIBCQuaterniond::Ln CSIBCQuaterniond &    out_quat
 

Not implemented yet.

CSIBCQuaterniond & CSIBCQuaterniond::Mul const double    in_dFactor
 

Scales this quaternion by a factor of in_dFactor.

Parameters:
in_dFactor  Scaling factor to apply to this quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Mul

CSIBCQuaterniond & CSIBCQuaterniond::Mul const double    in_dFactor,
const CSIBCQuaterniond &    in_quat
 

Scales in_quat by a factor of in_dFactor, and stores the result in this quaternion.

Parameters:
in_quat  Quaternion to scale.
in_dFactor  Scaling factor for quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Mul

CSIBCQuaterniond & CSIBCQuaterniond::Mul const CSIBCQuaterniond &    in_quat,
const double    in_dFactor
 

Scales in_quat by a factor of in_dFactor, and stores the result in this quaternion.

Parameters:
in_quat  Quaternion to scale.
in_dFactor  Scaling factor for quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Mul

CSIBCQuaterniond & CSIBCQuaterniond::Mul const CSIBCQuaterniond &    in_quat,
const CSIBCVector3Dd   in_vectPureQuat
 

Computes the right-multiplication of the quaternion in_quat and the pure quaternion represented by in_quatPure (in_quat * in_quatPure), and stores the result in this quaternion.

Parameters:
in_quat  Quaternion for the multiplication (on the left).
in_quatPure  Vector representing the vector components of a pure quaternion (W component is zero), for the multiplication (on the right).
Returns:
CSIBCQuaterniond& Reference to this quaterion.
See also:
CSIBCQuaterniond::Mul

CSIBCQuaterniond & CSIBCQuaterniond::Mul const CSIBCVector3Dd   in_vectPureQuat,
const CSIBCQuaterniond &    in_quat
 

Computes the right-multiplication of the pure quaternion represented by in_quatPure, and the quaternion in_quat (in_quatPure * in_quat), and stores the result in this quaternion.

Parameters:
in_quatPure  Vector representing the vector components of a pure quaternion (W component is zero), for the multiplication (on the left).
in_quat  Quaternion for the multiplication (on the right).
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Mul

CSIBCQuaterniond & CSIBCQuaterniond::Mul const CSIBCQuaterniond &    in_quat
 

Computes the right-multiplication of this quaternion by in_quat (this * in_quat), and stores the result in this quaternion.

Parameters:
in_quat  Quaternion for the multiplication (on the right).
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Mul

CSIBCQuaterniond & CSIBCQuaterniond::Mul const CSIBCQuaterniond &    in_quat1,
const CSIBCQuaterniond &    in_quat2
 

Computes the right-multiplication of in_quat1 by in_quat2 (in_quat1 * in_quat2), and stores the result in this quaternion.

Parameters:
in_quat1  First quaternion for the multiplication (on the left).
in_quat2  Second quaternion for the multiplication (on the right).
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Mul

CSIBCQuaterniond & CSIBCQuaterniond::Negate void   
 

Negates all components of this quaternion.

Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Invert , CSIBCQuaterniond::Conjugate

CSIBCQuaterniond & CSIBCQuaterniond::Normalize  
 

Normalizes this quaternion to be a unit quaternion.

Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::GetLength , CSIBCQuaterniond::GetSquaredLength

bool CSIBCQuaterniond::operator!= const CSIBCQuaterniond &    in_quat const
 

Determines whether any of the components of this quaternion and in_quat are different. Note that this function does not use floating-point comparison error, thus any difference in component values will result in a true return value.

Parameters:
in_quat  Quaternion to compare inequality with.
Returns:
bool true if the quaternions are not equal, false if they are exactly equal.
See also:
CSIBCQuaterniond::operator== , CSIBCQuaterniond::AreAlmostEqual

bool CSIBCQuaterniond::operator== const CSIBCQuaterniond &    in_quat const
 

Determines whether each of the components of this quaternion and in_quat are exactly equal to each other.

Parameters:
in_quat  Quaternion to compare equality with.
Returns:
bool true if the quaternions are exactly equal, false otherwise.
See also:
CSIBCQuaterniond::AreAlmostEqual , CSIBCQuaterniond::operator!=

CSIBCQuaterniond & CSIBCQuaterniond::Set const CSIBCQuaterniond &    in_quat
 

Sets this quaternion's components equal to the components of in_quat.

Parameters:
in_quat  Quaternion
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Set , CSIBCQuaterniond::Get

CSIBCQuaterniond & CSIBCQuaterniond::Set const CSIBCVector3Dd   in_vct
 

Sets this quaternion's vector components from the corresponding components of in_vct. The scalar (W) component is set to zero.

Parameters:
in_vct  Vector containing new values for the quaternion's vector components.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Set , CSIBCQuaterniond::Get

CSIBCQuaterniond & CSIBCQuaterniond::Set const CSIBCVector4Dd   in_vct
 

Sets this quaternion's components from the corresponding components of in_vct.

Parameters:
in_vct  Vector containing new values for the quaternion's components.
Returns:
CSIBCQuateriond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Set , CSIBCQuaterniond::Get

CSIBCQuaterniond & CSIBCQuaterniond::Set const double    in_dW,
const double    in_dX,
const double    in_dY,
const double    in_dZ
 

Sets the quaternion values.

Parameters:
in_dW  New value for the W component of this quaternion.
in_dX  New value for the X component of this quaternion.
in_dY  New value for the Y component of this quaternion.
in_dZ  New value for the Z component of this quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Set , CSIBCQuaterniond::Get

CSIBCQuaterniond & CSIBCQuaterniond::SetIdentity  
 

Sets this quaternion to the identity quaternion (all components zero, except W is set to one).

Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::IsIdentity

CSIBCQuaterniond & CSIBCQuaterniond::SetW const double    in_dW
 

Sets the W (scalar) component of the quaternion.

Parameters:
in_dW  New value for the W component of the quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Set , CSIBCQuaterniond::Get , CSIBCQuaterniond::SetX , CSIBCQuaterniond::SetY , CSIBCQuaterniond::SetZ

CSIBCQuaterniond & CSIBCQuaterniond::SetX const double    in_dX
 

Sets the X component of the quaternion.

Parameters:
in_dX  NeX value for the X component of the quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Set , CSIBCQuaterniond::Get , CSIBCQuaterniond::SetW , CSIBCQuaterniond::SetY , CSIBCQuaterniond::SetZ

CSIBCQuaterniond & CSIBCQuaterniond::SetY const double    in_dY
 

Sets the Y component of the quaternion.

Parameters:
in_dY  NeY value for the Y component of the quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Set , CSIBCQuaterniond::Get , CSIBCQuaterniond::SetW , CSIBCQuaterniond::SetX , CSIBCQuaterniond::SetZ

CSIBCQuaterniond & CSIBCQuaterniond::SetZ const double    in_dZ
 

Sets the Z component of the quaternion.

Parameters:
in_dZ  NeZ value for the Z component of the quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Set , CSIBCQuaterniond::Get , CSIBCQuaterniond::SetW , CSIBCQuaterniond::SetX , CSIBCQuaterniond::SetY

CSIBCQuaterniond & CSIBCQuaterniond::Slerp const CSIBCQuaterniond &    in_quatStart,
const CSIBCQuaterniond &    in_quatEnd,
const double    in_dU
 

Computes the spherical linear interpolation of two unit quaternions, where in_quatStart and in_quatEnd are the starting and ending quaternions, respectively. The interpolation point bewteen the two vectors is given by in_dU, in the range [0.0f, 1.0f]. The interpolated quaternion is stored in this quaternion.

Parameters:
in_quatStart  Unit quaternion for the starting interpolation point.
in_quatEnd  Unit quaternion for the ending interpolation end.
in_dU  Interpolation point between in_quatStart and in_quatEnd. Must be in the range [0.0f, 1.0f].
Returns:
CSIBCQuaterniond& Reference to this quaternion.

CSIBCQuaterniond& CSIBCQuaterniond::Squad const CSIBCQuaterniond &    in_quatB0,
const CSIBCQuaterniond &    in_quatS1,
const CSIBCQuaterniond &    in_quatS2,
const CSIBCQuaterniond &    in_quatB3,
const double    in_dU,
const double    in_dT
 

Not implemented yet.

CSIBCQuaterniond & CSIBCQuaterniond::Sub const CSIBCQuaterniond &    in_quat1,
const CSIBCQuaterniond &    in_quat2
 

Subtracts in_quat2 from in_quat1 and stores the result in this quaterinon.

Parameters:
in_quat1  Quaternion for subtraction.
in_quat2  Quaternion to subtract from in_quat1.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Sub , CSIBCQuaterniond::Add

CSIBCQuaterniond & CSIBCQuaterniond::Sub const CSIBCQuaterniond &    in_quat
 

Subtracts in_quat from this quaternion.

Parameters:
in_quat  Quaternion to subtract from this quaternion.
Returns:
CSIBCQuaterniond& Reference to this quaternion.
See also:
CSIBCQuaterniond::Sub , CSIBCQuaterniond::Add


Friends And Related Function Documentation

bool AreAlmostEqual const CSIBCQuaterniond &    in_quat1,
const CSIBCQuaterniond &    in_quat2,
const double    in_dEpsilon = PICO_EPS
[friend]
 

Determines whether each of the components of in_quat1 and in_quat2 are equal to each other. Since this function uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison.

Parameters:
in_quat1  The first quaternion for equality comparison.
in_quat2  The second quaternion for equality comparison.
in_dEpsilon  Floating-point comparison error range. Defaults to PICO_EPS.
Returns:
bool true if the quaternions are equal, false otherwise.
See also:
CSIBCQuaterniond::operator== , CSIBCQuaterniond::operator!=

double GetDot const CSIBCQuaterniond &    in_quat1,
const CSIBCQuaterniond &    in_quat2
[friend]
 

Computes the dot product of in_quat1 and in_quat2.

Parameters:
in_quat1  First quaternion for the dot product.
in_quat2  Second quaternion for the dot product.
Returns:
double The dot product of in_quat1 and in_quat2.


The documentation for this class was generated from the following files: © Copyright 2001-2003 Avid Technology, Inc. All rights reserved.

© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.