GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SBROTATION (3)

NAME

SbRotation — class for representing a rotation

CONTENTS

Inherits From
Synopsis
Description
Methods
File Format/defaults
Notes
See Also

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 *    
                    
const float *        getValue() const    
void    
                    
void                 getValue(float &q0, float &q1, float &q2, float &q3) const    
SbRotation &    
                    
SbRotation &         setValue(float q0, float q1, float q2, float q3)    
void    
                    
void                 getValue(SbVec3f &axis, float &radians) const    
void    
                    
void                 getValue(SbMatrix &matrix) const    
SbRotation &    
                    
SbRotation &         invert()    
SbRotation    
                    
SbRotation           inverse() const    
SbRotation &    
                    
SbRotation &         setValue(const float q[4])    
SbRotation &    
                    
SbRotation &         setValue(const SbMatrix &m)    
SbRotation &    
                    
SbRotation &         setValue(const SbVec3f &axis, float radians)    
SbRotation &    
                    
SbRotation &         setValue(const SbVec3f &rotateFrom, const SbVec3f &rotateTo)    
SbRotation &    
                    
SbRotation &         operator *=(const SbRotation &q)    
int    
                    
int                  operator ==(const SbRotation &q1, const SbRotation &q2)    
int    
                    
int                  operator !=(const SbRotation &q1, const SbRotation &q2)    
SbBool    
                    
SbBool               equals(const SbRotation &r, float tolerance) const    
SbRotation    
                    
SbRotation           operator *(const SbRotation &q1, const SbRotation &q2)    
void    
                    
void                 multVec(const SbVec3f &src, SbVec3f &dst) const    
void    
                    
void                 scaleAngle(float scaleFactor )    
static SbRotation    
                    
static SbRotation    slerp(const SbRotation &rot0, const SbRotation &rot1, float t)    
static SbRotation    
                    
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.

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 angle radians about the given axis. 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. The rotateFrom and rotateTo vectors are normalized by the constructor before calculating the rotation.

    const float *    
                    
const float *        getValue() const
Returns pointer to array of 4 components defining quaternion.

    void    
                    
void                 getValue(float &q0, float &q1, float &q2, float &q3) const
Returns 4 individual components of rotation quaternion.

    SbRotation &    
                    
SbRotation &         setValue(float q0, float q1, float q2, float q3)
Sets value of rotation from 4 individual components of a quaternion.

    void    
                    
void                 getValue(SbVec3f &axis, float &radians) const
Returns corresponding 3D rotation axis vector and angle in radians.

    void    
                    
void                 getValue(SbMatrix &matrix) const
Returns corresponding 4x4 rotation matrix.

    SbRotation &    
                    
SbRotation &         invert()
Changes a rotation to be its inverse.

    SbRotation    
                    
SbRotation           inverse() const
Returns the inverse of a rotation.

    SbRotation &    
                    
SbRotation &         setValue(const float q[4])
Sets value of rotation from array of 4 components of a quaternion.

    SbRotation &    
                    
SbRotation &         setValue(const SbMatrix &m)
Sets value of rotation from a rotation matrix.

    SbRotation &    
                    
SbRotation &         setValue(const SbVec3f &axis, float radians)
Sets value of vector from 3D rotation axis vector and angle in radians.

    SbRotation &    
                    
SbRotation &         setValue(const SbVec3f &rotateFrom, const SbVec3f &rotateTo)
Sets rotation to rotate one direction vector to another. The rotateFrom and rotateTo arguments are normalized before the rotation is calculated.

    SbRotation &    
                    
SbRotation &         operator *=(const SbRotation &q)
Multiplies by another rotation; results in product of rotations.

    int    
                    
int                  operator ==(const SbRotation &q1, const SbRotation &q2)    
int    
                    
int                  operator !=(const SbRotation &q1, const SbRotation &q2)
Equality comparison operators.

    SbBool    
                    
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    
                    
SbRotation           operator *(const SbRotation &q1, const SbRotation &q2)
Multiplication of two rotations; results in product of rotations.

    void    
                    
void                 multVec(const SbVec3f &src, SbVec3f &dst) const
Multiplies the given vector by the matrix of this rotation.

    void    
                    
void                 scaleAngle(float scaleFactor )
Keep the axis the same. Multiply the angle of rotation by the amount scaleFactor.

    static SbRotation    
                    
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.

    static SbRotation    
                    
static SbRotation    identity()
Returns a null rotation.

FILE FORMAT/DEFAULTS

NOTES

Rotations are stored internally as quaternions.

SEE ALSO

SbVec3f, SbMatrix

Search for    or go to Top of page |  Section 3 |  Main Index


SBROTATION(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.