< 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.


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


Abstract base class for the Spline path Interpolators


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


Interpolates the transparency of a TransparencyAttribute between two values


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


Abstract base class for LOD behaviors that modify a Switch Node


Selects child of the Switch Node based on distance from viewer


Abstract base class for the Mouse behaviors


Modifies the rotational components of a TransformGroup based on mouse input


Modifies the translation components of a TransformGroup based on mouse input


Modifies the scale components of a TransformGroup based on mouse input


Abstract base class for the mouse picking behaviors


Modifies the rotational components of a picked TransformGroup based