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

Public Member Functions | |
| RotateBarrel () | |
| CTOR. | |
| virtual void | operator() (osg::Node *node, osg::NodeVisitor *nv) |
| Functor for updating a node. | |
Protected Attributes | |
| double | myMaxAngle |
| The maximum angle the barrel will rise. | |
An update callback to manipulate a node during scene-graph updates.
This update callback is used to animate a tank-barrel by angling it over time. This callback should only be applied to a DOFTransform representing the barrel of a tank. During each update, this callback sets the pitch of the DOFTransform so the barrel appears to pitch up/down.
CTOR.
| virtual void RotateBarrel::operator() | ( | osg::Node * | node, |
| osg::NodeVisitor * | nv | ||
| ) | [virtual] |
Functor for updating a node.
This updater function pitches the barrel of the gun up/down using a sinusoidal wave over time to determine the barrel angle.
double RotateBarrel::myMaxAngle [protected] |
The maximum angle the barrel will rise.