SoPendulum — animated oscillating rotation node
Contents
Action Behavior
SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoRayPickAction
Concatenates interpolated rotation value with the current transformation matrix.
SoGetMatrixAction
Returns transformation matrix specified by the interpolated rotation.
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 SoRotationFields
SoSFRotationrotation0SoSFRotationrotation1
These define the two fixed rotations that are interpolated to create the pendular motion.
SoSFFloatspeed
Defines the speed of the pendulum, in cycles per second.
SoSFBoolon
Allows applications to enable or disable the motion easily.
File Format/Defaults
Pendulum{rotation0010rotation00010rotation10010speed1onTRUE}Inherits From
SoBase > SoFieldContainer > SoNode > SoTransformation > SoRotation > SoPendulum
Methods
SoPendulum()
Creates a pendulum node with default settings.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoPendulum — animated oscillating rotation node
See Also
SoRotor,SoShuttleSoPendulum(3IV)()
Synopsis
#include<Inventor/nodes/SoPendulum.h>
Fields from class SoPendulum:
SoSFRotationrotation0SoSFRotationrotation1SoSFFloatspeedSoSFBoolon
Fields from class SoRotation:
SoSFRotationrotation
Methods from class SoPendulum:
SoPendulum()staticSoTypegetClassTypeId()
Methods from class SoNode:
voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)
Methods from class SoFieldContainer:
voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)
Methods from class SoBase:
voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const