| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/behaviorcallback.h>

| VRS::BehaviorCallback::BehaviorCallback | ( | Callback * | activate = 0, |
|
| Callback * | deactivate = 0, |
|||
| Callback * | handleTimeEvent = 0, |
|||
| Callback * | handleCanvasEvent = 0, |
|||
| Callback * | handleSpaceMouseEvent = 0 | |||
| ) |
An `BehaviorCallback' node associates action objects with the activate method, deactivate method, time events, and canvas events of a behavior leaf node. Each action is optional. If set, the action is executed if its corresponding method gets invoked. An action associated with a behavior callback can inquire the current event and can set the next redraw flag explicitly.
| void VRS::BehaviorCallback::setActivateCallback | ( | Callback * | action | ) |
| void VRS::BehaviorCallback::setDeactivateCallback | ( | Callback * | action | ) |
| void VRS::BehaviorCallback::setTimeCallback | ( | Callback * | action | ) |
| void VRS::BehaviorCallback::setCanvasCallback | ( | Callback * | action | ) |
| void VRS::BehaviorCallback::setSpaceMouseCallback | ( | Callback * | action | ) |
| Callback * VRS::BehaviorCallback::getActivateCallback | ( | ) | const [inline] |
| Callback * VRS::BehaviorCallback::getDeactivateCallback | ( | ) | const [inline] |
| Callback * VRS::BehaviorCallback::getTimeCallback | ( | ) | const [inline] |
| Callback * VRS::BehaviorCallback::getCanvasCallback | ( | ) | const [inline] |
| Callback * VRS::BehaviorCallback::getSpaceMouseCallback | ( | ) | const [inline] |
Set/get the action objects.
| TimeEvent * VRS::BehaviorCallback::currentTimeEvent | ( | ) | [inline] |
| CanvasEvent * VRS::BehaviorCallback::currentCanvasEvent | ( | ) | [inline] |
| SpaceMouseEvent * VRS::BehaviorCallback::currentSpaceMouseEvent | ( | ) | [inline] |
| void VRS::BehaviorCallback::nextRedraw | ( | int | redrawCode | ) | [inline] |
`timeEvent' returns the current time event which has been responsible for executing the time action. `canvasEvent' returns the current canvas event which has been responsible for executing the canvas action. `spaceMouseEvent' returns the current spacemouse event which has been responsible for executing the spacemouse action. All three methods return NULL if no appropriate event has been received, or if the methods are called while no action is executed; i.e., the method should only be called by the execute method of an associated action. `nextRedraw' sets the redraw code used in the `handle' method. By default, it is set to `RedrawNothing'.
| virtual void VRS::BehaviorCallback::activate | ( | int | hint = BehaviorNode::NoHint |
) | [virtual] |
Reimplemented from VRS::BehaviorNode.
| virtual void VRS::BehaviorCallback::deactivate | ( | int | hint = BehaviorNode::NoHint |
) | [virtual] |
| virtual BehaviorNode::InvalidationHint VRS::BehaviorCallback::handle | ( | Event * | e | ) | [virtual] |
A behavior callback can handle time events and canvas events. `handle' checks for time and canvas events, and calls the associated time action or canvas action. No events are processed if the node is deactivated.
Implements VRS::BehaviorNode.
| VRS::BehaviorCallback::VRS_TYPEINFO | ( | BehaviorCallback | , | |
| LeafBehavior | ||||
| ) |