SoMPEGNavRenderer Class Reference

VSG extension Generates MPEG output that tracks camera motion. More...

#include <Inventor/MPEG/SoMPEGNavRenderer.h>

Inheritance diagram for SoMPEGNavRenderer:

List of all members.


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

Detailed Description

VSG extension Generates MPEG output that tracks camera motion.

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

See related examples:


Constructor & Destructor Documentation

SoMPEGNavRenderer::SoMPEGNavRenderer ( SoNode node  ) 


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]


Member Function Documentation

void SoMPEGNavRenderer::adjustNumFramesPerSecond ( SbBool  flag  ) 

Specifies whether the camera movements are adjusted to the number of frames per second.

Default is FALSE.

  • FALSE: Indicates that each camera movement corresponds to one frame in the MPEG output. The amount of time between two camera movements is not taken into consideration.
  • TRUE: The renderer takes into account the amount of time between two camera movements for generating frames. A new camera position could be associated with 0, 1, or several frames in the MPEG output depending on how long the camera stayed in that position during the recording period. When the MPEG is played, the camera movements will replay at the same speed as when they were originally recorded.
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.

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

Open Inventor by FEI reference manual, generated on 20 Aug 2019
Copyright © FEI S.A.S. All rights reserved.