Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

nvui::AnimationCamManip Class Reference

Animation Camera Manipulator Class. More...

#include <AnimationCamManip.h>

Inheritance diagram for nvui::AnimationCamManip:

Inheritance graph
[legend]
Collaboration diagram for nvui::AnimationCamManip:

Collaboration graph
[legend]
List of all members.

Public Methods

NVSG_API AnimationCamManip (void)
 Default Constructor. More...

virtual NVSG_API ~AnimationCamManip (void)
 Default Destructor. More...

virtual NVSG_API void apply ()
 Apply the Trafo of the current animation step to the camera. More...

NVSG_API void setAnimationFrame (size_t nFrame)
 Set the current animation frame. More...

NVSG_API void setAnimation (const nvsg::Animation< nvmath::Trafo > *pAnimation)
 Set the Animation to use with this AnimationCamManip. More...


Protected Attributes

const nvsg::Animation< nvmath::Trafo > * m_animation
 animation information. More...

size_t m_currentFrame
 current animationFrame. More...


Detailed Description

Animation Camera Manipulator Class.

This manipulator controls the camera while an Animation<Trafo> is playing. It converts any mouse input to camera control. A typical usage of an AnimationCamManip looks like this:

 animManip.setAnimation( &myTrafoAnimation );
 animManip.attach( &myCamera );
 while ( isAnimating )
 {
   curFrame = ((++curFrame) % myTrafoAnimation.getNumberOfFrames()) ? curFrame : 0;
   animManip.setAnimationFrame( curFrame );
   animManip.apply();
   // initiate a redraw here
 }
For further details on using an AnimationCamManip, see the AnimationViewer tutorial.


Constructor & Destructor Documentation

NVSG_API nvui::AnimationCamManip::AnimationCamManip void   
 

Default Constructor.

virtual NVSG_API nvui::AnimationCamManip::~AnimationCamManip void    [virtual]
 

Default Destructor.

If the AnimationCamManip holds an Animation<Trafo>, it is dereferenced.


Member Function Documentation

virtual NVSG_API void nvui::AnimationCamManip::apply   [virtual]
 

Apply the Trafo of the current animation step to the camera.

Implements nvui::CameraManipulator.

void nvui::AnimationCamManip::setAnimationFrame size_t    nFrame [inline]
 

Set the current animation frame.

Parameters:
nFrame  index of the animation frame

NVSG_API void nvui::AnimationCamManip::setAnimation const nvsg::Animation< nvmath::Trafo > *    pAnimation
 

Set the Animation to use with this AnimationCamManip.

If this AnimationCamManip currently holds an Animation<Trafo>, it's dereferenced. pAnimation is set as the current Animation<Trafo>. If it's not NULL, it is referenced. To "reset" the Animation, use NULL as the argument.

Parameters:
pAnimation  pointer to an Animation


Member Data Documentation

const nvsg::Animation<nvmath::Trafo>* nvui::AnimationCamManip::m_animation [protected]
 

animation information.

size_t nvui::AnimationCamManip::m_currentFrame [protected]
 

current animationFrame.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:42 2005 for NVSGSDK by NVIDIA