Class: Fox::FXQuatd
Instance Attribute Summary
Attributes inherited from FXVec4d
Instance Method Summary collapse
-
#*(vec) ⇒ Object
Compute the rotation of a vector vec by this quaternion; returns the rotated vector (a new FXVec3d instance).
-
#adjust! ⇒ Object
Adjust quaternion length; returns a reference to self.
-
#arc!(a, b) ⇒ Object
Construct a quaternion from arc a->b on unit sphere and return a reference to self.
-
#conj ⇒ Object
Return the conjugate of this quaternion (a new FXQuatd instance).
-
#exp ⇒ Object
Return the exponentiation of this quaternion (a new FXQuatd instance).
-
#getAxes ⇒ Object
Get quaternion axes; returns a 3-element array of FXVec3d instances.
-
#getAxisAngle ⇒ Object
Return the rotation axis and angle for this quaternion, i.e.
-
#getRollPitchYaw ⇒ Object
Obtain roll, pitch and yaw angles (in radians) from quaternion, e.g.
-
#getXAxis ⇒ Object
Obtain local x axis (an FXVec3d instance).
-
#getYAxis ⇒ Object
Obtain local y axis (an FXVec3d instance).
-
#getZAxis ⇒ Object
Obtain local z axis (an FXVec3d instance).
-
#initialize(ex, ey, ez) ⇒ FXQuatd
constructor
Construct quaternion from axes; ex, ey and ez are all FXVec3d instances.
-
#invert ⇒ Object
Return the inverse of this quaternion (a new FXQuatd instance).
-
#lerp!(u, v, f) ⇒ Object
Spherical lerp and return a reference to self.
-
#log ⇒ Object
Return the logarithm of this quaternion (a new FXQuatd instance).
-
#setAxes(ex, ey, ez) ⇒ Object
Set quaternion from axes; ex, ey and ez are all FXVec3d instances.
-
#setAxisAngle(axis, phi = 0.0) ⇒ Object
Set quaternion from rotation axis and angle.
-
#setRollPitchYaw(roll, pitch, yaw) ⇒ Object
Set quaternion from yaw (z), pitch (y) and roll (x).
-
#unitinvert ⇒ Object
Invert unit quaternion (returns a new FXQuatd instance).
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:
151 |
# File 'rdoc-sources/FXQuatd.rb', line 151 def arc!(a, b); end |
#conj ⇒ Object
Return the conjugate of this quaternion (a new FXQuatd instance).
125 |
# File 'rdoc-sources/FXQuatd.rb', line 125 def conj; end |
#exp ⇒ Object
Return the exponentiation of this quaternion (a new FXQuatd instance).
105 |
# File 'rdoc-sources/FXQuatd.rb', line 105 def exp; end |
#getAxes ⇒ Object
Get quaternion axes; returns a 3-element array of FXVec3d instances.
91 |
# File 'rdoc-sources/FXQuatd.rb', line 91 def getAxes(); end |
#getAxisAngle ⇒ Object
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 |
#getRollPitchYaw ⇒ Object
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 |
#getXAxis ⇒ Object
Obtain local x axis (an FXVec3d instance).
94 |
# File 'rdoc-sources/FXQuatd.rb', line 94 def getXAxis(); end |
#getYAxis ⇒ Object
Obtain local y axis (an FXVec3d instance).
97 |
# File 'rdoc-sources/FXQuatd.rb', line 97 def getYAxis(); end |
#getZAxis ⇒ Object
Obtain local z axis (an FXVec3d instance).
100 |
# File 'rdoc-sources/FXQuatd.rb', line 100 def getZAxis(); end |
#invert ⇒ Object
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
162 |
# File 'rdoc-sources/FXQuatd.rb', line 162 def lerp!(u, v, f); end |
#log ⇒ Object
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 |
#unitinvert ⇒ Object
Invert unit quaternion (returns a new FXQuatd instance).
120 |
# File 'rdoc-sources/FXQuatd.rb', line 120 def unitinvert; end |