#include <Inventor/SbLinear.h>
Public Methods | |
SbRotation (void) | |
SbRotation (const SbVec3f &axis, const float radians) | |
SbRotation (const float q[4]) | |
SbRotation (const float q0, const float q1, const float q2, const float q3) | |
SbRotation (const SbMatrix &m) | |
SbRotation (const SbVec3f &rotateFrom, const SbVec3f &rotateTo) | |
const float * | getValue (void) const |
void | getValue (float &q0, float &q1, float &q2, float &q3) const |
SbRotation & | setValue (const float q0, const float q1, const float q2, const float q3) |
void | getValue (SbVec3f &axis, float &radians) const |
void | getValue (SbMatrix &matrix) const |
SbRotation & | invert (void) |
SbRotation | inverse (void) const |
SbRotation & | setValue (const float q[4]) |
SbRotation & | setValue (const SbMatrix &m) |
SbRotation & | setValue (const SbVec3f &axis, const float radians) |
SbRotation & | setValue (const SbVec3f &rotateFrom, const SbVec3f &rotateTo) |
SbRotation & | operator *= (const SbRotation &q) |
SbRotation & | operator *= (const float s) |
SbBool | equals (const SbRotation &r, const float tolerance) const |
void | multVec (const SbVec3f &src, SbVec3f &dst) const |
void | scaleAngle (const float scaleFactor) |
void | print (FILE *fp) const |
Static Public Methods | |
SbRotation | slerp (const SbRotation &rot0, const SbRotation &rot1, float t) |
SbRotation | identity (void) |
Friends | |
COIN_DLL_API int | operator== (const SbRotation &q1, const SbRotation &q2) |
COIN_DLL_API int | operator!= (const SbRotation &q1, const SbRotation &q2) |
COIN_DLL_API SbRotation | operator * (const SbRotation &q1, const SbRotation &q2) |
SbRotation is used extensively throughout the Coin library.
An SbRotation is stored internally as a quaternion for speed and storage reasons, but inquiries can be done to get and set axis and angle values for convenience.
|
The default constructor just initializes a valid rotation. The actual value is unspecified, and you should not depend on it. |
|
Construct a new SbRotation object initialized with the given axis-of-rotation and rotation angle. |
|
Construct a new SbRotation object initialized with the given quaternion components. The array must be ordered as follows: q[0] = x, q[1] = y, q[2] = z and q[3] = w, where the quaternion is specified by q=w+xi+yj+zk. |
|
Construct a new SbRotation object initialized with the given quaternion components. |
|
Construct a new SbRotation object initialized with the given rotation matrix. |
|
Construct a rotation which is the minimum rotation necessary to make vector rotateFrom point in the direction of vector rotateTo. |
|
Return pointer to an array with the rotation expressed as four quaternion values.
|
|
Return the four quaternion components representing the rotation.
|
|
Set the rotation.
|
|
Return the rotation in the form of an axis-of-rotation and a rotation angle.
|
|
Return this rotation in the form of a matrix.
|
|
Invert the rotation. Returns reference to self.
|
|
Non-destructively inverses the rotation and returns the result.
|
|
Reset the rotation by the four quaternions in the array.
|
|
Set the rotation from the components of the given matrix. Returns reference to self.
|
|
Reset rotation with the given axis-of-rotation and rotation angle. Returns reference to self. Make sure axis is not the null vector when calling this method.
|
|
Construct a rotation which is the minimum rotation necessary to make vector rotateFrom point in the direction of vector rotateTo. Returns reference to self.
|
|
Multiplies the quaternions. Note that order is important when combining quaternions with the multiplication operator. |
|
Multiplies components of quaternion with scalar value s. Returns reference to self. |
|
Check the internal quaternion representation vectors for equality within the given tolerance. |
|
Rotate the src vector and put the result in dst. |
|
Scale the angle of rotation by scaleFactor. |
|
Interpolates along the shortest path between the two rotation positions (from rot0 to rot1). Returns the SbRotation which will rotate rot0 the given part t of the spherical distance towards rot1, where t=0 will yield rot0 and t=1 will yield rot1. t should be in the interval [0, 1]. |
|
Returns an identity rotation. |
|
Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. |
|
Check if the two rotations are equal.
|
|
Check if the two rotations are unequal.
|
|
Multiplies the two rotations and returns the result. Note that order is important when combining quaternions with the multiplication operator. |