![]() |
VR-Forces 4.0.4 Class Documentation
|
An update callback to manipulate a node during scene-graph updates. More...

Public Member Functions | |
| RotateTurret () | |
| CTOR. | |
| virtual void | operator() (osg::Node *node, osg::NodeVisitor *nv) |
| Functor for updating a node. | |
Protected Attributes | |
| double | myRadsPerSecond |
| Angle to rotate the turret over one second. | |
| double | mySimTime |
| Save last frame time-stamp for calculation. | |
An update callback to manipulate a node during scene-graph updates.
This update callback is used to animate a tank-turret by rotating it over time. This callback should only be applied to a DOFTransform representing the turret of a tank. During each update, this callback increments the heading of the DOFTransform.
CTOR.
| virtual void RotateTurret::operator() | ( | osg::Node * | node, |
| osg::NodeVisitor * | nv | ||
| ) | [virtual] |
Functor for updating a node.
This updater function rotates the turret by incrementing the current heading by an amount relative to the time-slice since the last update.
double RotateTurret::myRadsPerSecond [protected] |
Angle to rotate the turret over one second.
double RotateTurret::mySimTime [protected] |
Save last frame time-stamp for calculation.