133 {
setValue(0.0f, 0.0f, 0.0f, 1.0f);}
192 float &q2,
float &q3)
const;
284 {
return !(q1 == q2); }
319 {
return SbRotation(0.0f, 0.0f, 0.0f, 1.0f); }
322 mutable float quat[4];
328 void normalize()
const;
491 double &q2,
double &q3)
const;
583 {
return !(q1 == q2); }
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 4x4 matrix class...
Class for representing a rotation.
SbRotation & setValue(const SbRotationd &rotated)
Sets rotation from a double precision rotation.
friend int operator==(const SbRotation &q1, const SbRotation &q2)
Equality comparison operator.
SbRotation & setValue(const SbVec3f &rotateFrom, const SbVec3f &rotateTo)
Sets rotation to rotate one direction vector to another.
SbRotation()
Default constructor.
static SbRotation slerp(const SbRotation &rot0, const SbRotation &rot1, float t)
Spherical linear interpolation: as t goes from 0 to 1, returned value goes from rot0 to rot1.
void getValue(SbMatrix &matrix) const
Returns corresponding 4x4 rotation matrix.
SbRotation(const SbMatrix3 &m)
Constructor.
SbRotation & setValue(const SbMatrix &m)
Sets value of rotation from a rotation matrix.
SbRotation & setValue(const float q[4])
Sets value of rotation from array of 4 components of a quaternion.
void getValue(SbMatrix3 &matrix) const
Returns corresponding 3x3 rotation matrix.
void getValue(SbVec3f &axis, float &radians) const
Returns corresponding 3D rotation axis vector and angle in radians.
SbRotation & operator*=(const SbRotation &q)
Multiplies by another rotation; results in product of rotations.
SbRotation(const SbVec3f &rotateFrom, const SbVec3f &rotateTo)
Constructor.
friend int operator!=(const SbRotation &q1, const SbRotation &q2)
Inequality comparison operator.
SbRotation(float q0, float q1, float q2, float q3)
Constructor.
SbRotation & setValue(float q0, float q1, float q2, float q3)
Sets value of rotation from 4 individual components of a quaternion.
SbRotation & setValue(const SbMatrixd &md)
Sets rotation from a double precision rotation matrix.
SbRotation & setValue(const SbVec3f &axis, float radians)
Sets value of vector from 3D rotation axis vector and angle in radians.
friend SbRotation operator*(const SbRotation &q1, const SbRotation &q2)
Multiplication of two rotations; results in product of rotations.
void scaleAngle(float scaleFactor)
Keep the axis the same.
void multVec(const SbVec3f &src, SbVec3f &dst) const
Multiplies the given vector by the matrix of this rotation.
SbBool equals(const SbRotation &r, float tolerance) const
Equality comparison within given tolerance - the square of the length of the maximum distance between...
SbRotation(const SbVec3f &axis, float radians)
Constructor.
SbRotation(const SbMatrix &m)
Constructor.
void getValue(float &q0, float &q1, float &q2, float &q3) const
Returns 4 individual components of rotation quaternion.
SbRotation(const float v[4])
Constructor.
SbRotation & invert()
Changes a rotation to be its inverse.
void getValue(SbMatrixd &matrix) const
Returns corresponding 4x4 rotation matrix.
const float * getValue() const
Returns pointer to array of 4 components defining quaternion.
SbRotation inverse() const
Returns the inverse of a rotation.
static SbRotation identity()
Returns a null rotation.
SbRotation & setValue(const SbMatrix3 &m)
Sets rotation from a 3x3 rotation matrix.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for repres...
SbRotationd & operator*=(const SbRotationd &q)
Multiplies by another rotation; results in product of rotations.
SbRotationd(const SbVec3d &axis, double radians)
Constructor.
SbRotationd & setValue(const SbRotation &rotate)
Sets rotation from a single precision rotation.
SbRotationd()
Constructor for rotation.
void multVec(const SbVec3d &src, SbVec3d &dst) const
Multiplies the given vector by the matrix of this rotation.
static SbRotationd slerp(const SbRotationd &rot0, const SbRotationd &rot1, double t)
Spherical linear interpolation: as t goes from 0 to 1, returned value goes from rot0 to rot1.
void getValue(SbMatrix &matrix) const
Returns corresponding 4x4 rotation matrix.
SbRotationd & setValue(const SbMatrix &m)
Sets rotation from a single precision rotation matrix.
friend int operator==(const SbRotationd &q1, const SbRotationd &q2)
Equality comparison operator.
SbRotationd(double q0, double q1, double q2, double q3)
Constructor.
void getValue(SbMatrix3 &matrix) const
Returns corresponding 3x3 rotation matrix.
SbRotationd & setValue(const SbVec3d &rotateFrom, const SbVec3d &rotateTo)
Sets rotation to rotate one direction vector to another.
SbRotationd(const SbVec3d &rotateFrom, const SbVec3d &rotateTo)
Constructor.
void scaleAngle(double scaleFactor)
Keep the axis the same.
friend int operator!=(const SbRotationd &q1, const SbRotationd &q2)
Inequality comparison operator.
SbRotationd(const double v[4])
Constructor.
SbRotationd & setValue(const SbVec3d &axis, double radians)
Sets value of vector from 3D rotation axis vector and angle in radians.
SbRotationd & setValue(const SbMatrix3 &m)
Sets rotation from a 3x3 rotation matrix.
SbRotationd & setValue(const SbMatrixd &m)
Sets value of rotation from a rotation matrix.
SbRotationd & setValue(double q0, double q1, double q2, double q3)
Sets value of rotation from 4 individual components of a quaternion.
SbRotationd(const SbMatrix3 &m)
Constructor.
SbRotationd(const SbMatrixd &m)
Constructor.
friend SbRotationd operator*(const SbRotationd &q1, const SbRotationd &q2)
Multiplication of two rotations; results in product of rotations.
void getValue(double &q0, double &q1, double &q2, double &q3) const
Returns 4 individual components of rotation quaternion.
SbBool equals(const SbRotationd &r, double tolerance) const
Equality comparison within given tolerance - the square of the length of the maximum distance between...
static SbRotationd identity()
Returns a null rotation.
void getValue(SbMatrixd &matrix) const
Returns corresponding 4x4 rotation matrix.
void getValue(SbVec3d &axis, double &radians) const
Returns corresponding 3D rotation axis vector and angle in radians.
SbRotationd inverse() const
Returns the inverse of a rotation.
SbRotationd & invert()
Changes a rotation to be its inverse.
const double * getValue() const
Returns pointer to array of 4 components defining quaternion.
SbRotationd & setValue(const double q[4])
Sets value of rotation from array of 4 components of a quaternion.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D vector class ...