VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
RotateBarrel Class Reference

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

Inheritance diagram for RotateBarrel:
Inheritance graph
[legend]

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.

Detailed Description

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.

Examples

Constructor & Destructor Documentation

RotateBarrel::RotateBarrel ( )

CTOR.

Member Function Documentation

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.

Member Data Documentation

double RotateBarrel::myMaxAngle
protected

The maximum angle the barrel will rise.


The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)