Package com.openinventor.inventor.mpeg
Class SoMPEGNavRenderer
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.mpeg.SoMPEGRenderer
com.openinventor.inventor.mpeg.SoMPEGNavRenderer
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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.mpeg.SoMPEGRenderer
SoMPEGRenderer.Components
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustNumFramesPerSecond
(boolean flag) Specifies whether the camera movements are adjusted to the number of frames per second.Returns the camera currently used by the MPEG renderer.boolean
Returns whether the camera movements are adjusted to the number of frames per second.void
Specifies the camera to be used by the MPEG renderer.Methods inherited from class com.openinventor.inventor.mpeg.SoMPEGRenderer
addFrame, closeFile, getBackgroundColor, getComponents, getCompressionRate, getGLRenderAction, getNumFramesPerSecond, getSceneGraph, getShareContext, getSize, isRecording, isViewerIdle, openFile, openFile, pause, record, setBackgroundColor, setBitPerSec, setComponents, setCompressionRate, setGLRenderAction, setNumFramesPerSecond, setSceneGraph, setShareContext, setSize, setViewerIsIdle, stop
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoMPEGNavRenderer
Constructor. The methodSoMPEGRenderer.setSceneGraph()
is called with the given argument. The specified scene graph must contain a camera in order to produce correct results.
-
-
Method Details
-
adjustNumFramesPerSecond
public void adjustNumFramesPerSecond(boolean 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.
-
isAdjustedNumFramesPerSecond
public boolean isAdjustedNumFramesPerSecond()Returns whether the camera movements are adjusted to the number of frames per second. -
getCamera
Returns the camera currently used by the MPEG renderer. -
setCamera
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.
-