Click or drag to resize
SbRotation Structure
Class for representing a rotation. Object that stores a rotation. There are several ways to specify a rotation: quaternion (4 floats, in the order x, y, z, w), 4x4 rotation matrix, or axis and angle. All angles are in radians and all rotations are right-handed.

Namespace: OIV.Inventor
Assembly: OIV.Inventor.SbLinear (in OIV.Inventor.SbLinear.dll) Version: 2024.2.0.Release.b1c2f41e1719ac8d4c3f00435c0b4b040d8bfcc0
Syntax
public struct SbRotation

The SbRotation type exposes the following members.

Constructors
  NameDescription
Public methodSbRotation(Single)
Constructor for rotation.
Public methodSbRotation(SbMatrix)
Constructor for rotation.
Public methodSbRotation(SbMatrix)
Constructor for rotation.
Public methodSbRotation(SbVec3f, SbVec3f)
Constructors for rotation. The rotateFrom/To constructor defines rotation that rotates from one vector into another. The rotateFrom and rotateTo vectors are normalized by the constructor before calculating the rotation.
Public methodSbRotation(SbVec3f, Single)
Constructor for rotation.
Public methodSbRotation(SbVec3f, SbVec3f)
Constructors for rotation. The rotateFrom/To constructor defines rotation that rotates from one vector into another. The rotateFrom and rotateTo vectors are normalized by the constructor before calculating the rotation.
Public methodSbRotation(SbVec3f, Single)
Constructor for rotation.
Public methodSbRotation(Single, Single, Single, Single)
Constructor for rotation.
Top
Methods
  NameDescription
Public methodEquals(Object)
Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Object, Single)
Returns a value indicating whether this instance is equal to a specified object with given tolerance.
Public methodGetHashCode
Returns the hash code for the value of this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue(SbMatrix)
Gets corresponding 4x4 rotation matrix.
Public methodGetValue(SbMatrix3)
Gets corresponding 3x3 rotation matrix.
Public methodGetValue(SbMatrixd)
Gets corresponding 4x4 rotation matrix.
Public methodGetValue(SbVec3f, Single)
Gets corresponding 3D rotation axis vector and angle in radians.
Public methodGetValue(Single, Single, Single, Single)
Gets 4 individual components of rotation quaternion.
Public methodStatic memberIdentity
Returns a null rotation.
Public methodInverse
Returns the inverse of a rotation.
Public methodInvert
Changes a rotation to be its inverse.
Public methodMult(SbRotation)
Multiplies the matrix of this rotation by the rotation r.
Public methodMult(SbRotation)
Multiplies the matrix of this rotation by the rotation r.
Public methodMultVec(SbVec3f)
Multiplies the given vector by the matrix of this rotation.
Public methodMultVec(SbVec3f, SbVec3f)
Multiplies the given vector by the matrix of this rotation.
Public methodMultVec(SbVec3f, SbVec3f)
Multiplies the given vector by the matrix of this rotation.
Public methodScaleAngle
Keep the axis the same. Multiply the angle of rotation by the amount scaleFactor.
Public methodSetValue(Single)
Sets value of rotation from array of 4 components of a quaternion.
Public methodSetValue(SbMatrix)
Sets value of rotation from a rotation matrix.
Public methodSetValue(SbMatrix)
Sets value of rotation from a rotation matrix.
Public methodSetValue(SbMatrixd)
Sets rotation from a double precision rotation matrix.
Public methodSetValue(SbMatrixd)
Sets rotation from a double precision rotation matrix.
Public methodSetValue(SbRotationd)
Sets rotation from a double precision rotation.
Public methodSetValue(SbRotationd)
Sets rotation from a double precision rotation.
Public methodSetValue(SbVec3f, SbVec3f)
Sets rotation to rotate one direction vector to another. The rotateFrom and rotateTo arguments are normalized before the rotation is calculated.
Public methodSetValue(SbVec3f, Single)
Sets value of vector from 3D rotation axis vector and angle in radians.
Public methodSetValue(SbVec3f, SbVec3f)
Sets rotation to rotate one direction vector to another. The rotateFrom and rotateTo arguments are normalized before the rotation is calculated.
Public methodSetValue(SbVec3f, Single)
Sets value of vector from 3D rotation axis vector and angle in radians.
Public methodSetValue(Single, Single, Single, Single)
Sets value of rotation from 4 individual components of a quaternion.
Public methodStatic memberSlerp(SbRotation, SbRotation, Single)
Spherical linear interpolation: as t goes from 0 to 1, returned value goes from rot0 to rot1.
Public methodStatic memberSlerp(SbRotation, SbRotation, Single)
Spherical linear interpolation: as t goes from 0 to 1, returned value goes from rot0 to rot1.
Public methodToString
Converts this SbRotation structure to a human readable string.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
The equality operator.
Public operatorStatic member(SbRotation to SbMatrix)
Set a matrix from a SbRotation
Public operatorStatic member(SbRotation to SbMatrix3)
Set a matrix from a SbRotation
Public operatorStatic memberInequality
The inequality operator.
Public operatorStatic memberMultiply
The multiplication operator (*). Operated multiplication of two rotations; results in product of rotations.
Top
Remarks
Rotations are stored internally as quaternions.
See Also