class
#include <esp/gfx/replay/ReplayManager.h>
ReplayManager Helper class for the replay python bindings (GfxReplayBindings.cpp)
This class is intended to be used as a singleton. It optionally keeps a pointer to a Recorder instance, and it helps construct Player instances.
Public functions
-
void setRecorder(std::
shared_ptr<Recorder> writer) - Optionally make a Recorder instance available to python, or pass nullptr.
-
auto getRecorder() const -> std::
shared_ptr<Recorder> - Get a Recorder instance, or nullptr if it isn't enabled.
-
void setPlayerImplementation(std::
shared_ptr<AbstractPlayerImplementation>&& implementation) - Set callbacks that are invoked when simulation state changes upon playing a new keyframe. This is required to construct Player instances.
-
auto readKeyframesFromFile(const std::
string& filepath) -> std:: shared_ptr<Player> - Read keyframes from a file and construct a Player. Returns nullptr if no keyframes could be read.
-
auto createEmptyPlayer() -> std::
shared_ptr<Player> - Returns an empty Player object. This can be used if you want to add keyframes later on.