Class: Fox::FXQuatf
Instance Attribute Summary
Attributes inherited from FXVec4f
Instance Method Summary (collapse)
-
- (Object) *(vec)
Compute the rotation of a vector vec by this quaternion; returns the rotated vector (a new FXVec3f instance).
-
- (Object) adjust!
Adjust quaternion length; returns a reference to self.
-
- (Object) arc!(a, b)
Construct a quaternion from arc a->b on unit sphere and return reference to self.
-
- (Object) conj
Return the conjugate of this quaternion (a new FXQuatf instance).
-
- (Object) exp
Return the exponentiation of this quaternion (a new FXQuatf instance).
-
- (Object) getAxes
Get quaternion axes as a 3-element array of FXVec3f instances.
-
- (Object) getAxisAngle
Return the rotation axis and angle for this quaternion, i.e.
-
- (Object) getRollPitchYaw
Obtain roll, pitch and yaw angles (in radians) from quaternion, e.g.
-
- (Object) getXAxis
Return the local x-axis as an FXVec3f instance.
-
- (Object) getYAxis
Return the local y-axis as an FXVec3f instance.
-
- (Object) getZAxis
Return the local z-axis as an FXVec3f instance.
-
- (FXQuatf) initialize(x, y, z, w)
constructor
Construct an FXQuatf from components.
-
- (Object) invert
Return the inverse of this quaternion (a new FXQuatf instance).
-
- (Object) lerp!(u, v, f)
Spherical lerp, return reference to self.
-
- (Object) log
Return the logarithm of this quaternion (a new FXQuatf instance).
-
- (Object) setAxes(ex, ey, ez)
Set quaternion from axes (where ex, ey and ez are FXVec3f instances).
-
- (Object) setAxisAngle(axis, phi = 0.0)
Set quaternion from rotation axis and angle.
-
- (Object) setRollPitchYaw(roll, pitch, yaw)
Set quaternion from yaw (z), pitch (y) and roll (x).
-
- (Object) unitinvert
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
- (FXQuatf) initialize(x, y, z, w)
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(x, y, z, w); end |
Instance Method Details
- (Object) *(vec)
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 *(vec); end |
- (Object) adjust!
Adjust quaternion length; returns a reference to self.
56 |
# File 'rdoc-sources/FXQuatf.rb', line 56 def adjust!; end |
- (Object) arc!(a, b)
Construct a quaternion from arc a->b on unit sphere and return reference to self.
Parameters:
a |
|
b |
160 |
# File 'rdoc-sources/FXQuatf.rb', line 160 def arc!(a, b); end |
- (Object) conj
Return the conjugate of this quaternion (a new FXQuatf instance).
134 |
# File 'rdoc-sources/FXQuatf.rb', line 134 def conj; end |
- (Object) exp
Return the exponentiation of this quaternion (a new FXQuatf instance).
114 |
# File 'rdoc-sources/FXQuatf.rb', line 114 def exp; end |
- (Object) getAxes
Get quaternion axes as a 3-element array of FXVec3f instances.
100 |
# File 'rdoc-sources/FXQuatf.rb', line 100 def getAxes(); end |
- (Object) getAxisAngle
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 |
- (Object) getRollPitchYaw
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 |
- (Object) getXAxis
Return the local x-axis as an FXVec3f instance.
103 |
# File 'rdoc-sources/FXQuatf.rb', line 103 def getXAxis(); end |
- (Object) getYAxis
Return the local y-axis as an FXVec3f instance.
106 |
# File 'rdoc-sources/FXQuatf.rb', line 106 def getYAxis(); end |
- (Object) getZAxis
Return the local z-axis as an FXVec3f instance.
109 |
# File 'rdoc-sources/FXQuatf.rb', line 109 def getZAxis(); end |
- (Object) invert
Return the inverse of this quaternion (a new FXQuatf instance).
124 |
# File 'rdoc-sources/FXQuatf.rb', line 124 def invert; end |
- (Object) lerp!(u, v, f)
171 |
# File 'rdoc-sources/FXQuatf.rb', line 171 def lerp!(u, v, f); end |
- (Object) log
Return the logarithm of this quaternion (a new FXQuatf instance).
119 |
# File 'rdoc-sources/FXQuatf.rb', line 119 def log; end |
- (Object) setAxes(ex, ey, ez)
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 |
- (Object) setAxisAngle(axis, phi = 0.0)
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 |
- (Object) setRollPitchYaw(roll, pitch, yaw)
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 |
- (Object) unitinvert
Invert unit quaternion (returns a new FXQuatf instance).
129 |
# File 'rdoc-sources/FXQuatf.rb', line 129 def unitinvert; end |