Generates MPEG output that tracks camera motion. More...
#include <Inventor/MPEG/SoMPEGNavRenderer.h>
Classes | |
struct | CamPosition |
Public Member Functions | |
SoMPEGNavRenderer (SoNode *node) | |
virtual | ~SoMPEGNavRenderer () |
virtual void | setSceneGraph (SoNode *node) |
virtual void | record () |
virtual void | stop () |
void | adjustNumFramesPerSecond (SbBool flag) |
SbBool | isAdjustedNumFramesPerSecond () const |
void | setCamera (SoCamera *camera) |
SoCamera * | getCamera () |
This class generates MPEG output that tracks (i.e. follows) camera motion -- specifically changes in the position, orientation, nearDistance, and farDistance fields. These are the fields that can be modified by mouse movements within a viewer.
After SoMPEGNavRenderer::record() is called, all camera movements are recorded until SoMPEGNavRenderer::stop() is called. At that time, frames corresponding to each camera movement are rendered and stored in the MPEG output.
See the parent class SoMPEGRenderer for methods to specify the file and recording parameters.
SoMPEGRenderer, SoMPEGFrameRenderer
SoMPEGNavRenderer::SoMPEGNavRenderer | ( | SoNode * | node | ) |
Constructor.
The method SoMPEGRenderer::setSceneGraph() is called with the given argument. The specified scene graph must contain a camera in order to produce correct results.
virtual SoMPEGNavRenderer::~SoMPEGNavRenderer | ( | ) | [virtual] |
Destructor.
void SoMPEGNavRenderer::adjustNumFramesPerSecond | ( | SbBool | flag | ) |
Specifies whether the camera movements are adjusted to the number of frames per second.
Default is FALSE.
SoCamera* SoMPEGNavRenderer::getCamera | ( | ) |
Returns the camera currently used by the MPEG renderer.
SbBool SoMPEGNavRenderer::isAdjustedNumFramesPerSecond | ( | ) | const |
Returns whether the camera movements are adjusted to the number of frames per second.
virtual void SoMPEGNavRenderer::record | ( | ) | [virtual] |
Starts recording camera movements.
All camera movements are recorded until stop() is called.
Reimplemented from SoMPEGRenderer.
void SoMPEGNavRenderer::setCamera | ( | SoCamera * | camera | ) |
Specifies the camera to be used by the MPEG renderer.
Setting the camera is only needed if the first camera found in the scene isn't the one that should be used.
virtual void SoMPEGNavRenderer::setSceneGraph | ( | SoNode * | node | ) | [virtual] |
Sets the scene graph used for generating frames in the MPEG output.
Reimplemented from SoMPEGRenderer.
virtual void SoMPEGNavRenderer::stop | ( | ) | [virtual] |
Stops recording camera movements.
Each frame corresponding to a camera movement is rendered and added to the MPEG output file.
Reimplemented from SoMPEGRenderer.