|
http://www.coin3d.org/ http://www.kongsberg.com/kogt/ |
The SoRotation class specifies a rotation transformation.Use nodes of this class type to re-orient geometry data within the scene graph. More...
#include <Inventor/nodes/SoRotation.h>
Public Member Functions | |
| SoRotation (void) | |
| virtual void | doAction (SoAction *action) |
| virtual void | GLRender (SoGLRenderAction *action) |
| virtual void | callback (SoCallbackAction *action) |
| virtual void | getBoundingBox (SoGetBoundingBoxAction *action) |
| virtual void | getMatrix (SoGetMatrixAction *action) |
| virtual void | pick (SoPickAction *action) |
| virtual void | getPrimitiveCount (SoGetPrimitiveCountAction *action) |
Static Public Member Functions | |
| static void | initClass (void) |
| Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. | |
Public Attributes | |
| SoSFRotation | rotation |
Protected Member Functions | |
| virtual | ~SoRotation () |
The SoRotation class specifies a rotation transformation.
Use nodes of this class type to re-orient geometry data within the scene graph.
See SoTransformation class documentation for a short usage example.
FILE FORMAT/DEFAULTS:
Rotation {
rotation 0 0 1 0
}
| SoRotation::SoRotation | ( | void | ) |
Constructor.
| SoRotation::~SoRotation | ( | ) | [protected, virtual] |
Destructor.
Rotation specification. Defaults to no rotation at all. See the SbRotation documentation for instructions on how to set the value of this field.
Note that there is one very common mistake that is easy to make when setting the value of a an SoSFRotation field, and that is to inadvertently use the wrong SbRotation constructor. This example should clarify the problem:
mytransformnode->rotation.setValue(0, 0, 1, 1.5707963f);
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:
mytransformnode->rotation.setValue(SbVec3f(0, 0, 1), 1.5707963f);
Another common problem is to set the rotation value to exactly 0.0, while wanting to store just a rotation angle in the field: rotations are internally handled as quaternions, and when converting from an angle and a rotation value to a quaternion representation, the information about the angle "gets lost" if there is no actual rotation.
Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated on Mon Nov 7 20:02:03 2011 for Coin by Doxygen 1.6.3.