Coin
4.0.3
Coin3D core library
|
The SoSFRotation class is a container for an SbRotation. More...
#include <Inventor/fields/SoSFRotation.h>
Static Public Member Functions | |
static void * | createInstance (void) |
static SoType | getClassTypeId (void) |
static void | initClass (void) |
Static Public Member Functions inherited from SoSField | |
static void | atexit_cleanup (void) |
static SoType | getClassTypeId (void) |
static void | initClass (void) |
Static Public Member Functions inherited from SoField | |
static void | cleanupClass (void) |
static SoType | getClassTypeId (void) |
static void | initClass (void) |
static void | initClasses (void) |
Protected Attributes | |
SbRotation | value |
Additional Inherited Members | |
Public Types inherited from SoField | |
enum | FieldType { NORMAL_FIELD = 0 , EVENTIN_FIELD , EVENTOUT_FIELD , EXPOSED_FIELD } |
Protected Member Functions inherited from SoSField | |
SoSField (void) | |
Protected Member Functions inherited from SoField | |
SoField (void) | |
virtual SoNotRec | createNotRec (SoBase *cont) |
virtual void | evaluateConnection (void) const |
SbBool | isDestructing (void) const |
virtual SbBool | readConnection (SoInput *in) |
void | valueChanged (SbBool resetdefault=TRUE) |
virtual void | writeConnection (SoOutput *out) const |
The SoSFRotation class is a container for an SbRotation.
This field is used where nodes, engines or other field containers need to store a single rotation definition.
Fields of this type stores their value to file as a rotation axis vector plus a rotation angle: "axis0 axis1 axis2 angle".
Note that there is one very common mistake that is easy to make when setting the value of an SoSFRotation field, and that is to inadvertently use the wrong SbRotation constructor. This example should clarify the problem:
The programmer clearly tries to set a PI/2 rotation around the Z axis, but this will fail, as the SbRotation constructor invoked above is the one that takes as arguments the 4 floats of a quaternion. What the programmer almost certainly wanted to do was to use the SbRotation constructor that takes a rotation vector and a rotation angle, which is invoked like this:
Copy value(s) from f into this field. f must be of the same type as this field.
Implements SoField.
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Creates a new instance of the class type corresponding to the SoType object.
This static method returns the SoType object associated with objects of this class.
Return value of rotation as an axis and an angle around this axis.
Internal method called upon initialization of the library (from SoDB::init()) to set up the type system.
Check for equal type and value(s).
Implements SoField.
Set the rotation from a set of quaternion values.
Set the rotation from an axis and an angle around this axis.