Class: Fox::FXQuatf

Inherits:
FXVec4f show all
Defined in:
rdoc-sources/FXQuatf.rb

Instance Attribute Summary

Attributes inherited from FXVec4f

#w, #x, #y, #z

Instance Method Summary collapse

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:

a

Fox::FXVec3f

b

Fox::FXVec3f



160
# File 'rdoc-sources/FXQuatf.rb', line 160

def arc!(a, b); end

#conjObject

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



134
# File 'rdoc-sources/FXQuatf.rb', line 134

def conj; end

#expObject

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



114
# File 'rdoc-sources/FXQuatf.rb', line 114

def exp; end

#getAxesObject

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



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

def getAxes(); end

#getAxisAngleObject

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

#getRollPitchYawObject

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

#getXAxisObject

Return the local x-axis as an FXVec3f instance.



103
# File 'rdoc-sources/FXQuatf.rb', line 103

def getXAxis(); end

#getYAxisObject

Return the local y-axis as an FXVec3f instance.



106
# File 'rdoc-sources/FXQuatf.rb', line 106

def getYAxis(); end

#getZAxisObject

Return the local z-axis as an FXVec3f instance.



109
# File 'rdoc-sources/FXQuatf.rb', line 109

def getZAxis(); end

#invertObject

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

Spherical lerp, return reference to self.

Parameters:

u

Fox::FXQuatf

v

Fox::FXQuatf

f
Float


171
# File 'rdoc-sources/FXQuatf.rb', line 171

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

#logObject

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

#unitinvertObject

Invert unit quaternion (returns a new FXQuatf instance).



129
# File 'rdoc-sources/FXQuatf.rb', line 129

def unitinvert; end