Open Inventor Reference
SoRotor Class Reference

Animated rotation node. More...

#include <Inventor/nodes/SoRotor.h>

Inheritance diagram for SoRotor:
SoRotation SoTransformation SoNode SoFieldContainer SoBase

List of all members.

Public Member Functions

 SoRotor ()
 Creates a rotor node with default settings.

Static Public Member Functions

static void initClass ()
 Initializes base node class.

Public Attributes

Fields
SoSFFloat speed
 Defines the speed of the rotor, in revolutions per second.
SoSFBool on
 Allows applications to enable or disable the motion easily.

Protected Member Functions

virtual ~SoRotor ()

Detailed Description

The SoRotor class is derived from SoRotation, so it applies a rotation to the current transformation. Using engines connected to the realTime global field, the rotation value is animated over time, achieving a spinning effect. The period of the rotation can be adjusted by changing the speed field.

The current rotation at any time is available in the rotation field, inherited from SoRotation. This field can also be set to specify the axis of rotation. Note that unless a non-zero rotation is specified for the rotation, the node will not know which axis to use. For example, to set a rotor to spin about the y-axis, use the following:

rotor->rotation.setValue(axis, 0.1);

where axis is a vector containing (0,1,0). Any non-zero angle can be used in this code.

File Format/Default
Rotor {
  rotation 0 0 1 0
  speed 1
  on TRUE
}
Action Behavior
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction
Concatenates current rotation value with the current transformation matrix.
SoGetMatrixAction
Returns transformation matrix specified by the rotation.
See Also
SoPendulum, SoShuttle

Definition at line 111 of file SoRotor.h.


Constructor & Destructor Documentation

SoRotor::SoRotor ( )
virtual SoRotor::~SoRotor ( ) [protected, virtual]

Member Function Documentation

static void SoRotor::initClass ( ) [static]

Reimplemented from SoRotation.


Member Data Documentation

Definition at line 123 of file SoRotor.h.

Definition at line 120 of file SoRotor.h.


The documentation for this class was generated from the following file: