14#ifndef ANIMPRELOADTABLE_H
15#define ANIMPRELOADTABLE_H
35class EXPCL_PANDA_CHAN AnimPreloadTable :
public CopyOnWriteObject {
40 INLINE
bool operator < (
const AnimRecord &other)
const;
42 std::string _basename;
43 PN_stdfloat _base_frame_rate;
48 virtual PT(CopyOnWriteObject) make_cow_copy();
52 virtual ~AnimPreloadTable();
55 int find_anim(
const std::string &basename)
const;
63 void add_anim(
const std::string &basename, PN_stdfloat base_frame_rate,
int num_frames);
66 virtual void output(std::ostream &out)
const;
67 virtual void write(std::ostream &out,
int indent_level)
const;
70 INLINE
void consider_sort()
const;
87 return get_class_type();
89 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
91 static TypeHandle get_class_type() {
94 static void init_type() {
95 CopyOnWriteObject::init_type();
97 CopyOnWriteObject::get_class_type());
101 static TypeHandle _type_handle;
104inline std::ostream &operator << (std::ostream &out,
const AnimPreloadTable &anim) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This table records data about a list of animations for a particular model, such as number of frames a...
void add_anim(const std::string &basename, PN_stdfloat base_frame_rate, int num_frames)
Adds a new animation record to the table.
std::string get_basename(int n) const
Returns the basename stored for the nth animation record.
void clear_anims()
Removes all animation records from the table.
PN_stdfloat get_base_frame_rate(int n) const
Returns the frame rate stored for the nth animation record.
int get_num_frames(int n) const
Returns the number of frames stored for the nth animation record.
int get_num_anims() const
Returns the number of animation records in the table.
static void register_with_read_factory()
Factory method to generate an AnimPreloadTable object.
int find_anim(const std::string &basename) const
Returns the index number in the table of the animation record with the indicated name,...
void remove_anim(int n)
Removes the nth animation records from the table.
static TypedWritable * make_from_bam(const FactoryParams ¶ms)
Factory method to generate an AnimPreloadTable object.
void add_anims_from(const AnimPreloadTable *other)
Copies the animation records from the other table into this one.
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 ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
A specialization of ordered_vector that emulates a standard STL set: one copy of each element is allo...
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.