< Zurück | Inhalt | Weiter >

processStimulus method

A simple Behavior can ignore the Enumeration passed to the processStimulus method—the Behavior knows why it was activated and can proceed to the application−specific code. A more complex or composite Behavior will have to query the Enumeration and first determine what mode it was activated in before it can execute the appropriate Behavior code.


Within the Behavior’s processStimulus code, the Behavior will call methods on the member variables it stored in the constructor. For example, the Behavior might call Transform3D methods and then call TransformGroup.setTransform to update the position or orientation of an object.


At the end of the processStimulus method, the Behavior will almost certainly call the wakeupOn method, with a previously stored WakeupCondition, to ensure that it receives continued notifications and is rescheduled for processing.



SwitchValueInterpolator


Interpolates between two Switch values, switching on the children of the Switch Node



TCBSplinePathInterpolator


Abstract base class for the Spline path Interpolators




RotPosScaleTCBSplinePathInterpolator

Performs cubic spline interpolation between key frames for the translation, rotation and scale of a TransformGroup


TransparencyInterpolator



Interpolates the transparency of a TransparencyAttribute between two values


KeyNavigatorBehavior



Simple keyboard navigation by modifying a TransformGroup in response to key presses


LOD



Abstract base class for LOD behaviors that modify a Switch Node



DistanceLOD


Selects child of the Switch Node based on distance from viewer

MouseBehavior



Abstract base class for the Mouse behaviors



MouseRotate


Modifies the rotational components of a TransformGroup based on mouse input



MouseTranslate


Modifies the translation components of a TransformGroup based on mouse input



MouseZoom


Modifies the scale components of a TransformGroup based on mouse input


PickMouseBehavior



Abstract base class for the mouse picking behaviors


PickRotateBehavior


Modifies the rotational components of a picked TransformGroup based