bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitsim::utils::render::FrameRecorder Class Reference

Writes the window to dir/frame_00000.png, frame_00001.png, ..., rate times a second of simulation, to be put together into a movie. With an empty dir it writes nothing. More...

#include <irrlicht_scene.h>

Public Member Functions

 FrameRecorder (const std::string &dir, real_t rate=10.0)
void record (chrono::irrlicht::ChVisualSystemIrrlicht &vis, real_t time)
 Write the window if it is time to, at simulation time time [s]. Call this after EndScene(). Calls may stop for a while, to record only parts of a run.
bool is_recording () const noexcept
uint_t n_recorded () const noexcept

Detailed Description

Writes the window to dir/frame_00000.png, frame_00001.png, ..., rate times a second of simulation, to be put together into a movie. With an empty dir it writes nothing.

Constructor & Destructor Documentation

◆ FrameRecorder()

bitsim::utils::render::FrameRecorder::FrameRecorder ( const std::string & dir,
real_t rate = 10.0 )
Parameters
dirWhere to write the pictures; it is created if it does not exist
ratePictures per second of simulation

Member Function Documentation

◆ is_recording()

bool bitsim::utils::render::FrameRecorder::is_recording ( ) const
inlinenoexcept

◆ n_recorded()

uint_t bitsim::utils::render::FrameRecorder::n_recorded ( ) const
inlinenoexcept

◆ record()

void bitsim::utils::render::FrameRecorder::record ( chrono::irrlicht::ChVisualSystemIrrlicht & vis,
real_t time )

Write the window if it is time to, at simulation time time [s]. Call this after EndScene(). Calls may stop for a while, to record only parts of a run.


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