VR-Vantage 2.3 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
RotateTurret Class Reference

An update callback to manipulate a node during scene-graph updates. More...

Inheritance diagram for RotateTurret:
Inheritance graph
[legend]

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 ( )

CTOR.

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:


Copyright © 2005-2018 VT MAK. All Rights Reserved (www.mak.com)