Package com.openinventor.inventor.nodes
Class SoRotor
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoRotor extends SoRotation
Animated rotation node. TheSoRotor
class 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, achieving a spinning effect. The period of the rotation can be adjusted by changing thespeed
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:
SoRotor rotor = new SoRotor(); rotor.rotation.setValue( new SbVec3f(0,1,0), 0.1f ); 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
-
-
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 SoSFBool
on
Allows applications to enable or disable the motion easily.SoSFFloat
speed
Defines the speed of the rotor, in revolutions 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 SoRotor()
Creates a rotor 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
-
-