Package com.openinventor.inventor.nodes
Class SoPendulum
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoPendulum extends SoRotation
Animated oscillating rotation node. TheSoPendulumclass is derived fromSoRotation, 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 thespeedfield. The current rotation at any time is available in the rotation field, inherited fromSoRotationFile 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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFBoolonAllows applications to enable or disable the motion easily.SoSFRotationrotation0Defines the first of the two fixed rotations that are interpolated to create the pendular motion.SoSFRotationrotation1Defines the second of the two fixed rotations that are interpolated to create the pendular motion.SoSFFloatspeedDefines the speed of the pendulum, in cycles per second.-
Fields inherited from class com.openinventor.inventor.nodes.SoRotation
rotation
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoPendulum()Creates a pendulum node with default settings.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
rotation0
public final SoSFRotation rotation0
Defines the first of the two fixed rotations that are interpolated to create the pendular motion.
-
rotation1
public final SoSFRotation rotation1
Defines the second of the two fixed rotations that are interpolated to create the pendular motion.
-
speed
public final SoSFFloat speed
Defines the speed of the pendulum, in cycles per second.
-
on
public final SoSFBool on
Allows applications to enable or disable the motion easily.
-
-