DzQuat Class Reference
[Basic Objects]

A quaternion rotation class. More...

List of all members.

Properties

Number w
Number x
Number y
Number z

Constructors

 DzQuat (Number q0, Number q1, Number q2, Number q3)
 DzQuat (DzQuat quat)
 DzQuat ()

Methods

DzVec3 getValue (Number axis0, Number axis1, Number axis2)
DzVec3 getXAxis ()
DzVec3 getYAxis ()
DzVec3 getZAxis ()
DzQuat inverse ()
void invert ()
Boolean isIdentity ()
void makeClosest (DzQuat rot)
void makeIdentity ()
DzQuat multiply (DzQuat rot)
DzVec3 multVec (DzVec3 vec)
void normalize ()
void scaleAngle (Number scaleFactor)
void setValue (Number axis0, Number axis1, Number axis2, DzVec3 angles)
void setValue (Number axis, Number radians)
void setValue (DzVec3 axis, Number radians)
void setValue (Number q0, Number q1, Number q2, Number q3)


Detailed Description

A quaternion rotation class.


Constructor & Destructor Documentation

DzQuat::DzQuat (  ) 

Default Contructor. Creates an uninitialized quaternion

DzQuat::DzQuat ( DzQuat  quat  ) 

Copy Contructor.

DzQuat::DzQuat ( Number  q0,
Number  q1,
Number  q2,
Number  q3 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Initialize with 4-component quaternion.


Member Function Documentation

DzVec3 DzQuat::getValue ( Number  axis0,
Number  axis1,
Number  axis2 
)

Returns:
The Euler angles representing this rotation given the rotation order (axis0, axis1, axis2)

DzVec3 DzQuat::getXAxis (  ) 

Returns:
The X axis that corresponds to the local coordinate frame of this rotation (the rotated coordinate axes)

DzVec3 DzQuat::getYAxis (  ) 

Returns:
The Y axis that corresponds to the local coordinate frame of this rotation (the rotated coordinate axes)

DzVec3 DzQuat::getZAxis (  ) 

Returns:
The Z axis that corresponds to the local coordinate frame of this rotation (the rotated coordinate axes)

DzQuat DzQuat::inverse (  ) 

Returns:
The inverse of the rotation.

void DzQuat::invert (  ) 

Sets the quaternion to its inverse.

Boolean DzQuat::isIdentity (  ) 

Returns:
True if the quaternion is the identity quaternion.

void DzQuat::makeClosest ( DzQuat  rot  ) 

Makes sure that this rotation lies on the same side of the hypershpere as the one given. If not, it is altered to do so.

void DzQuat::makeIdentity (  ) 

Sets the quaternion to the identity quaternion.

DzQuat DzQuat::multiply ( DzQuat  rot  ) 

Returns:
The result of post-multiplying this quat by the given quat.

DzVec3 DzQuat::multVec ( DzVec3  vec  ) 

Returns:
The result of multiplying the given vector through the quaternion.

void DzQuat::normalize (  ) 

Normalizes the quaternion.

void DzQuat::scaleAngle ( Number  scaleFactor  ) 

Keep the axis the same. Multiply the angle of rotation by the amount 'scaleFactor'

void DzQuat::setValue ( Number  axis0,
Number  axis1,
Number  axis2,
DzVec3  angles 
)

Sets the quaternion to a rotation of angles around each axis given the rotation order (axis0, axis1, axis2) where axis == 0:x, 1:y, 2:z

void DzQuat::setValue ( Number  axis,
Number  radians 
)

Sets the quaternion to a rotation of radians around the given axis ( axis == 0:x, 1:y, 2:z )

void DzQuat::setValue ( DzVec3  axis,
Number  radians 
)

Sets the quaternion to a rotation of radians around the given axis

void DzQuat::setValue ( Number  q0,
Number  q1,
Number  q2,
Number  q3 
)

Sets the quaternion to the given values


Member Data Documentation

Number DzQuat::w

The w value of the quaternion.

Number DzQuat::x

The x value of the quaternion.

Number DzQuat::y

The y value of the quaternion.

Number DzQuat::z

The z value of the quaternion.


Generated on Thu Sep 24 12:21:14 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.