Class: Fox::FXQuatf
Instance Attribute Summary
Attributes inherited from FXVec4f
Instance Method Summary collapse
-
#*(vec) ⇒ Object
Compute the rotation of a vector vec by this quaternion; returns the rotated vector (a new FXVec3f 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 reference to self.
-
#conj ⇒ Object
Return the conjugate of this quaternion (a new FXQuatf instance).
-
#exp ⇒ Object
Return the exponentiation of this quaternion (a new FXQuatf instance).
-
#getAxes ⇒ Object
Get quaternion axes as a 3-element array of FXVec3f 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
Return the local x-axis as an FXVec3f instance.
-
#getYAxis ⇒ Object
Return the local y-axis as an FXVec3f instance.
-
#getZAxis ⇒ Object
Return the local z-axis as an FXVec3f instance.
-
#initialize(x, y, z, w) ⇒ FXQuatf
constructor
Construct an FXQuatf from components.
-
#invert ⇒ Object
Return the inverse of this quaternion (a new FXQuatf instance).
-
#lerp!(u, v, f) ⇒ Object
Spherical lerp, return reference to self.
-
#log ⇒ Object
Return the logarithm of this quaternion (a new FXQuatf instance).
-
#setAxes(ex, ey, ez) ⇒ Object
Set quaternion from axes (where ex, ey and ez are FXVec3f 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 FXQuatf instance).
Methods inherited from FXVec4f
#+, #-, #-@, #/, #==, #[], #[]=, #clamp, #cross, #crosses?, #distance, #dot, #hi, #inspect, #length, #length2, #lo, #normalize, plane, #to_a, #to_s
Constructor Details
#initialize(x, y, z, w) ⇒ FXQuatf
Construct an FXQuatf from components.
Parameters:
x
-
x [Float]
y
-
y [Float]
z
-
z [Float]
width
-
w [Float]
4 |
# File 'rdoc-sources/FXQuatf.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 FXVec3f instance).
Parameters:
vec
-
the vector to be rotated Fox::FXVec3f
139 |
# File 'rdoc-sources/FXQuatf.rb', line 139 def *(other); end |
#adjust! ⇒ Object
Adjust quaternion length; returns a reference to self.
56 |
# File 'rdoc-sources/FXQuatf.rb', line 56 def adjust!; end |
#arc!(a, b) ⇒ Object
Construct a quaternion from arc a->b on unit sphere and return reference to self.
Parameters:
160 |
# File 'rdoc-sources/FXQuatf.rb', line 160 def arc!(a, b); end |
#conj ⇒ Object
Return the conjugate of this quaternion (a new FXQuatf instance).
134 |
# File 'rdoc-sources/FXQuatf.rb', line 134 def conj; end |
#exp ⇒ Object
Return the exponentiation of this quaternion (a new FXQuatf instance).
114 |
# File 'rdoc-sources/FXQuatf.rb', line 114 def exp; end |
#getAxes ⇒ Object
Get quaternion axes as a 3-element array of FXVec3f instances.
100 |
# File 'rdoc-sources/FXQuatf.rb', line 100 def getAxes(); end |
#getAxisAngle ⇒ Object
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.
76 |
# File 'rdoc-sources/FXQuatf.rb', line 76 def getAxisAngle(); end |
#getRollPitchYaw ⇒ Object
Obtain roll, pitch and yaw angles (in radians) from quaternion, e.g.
roll, pitch, yaw = aQuaternion.getRollPitchYaw()
94 |
# File 'rdoc-sources/FXQuatf.rb', line 94 def getRollPitchYaw(); end |
#getXAxis ⇒ Object
Return the local x-axis as an FXVec3f instance.
103 |
# File 'rdoc-sources/FXQuatf.rb', line 103 def getXAxis(); end |
#getYAxis ⇒ Object
Return the local y-axis as an FXVec3f instance.
106 |
# File 'rdoc-sources/FXQuatf.rb', line 106 def getYAxis(); end |
#getZAxis ⇒ Object
Return the local z-axis as an FXVec3f instance.
109 |
# File 'rdoc-sources/FXQuatf.rb', line 109 def getZAxis(); end |
#invert ⇒ Object
Return the inverse of this quaternion (a new FXQuatf instance).
124 |
# File 'rdoc-sources/FXQuatf.rb', line 124 def invert; end |
#lerp!(u, v, f) ⇒ Object
171 |
# File 'rdoc-sources/FXQuatf.rb', line 171 def lerp!(u, v, f); end |
#log ⇒ Object
Return the logarithm of this quaternion (a new FXQuatf instance).
119 |
# File 'rdoc-sources/FXQuatf.rb', line 119 def log; end |
#setAxes(ex, ey, ez) ⇒ Object
Set quaternion from axes (where ex, ey and ez are FXVec3f instances).
97 |
# File 'rdoc-sources/FXQuatf.rb', line 97 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::FXVec3f
angle
-
the rotation angle (in radians) [Float]
66 |
# File 'rdoc-sources/FXQuatf.rb', line 66 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]
87 |
# File 'rdoc-sources/FXQuatf.rb', line 87 def setRollPitchYaw(roll, pitch, yaw); end |
#unitinvert ⇒ Object
Invert unit quaternion (returns a new FXQuatf instance).
129 |
# File 'rdoc-sources/FXQuatf.rb', line 129 def unitinvert; end |