SBROTATION(3iv)
π SbRotation(3IV) π
okay so bestie, welcome to the SbRotation(3IV) manual page. it's giving rotations, it's giving quaternions, it's giving right-handed radians. no cap, we're keeping every single method and detail. periodt. π
πΈ NAME πΈ
SbRotation β class for representing a rotation
π¦ INHERITS FROM π¦
SbRotation
β¨ SYNOPSIS β¨
#include <Inventor/SbLinear.h>
Methods from class SbRotation:
SbRotation()
SbRotation(const SbVec3f &axis, float radians)
SbRotation(const float v[4])
SbRotation(float q0, float q1, float q2, float q3)
SbRotation(const SbMatrix &m)
SbRotation(const SbVec3f &rotateFrom, const SbVec3f
&rotateTo)
const float * getValue() const
void getValue(float &q0, float &q1, float &q2, float &q3)
const
SbRotation & setValue(float q0, float q1, float q2, float q3)
void getValue(SbVec3f &axis, float &radians) const
void getValue(SbMatrix &matrix) const
SbRotation & invert()
SbRotation inverse() const
SbRotation & setValue(const float q[4])
SbRotation & setValue(const SbMatrix &m)
SbRotation & setValue(const SbVec3f &axis, float radians)
SbRotation & setValue(const SbVec3f &rotateFrom, const SbVec3f
&rotateTo)
SbRotation & operator *=(const SbRotation &q)
int operator ==(const SbRotation &q1, const SbRotation
&q2)
int operator !=(const SbRotation &q1, const SbRotation
&q2)
SbBool equals(const SbRotation &r, float tolerance) const
SbRotation operator *(const SbRotation &q1, const SbRotation &q2)
void multVec(const SbVec3f &src, SbVec3f &dst) const
void scaleAngle(float scaleFactor )
static SbRotation slerp(const SbRotation &rot0, const SbRotation &rot1,
float t)
static SbRotation identity()
π DESCRIPTION π
Object that stores a rotation. There are several ways to specify a rotation: quaternion (4 floats), 4x4 rotation matrix, or axis and angle. All angles are in radians and all rotations are right-handed. that's the whole vibe, bestie. π
π METHODS π
SbRotation(),SbRotation(const SbVec3f &axis, float radians),SbRotation(const float v[4]),SbRotation(float q0, float q1, float q2, float q3),SbRotation(const SbMatrix &m),SbRotation(const SbVec3f &rotateFrom, const SbVec3f &rotateTo)β Constructors for rotation. The axis/radians constructor creates a rotation of angleradiansabout the givenaxis. The constructors that take four floats create a quaternion from those floats (careful, this differs from the four numbers in an axis/radian definition). Matrix constructor requires a valid rotation matrix. The rotateFrom/To constructor defines rotation that rotates from one vector into another. TherotateFromandrotateTovectors are normalized by the constructor before calculating the rotation.const float * getValue() constβ Returns pointer to array of 4 components defining quaternion.void getValue(float &q0, float &q1, float &q2, float &q3) constβ Returns 4 individual components of rotation quaternion.SbRotation & setValue(float q0, float q1, float q2, float q3)β Sets value of rotation from 4 individual components of a quaternion.void getValue(SbVec3f &axis, float &radians) constβ Returns corresponding 3D rotation axis vector and angle in radians.void getValue(SbMatrix &matrix) constβ Returns corresponding 4x4 rotation matrix.SbRotation & invert()β Changes a rotation to be its inverse.SbRotation inverse() constβ Returns the inverse of a rotation.SbRotation & setValue(const float q[4])β Sets value of rotation from array of 4 components of a quaternion.SbRotation & setValue(const SbMatrix &m)β Sets value of rotation from a rotation matrix.SbRotation & setValue(const SbVec3f &axis, float radians)β Sets value of vector from 3D rotation axis vector and angle in radians.SbRotation & setValue(const SbVec3f &rotateFrom, const SbVec3f &rotateTo)β Sets rotation to rotate one direction vector to another. TherotateFromandrotateToarguments are normalized before the rotation is calculated.SbRotation & operator *=(const SbRotation &q)β Multiplies by another rotation; results in product of rotations.int operator ==(const SbRotation &q1, const SbRotation &q2),int operator !=(const SbRotation &q1, const SbRotation &q2)β Equality comparison operators.SbBool equals(const SbRotation &r, float tolerance) constβ Equality comparison within given tolerance β the square of the length of the maximum distance between the two quaternion vectors.SbRotation operator *(const SbRotation &q1, const SbRotation &q2)β Multiplication of two rotations; results in product of rotations.void multVec(const SbVec3f &src, SbVec3f &dst) constβ Multiplies the given vector by the matrix of this rotation.void scaleAngle(float scaleFactor )β Keep the axis the same. Multiply the angle of rotation by the amountscaleFactor.static SbRotation slerp(const SbRotation &rot0, const SbRotation &rot1, float t)β Spherical linear interpolation: astgoes from 0 to 1, returned value goes fromrot0torot1.static SbRotation identity()β Returns a null rotation.
π«Ά NOTES π«Ά
Rotations are stored internally as quaternions. that's the internal tea. π«
π SEE ALSO π
SbVec3f, SbMatrix β go read those next, bestie.
okay bye bestie! this page was stamped at the bottom with SbRotation(3IV)() β that's the source/version, and no date is listed, so it's giving timeless. stay rotating. πβ¨π¦
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms