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.
|
Detailed Description
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.
- Examples
-
Constructor & Destructor Documentation
| RotateTurret::RotateTurret |
( |
| ) |
|
Member Function Documentation
| 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.
Member Data Documentation
| double RotateTurret::myRadsPerSecond |
|
protected |
Angle to rotate the turret over one second.
| double RotateTurret::mySimTime |
|
protected |
Save last frame time-stamp for calculation.
The documentation for this class was generated from the following file: