Class: Fox::FXQuatd

Inherits:
FXVec4d show all
Defined in:
rdoc-sources/FXQuatd.rb

Instance Attribute Summary

Attributes inherited from FXVec4d

#w, #x, #y, #z

Instance Method Summary collapse

Methods inherited from FXVec4d

#+, #-, #-@, #/, #==, #[], #[]=, #clamp, #cross, #crosses?, #distance, #dot, #hi, #inspect, #length, #length2, #lo, #normalize, plane, #to_a, #to_s

Constructor Details

#initialize(ex, ey, ez) ⇒ FXQuatd

Construct quaternion from axes; ex, ey and ez are all FXVec3d instances.



4
# File 'rdoc-sources/FXQuatd.rb', line 4

def initialize; end

Instance Method Details

#*(vec) ⇒ Object

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

Parameters:

vec

the vector to be rotated Fox::FXVec3d



130
# File 'rdoc-sources/FXQuatd.rb', line 130

def *(other); end

#adjust!Object

Adjust quaternion length; returns a reference to self.



47
# File 'rdoc-sources/FXQuatd.rb', line 47

def adjust!; end

#arc!(a, b) ⇒ Object

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

Parameters:

a

Fox::FXVec3d

b

Fox::FXVec3d



151
# File 'rdoc-sources/FXQuatd.rb', line 151

def arc!(a, b); end

#conjObject

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



125
# File 'rdoc-sources/FXQuatd.rb', line 125

def conj; end

#expObject

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



105
# File 'rdoc-sources/FXQuatd.rb', line 105

def exp; end

#getAxesObject

Get quaternion axes; returns a 3-element array of FXVec3d instances.



91
# File 'rdoc-sources/FXQuatd.rb', line 91

def getAxes(); end

#getAxisAngleObject

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

axis, angle = aQuaternion.getAxisAngle()

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



67
# File 'rdoc-sources/FXQuatd.rb', line 67

def getAxisAngle(); end

#getRollPitchYawObject

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

roll, pitch, yaw = aQuaternion.getRollPitchYaw()


85
# File 'rdoc-sources/FXQuatd.rb', line 85

def getRollPitchYaw(); end

#getXAxisObject

Obtain local x axis (an FXVec3d instance).



94
# File 'rdoc-sources/FXQuatd.rb', line 94

def getXAxis(); end

#getYAxisObject

Obtain local y axis (an FXVec3d instance).



97
# File 'rdoc-sources/FXQuatd.rb', line 97

def getYAxis(); end

#getZAxisObject

Obtain local z axis (an FXVec3d instance).



100
# File 'rdoc-sources/FXQuatd.rb', line 100

def getZAxis(); end

#invertObject

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



115
# File 'rdoc-sources/FXQuatd.rb', line 115

def invert; end

#lerp!(u, v, f) ⇒ Object

Spherical lerp and return a reference to self.

Parameters:

u

Fox::FXQuatd

v

Fox::FXQuatd

f
Float


162
# File 'rdoc-sources/FXQuatd.rb', line 162

def lerp!(u, v, f); end

#logObject

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



110
# File 'rdoc-sources/FXQuatd.rb', line 110

def log; end

#setAxes(ex, ey, ez) ⇒ Object

Set quaternion from axes; ex, ey and ez are all FXVec3d instances.



88
# File 'rdoc-sources/FXQuatd.rb', line 88

def setAxes(ex, ey, ez); end

#setAxisAngle(axis, phi = 0.0) ⇒ Object

Set quaternion from rotation axis and angle.

Parameters:

axis

the rotation axis Fox::FXVec3d

angle

the rotation angle (in radians) [Float]



57
# File 'rdoc-sources/FXQuatd.rb', line 57

def setAxisAngle(axis, phi=0.0); end

#setRollPitchYaw(roll, pitch, yaw) ⇒ Object

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]



78
# File 'rdoc-sources/FXQuatd.rb', line 78

def setRollPitchYaw(roll, pitch, yaw); end

#unitinvertObject

Invert unit quaternion (returns a new FXQuatd instance).



120
# File 'rdoc-sources/FXQuatd.rb', line 120

def unitinvert; end