14#ifndef RECORDERCONTROLLER_H
15#define RECORDERCONTROLLER_H
32class EXPCL_PANDA_RECORDER RecorderController :
public TypedReferenceCount {
35 ~RecorderController();
67 typedef Factory<RecorderBase> RecorderFactory;
72 INLINE
static void create_factory();
73 RecorderFrame *read_frame();
89 bool _user_table_modified;
100 RecorderFrame *_next_frame;
103 static RecorderFactory *_factory;
109 static void init_type() {
110 TypedReferenceCount::init_type();
112 TypedReferenceCount::get_class_type());
115 return get_class_type();
117 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
122 friend class RecorderFrame;
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This class can be used to write a binary file that consists of an arbitrary header followed by a numb...
The name of a file, such as a texture file or an Egg file.
This is the base class to a number of objects that record particular kinds of user input (like a Mous...
bool is_open() const
Returns true if the controller has been opened for either input or output, false otherwise.
void set_frame_tie(bool frame_tie)
Sets the frame_tie flag.
void set_random_seed(int random_seed)
Indicates an arbitrary number to be recorded in the session file as a random seed,...
bool has_recorder(const std::string &name) const
Returns true if the named recorder has been added to the table by a previous call to add_recorder(),...
bool get_frame_tie() const
See set_frame_tie().
bool begin_playback(const Filename &filename)
Begins playing back data from the indicated filename.
void record_frame()
Gets the next frame of data from all of the active recorders and adds it to the output file.
void add_recorder(const std::string &name, RecorderBase *recorder)
Adds the named recorder to the set of recorders that are in use.
void play_frame()
Gets the next frame of data from all of the active recorders and adds it to the output file.
int get_random_seed() const
Returns the random seed that was set by a previous call to set_random_seed(), or the number read from...
time_t get_start_time() const
Returns the time (and date) at which the current session was originally recorded (or,...
bool remove_recorder(const std::string &name)
Removes the named recorder from the table.
const Filename & get_filename() const
Returns the filename that was passed to the most recent call to begin_record() or begin_playback().
int get_frame_offset() const
Returns the delta offset between the actual frame count and the frame count written to the log.
bool is_error()
Returns true if the controller has been opened for input or output output and there is an error on th...
bool is_playing() const
Returns true if the controller has been opened for input, false otherwise.
RecorderBase * get_recorder(const std::string &name) const
Returns the recorder with the indicated name, or NULL if there is no such recorder.
double get_clock_offset() const
Returns the delta offset between the actual frame time and the frame time written to the log.
bool begin_record(const Filename &filename)
Begins recording data to the indicated filename.
bool is_recording() const
Returns true if the controller has been opened for output, false otherwise.
void close()
Finishes recording data to the indicated filename.
static RecorderFactory * get_factory()
Returns the global RecorderFactory for generating TypedWritable objects.
This object represents one frame of data in the recorded session file.
This object is used by the RecorderController to write (and read) a record of the set of recorders in...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.