Open Inventor Reference
SoPendulum Class Reference

Animated oscillating rotation node. More...

#include <Inventor/nodes/SoPendulum.h>

Inheritance diagram for SoPendulum:
SoRotation SoTransformation SoNode SoFieldContainer SoBase

List of all members.

Public Member Functions

 SoPendulum ()
 Creates a pendulum node with default settings.

Static Public Member Functions

static void initClass ()
 Initializes base node class.

Public Attributes

Fields
SoSFRotation rotation0
 These define the two fixed rotations that are interpolated to create the pendular motion.
SoSFRotation rotation1
 These define the two fixed rotations that are interpolated to create the pendular motion.
SoSFFloat speed
 Defines the speed of the pendulum, in cycles per second.
SoSFBool on
 Allows applications to enable or disable the motion easily.

Protected Member Functions

virtual ~SoPendulum ()

Detailed Description

The SoPendulum 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 between two fixed rotations, achieving the effect of a swinging pendulum. The period of the swing can be adjusted by changing the speed field. The current rotation at any time is available in the rotation field, inherited from SoRotation

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

Definition at line 102 of file SoPendulum.h.


Constructor & Destructor Documentation

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

Member Function Documentation

static void SoPendulum::initClass ( ) [static]

Reimplemented from SoRotation.


Member Data Documentation

Definition at line 122 of file SoPendulum.h.

Definition at line 112 of file SoPendulum.h.

Definition at line 116 of file SoPendulum.h.

Definition at line 119 of file SoPendulum.h.


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