#include <AnimationCamManip.h>
Inheritance diagram for nvui::AnimationCamManip:
Public Member Functions | |
NVSG_API | AnimationCamManip (void) |
Default Constructor. | |
virtual NVSG_API | ~AnimationCamManip (void) |
Default Destructor. | |
virtual NVSG_API void | apply () |
Apply the Trafo of the current animation step to the camera. | |
NVSG_API void | setAnimationFrame (size_t nFrame) |
Set the current animation frame. | |
NVSG_API void | setAnimation (const nvsg::Animation< nvmath::Trafo > *pAnimation) |
Set the Animation to use with this AnimationCamManip. | |
Protected Attributes | |
const nvsg::Animation< nvmath::Trafo > * | m_animation |
animation information | |
size_t | m_currentFrame |
current animationFrame |
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 }
|
Default Constructor.
|
|
Default Destructor.
If the AnimationCamManip holds an |
|
Apply the
Implements nvui::CameraManipulator. |
|
Set the current animation frame.
|
|
Set the
If this AnimationCamManip currently holds an
|
|
animation information
|
|
current animationFrame
|