29 _collection(collection),
39 BackPointers::iterator bpi;
40 for (bpi = _back_pointers.begin(); bpi != _back_pointers.end(); ++bpi) {
42 if (back !=
nullptr) {
57 if (_names.insert(name).second) {
61 if (get_name() != name) {
62 nout <<
"Warning: renamed " << name <<
" to " << get_name()
63 <<
" to avoid naming conflict.\n";
75 if (name == get_name()) {
78 return (_names.find(name) != _names.end());
88 if (back ==
nullptr) {
91 return back->get_num_frames();
99extend_to(
int model_index,
int num_frames)
const {
101 nassertv(back !=
nullptr);
112 if (back ==
nullptr) {
123 while ((
int)_back_pointers.size() <= model_index) {
124 _back_pointers.push_back(
nullptr);
127 if (_back_pointers[model_index] !=
nullptr) {
128 nout <<
"Warning: deleting old back pointer.\n";
129 delete _back_pointers[model_index];
131 _back_pointers[model_index] = back;
This stores a pointer from an EggJointData or EggSliderData object back to the referencing data in an...
virtual double get_frame_rate() const
Returns the stated frame rate of this particular joint, or 0.0 if it doesn't state.
virtual void extend_to(int num_frames)
Extends the table to the indicated number of frames.
Represents a set of characters, as read and collected from possibly several model and/or animation eg...
Represents a single character, as read and collected from several models and animation files.
void extend_to(int model_index, int num_frames) const
Extends the number of frames in the indicated model (presumably an animation table model) to the give...
int get_num_frames(int model_index) const
Returns the number of frames of animation for this particular component in the indicated model.
void add_name(const std::string &name, NameUniquifier &uniquifier)
Adds the indicated name to the set of names that this component can be identified with.
EggBackPointer * get_model(int model_index) const
Returns the back pointer to an egg file for the indicated model if it exists, or NULL if it does not.
bool matches_name(const std::string &name) const
Returns true if the indicated name matches any name that was ever matched with this particular joint,...
double get_frame_rate(int model_index) const
Returns the number of frames of animation for this particular component in the indicated model.
void set_model(int model_index, EggBackPointer *back)
Sets the back_pointer associated with the given model_index.
bool has_name() const
Returns true if the Namable has a nonempty name set, false if the name is empty.
A handy class for converting a list of arbitrary names (strings) so that each name is guaranteed to b...
std::string add_name(const std::string &name)
If name is nonempty and so far unique, returns it unchanged.
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.