Class Fox::FXQuatf
In: rdoc-sources/FXQuatf.rb
Parent: FXVec4f

Methods

*   *   adjust!   arc!   conj   exp   getAxes   getAxisAngle   getRollPitchYaw   getXAxis   getYAxis   getZAxis   invert   lerp!   log   new   new   new   new   new   new   setAxes   setAxisAngle   setRollPitchYaw   unitinvert  

Public Class methods

Return an initialized FXQuatf instance.

Construct from Euler angles yaw (z), pitch (y) and roll (x).

Parameters:

roll:roll angle in radians [Float]
pitch:pitch angle in radians [Float]
yaw:yaw angle in radians [Float]

Construct an FXQuatf instance from a rotation axis and angle.

Parameters:

axis:the rotation axis [FXVec3f]
angle:the rotation angle (in radians) [Float]

Construct an FXQuatf from components.

Parameters:

x:x [Float]
y:y [Float]
z:z [Float]
width:w [Float]

Construct quaternion from axes

Parameters:

ex:x-axis [FXVec3f]
ey:y-axis [FXVec3f]
ez:z-axis [FXVec3f]

Construct quaternion from 3x3 matrix (where mat is an FXMat3f instance).

Public Instance methods

Return the product of this quaternion and other (another FXQuatf instance).

Compute the rotation of a vector vec by this quaternion; returns the rotated vector (a new FXVec3f instance).

Parameters:

vec:the vector to be rotated [FXVec3f]

Adjust quaternion length; returns a reference to self.

Construct a quaternion from arc a->b on unit sphere and return reference to self.

Parameters:

a:[FXVec3f]
b:[FXVec3f]

Return the conjugate of this quaternion (a new FXQuatf instance).

Return the exponentiation of this quaternion (a new FXQuatf instance).

Get quaternion axes as a 3-element array of FXVec3f instances.

Return the rotation axis and angle for this quaternion, i.e.

    axis, angle = aQuaternion.getAxisAngle()

where axis is an FXVec3f instance and angle is the angle of rotation in radians.

Obtain roll, pitch and yaw angles (in radians) from quaternion, e.g.

    roll, pitch, yaw = aQuaternion.getRollPitchYaw()

Return the local x-axis as an FXVec3f instance.

Return the local y-axis as an FXVec3f instance.

Return the local z-axis as an FXVec3f instance.

Return the inverse of this quaternion (a new FXQuatf instance).

Spherical lerp, return reference to self.

Parameters:

u:[FXQuatf]
v:[FXQuatf]
f:[Float]

Return the logarithm of this quaternion (a new FXQuatf instance).

Set quaternion from axes (where ex, ey and ez are FXVec3f instances).

Set quaternion from rotation axis and angle.

Parameters:

axis:the rotation axis [FXVec3f]
angle:the rotation angle (in radians) [Float]

Set quaternion from yaw (z), pitch (y) and roll (x).

Parameters:

roll:roll angle in radians [Float]
pitch:pitch angle in radians [Float]
yaw:yaw angle in radians [Float]

Invert unit quaternion (returns a new FXQuatf instance).

[Validate]