| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/camerapathrecorder.h>

Public Types | |
| enum | State { OFF, RECORDING, PLAYING } |
Public Member Functions | |
| CameraPathRecorder (SO< VRS::LookAt > lookAt) | |
| void | setMaxFramesPerSecond (unsigned int frames) |
| unsigned int | getMaxFramesPerSecond () const |
| VRS_SERIALIZABLE_CLASS_ENUM (State) | |
| State | getState () const |
| Indicates what the CameraPathRecorder is currently doing. | |
| void | startRecording () |
| void | startPlaying () |
| void | stop () |
| void | savePath (const std::string &fileName) |
| void | loadPath (const std::string &fileName) |
| void | enableKeys (unsigned char recordKey, unsigned char playKey, unsigned char stopKey, unsigned char loadKey, unsigned char saveKey, const std::string &file) |
| Enables key control of the recorder. | |
| void | disableKeys () |
| void | recordVideo (SO< Canvas > canvas, unsigned int frameRate=25, unsigned int width=800, unsigned int height=600, const std::string &exportDirectory="", const std::string &exportImageFileName="image", const std::string &exportImageFormat=".bmp", PathNavigation *pathNavigation=0, VRS::VideoCompressor *compressor=NULL) |
| void | enableVideoExport (unsigned char recordKey, SO< Canvas > canvas, unsigned int frameRate=25, unsigned int width=800, unsigned int height=600, const std::string &exportDirectory="", const std::string &exportImageFileName="image", const std::string &exportImageFormat=".bmp") |
| void | disableVideoExport () |
| SO< Iterator< Vector > > | getKeyPositions () const |
| SO< Iterator< Vector > > | getKeyDirections () const |
| SO< Iterator< double > > | getKeyTimes () const |
| void | setKeyFrames (SO< Iterator< Vector > > keyPositions, SO< Iterator< Vector > > keyDirections, SO< Iterator< double > > keyTimes) |
| This method allows for using a camera path recorder to play paths that have been created or changed externally. | |
| void | setPBufferEnabled (bool yesNo=false) |
| If the camerapath is recorded using the application canvas, occluding other windows will cause errors in the recorded video. | |
| bool | getPBufferEnabled () const |
| bool | getInterpolatedView (double elapsedTime, SO< LookAt > target) const |
| Writes an interpolated position for a given time into the target lookat. | |
| VRS_TYPEINFO (CameraPathRecorder, BehaviorNode) | |
| VRS_SERIALIZABLE (CameraPathRecorder) | |
| VRS::CameraPathRecorder::CameraPathRecorder | ( | SO< VRS::LookAt > | lookAt | ) |
| void VRS::CameraPathRecorder::setMaxFramesPerSecond | ( | unsigned int | frames | ) |
The CameraPathRecorder stores one value per frame. In order to control the amount of stored data, a maximum number of frames can be specified for the case of a very high frame rate.
| unsigned int VRS::CameraPathRecorder::getMaxFramesPerSecond | ( | ) | const |
| VRS::CameraPathRecorder::VRS_SERIALIZABLE_CLASS_ENUM | ( | State | ) |
| State VRS::CameraPathRecorder::getState | ( | ) | const |
Indicates what the CameraPathRecorder is currently doing.
| void VRS::CameraPathRecorder::startRecording | ( | ) |
Start Recording of a CameraPath. All previously stored data is cleared. Note: Currently the CameraPathRecorder allows only one (continuous) path, i.e. it is impossible to pause the recording.
| void VRS::CameraPathRecorder::startPlaying | ( | ) |
Plays a recorded camera path.
| void VRS::CameraPathRecorder::stop | ( | ) |
Stops a currently running record or play process.
| void VRS::CameraPathRecorder::savePath | ( | const std::string & | fileName | ) |
| void VRS::CameraPathRecorder::loadPath | ( | const std::string & | fileName | ) |
Saves/Loads the recorded path in a simple ASCII file.
| void VRS::CameraPathRecorder::enableKeys | ( | unsigned char | recordKey, | |
| unsigned char | playKey, | |||
| unsigned char | stopKey, | |||
| unsigned char | loadKey, | |||
| unsigned char | saveKey, | |||
| const std::string & | file | |||
| ) |
Enables key control of the recorder.
| void VRS::CameraPathRecorder::disableKeys | ( | ) |
| void VRS::CameraPathRecorder::recordVideo | ( | SO< Canvas > | canvas, | |
| unsigned int | frameRate = 25, |
|||
| unsigned int | width = 800, |
|||
| unsigned int | height = 600, |
|||
| const std::string & | exportDirectory = "", |
|||
| const std::string & | exportImageFileName = "image", |
|||
| const std::string & | exportImageFormat = ".bmp", |
|||
| PathNavigation * | pathNavigation = 0, |
|||
| VRS::VideoCompressor * | compressor = NULL | |||
| ) |
Renders a video according to the stored camera path as a sequence of image files.
The exported images will be named as: "<exportImageFileName> + <image number> + <exportImageFormat>"
| void VRS::CameraPathRecorder::enableVideoExport | ( | unsigned char | recordKey, | |
| SO< Canvas > | canvas, | |||
| unsigned int | frameRate = 25, |
|||
| unsigned int | width = 800, |
|||
| unsigned int | height = 600, |
|||
| const std::string & | exportDirectory = "", |
|||
| const std::string & | exportImageFileName = "image", |
|||
| const std::string & | exportImageFormat = ".bmp" | |||
| ) |
| void VRS::CameraPathRecorder::disableVideoExport | ( | ) |
Allows the activation of recordVideo via key. Note that the application will be blocked for the time of the recordVideo call.
Accessor methods for key frame data. Can be used to feed camera path into a PathNavigation. Please note, that a PathNavigation does not use timing information.
| void VRS::CameraPathRecorder::setKeyFrames | ( | SO< Iterator< Vector > > | keyPositions, | |
| SO< Iterator< Vector > > | keyDirections, | |||
| SO< Iterator< double > > | keyTimes | |||
| ) |
This method allows for using a camera path recorder to play paths that have been created or changed externally.
All iterators must have the same length and must not be NULL.
| void VRS::CameraPathRecorder::setPBufferEnabled | ( | bool | yesNo = false |
) |
If the camerapath is recorded using the application canvas, occluding other windows will cause errors in the recorded video.
Using the pbuffer avoids this problem but might cause other problems.
| bool VRS::CameraPathRecorder::getPBufferEnabled | ( | ) | const |
Writes an interpolated position for a given time into the target lookat.
If 'elapsedTime' is earlier than the path end, the return value is true. If elapsedTime exceeds the target length, the end view ist written to target and false is returned, true otherwise. If elapsedTime is smaller than the first time stamp, the first key frame is written.
| VRS::CameraPathRecorder::VRS_TYPEINFO | ( | CameraPathRecorder | , | |
| BehaviorNode | ||||
| ) |
| VRS::CameraPathRecorder::VRS_SERIALIZABLE | ( | CameraPathRecorder | ) |