43 if (back ==
nullptr) {
48 DCAST_INTO_R(slider, back, 0.0);
50 return slider->get_frame(n);
58 if (egg_object->
is_of_type(EggPrimitive::get_class_type())) {
61 if (back ==
nullptr) {
66 }
else if (egg_object->
is_of_type(EggVertex::get_class_type())) {
69 if (back ==
nullptr) {
74 }
else if (egg_object->
is_of_type(EggSAnimData::get_class_type())) {
77 if (back ==
nullptr) {
83 nout <<
"Invalid object added to slider for back pointer.\n";
91 write(std::ostream &out,
int indent_level)
const {
93 <<
"Slider " << get_name()
96 for (
int model_index = 0; model_index < num_models; model_index++) {
98 out <<
" " << model_index;
void set_model(int model_index, EggBackPointer *back)
Sets the back_pointer associated with the given model_index.
This stores a pointer back to an EggSAnimData table (i.e.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void add_back_pointer(int model_index, EggObject *egg_object)
Adds the indicated vertex, primitive, or morph table to the data.
int get_num_models() const
Returns the maximum number of back pointers this component may have.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the base class of both EggJointData and EggSliderData.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
This is a base class for EggVertexPointer and EggScalarTablePointer.
Represents a set of characters, as read and collected from possibly several model and/or animation eg...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool has_model(int model_index) const
Returns true if the component has a back pointer to an egg file somewhere for the indicated model,...
Represents a single character, as read and collected from several models and animation files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
double get_frame(int model_index, int n) const
Returns the value corresponding to this slider position in the nth frame in the indicated model.
bool is_of_type(TypeHandle handle) const
Returns true if the current object is or derives from the indicated type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
This stores a pointer from an EggJointData or EggSliderData object back to the referencing data in an...
The highest-level base class in the egg directory.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This stores a pointer back to a <Vertex>, or to a particular pritimive like a <Polygon>,...