142class EXPCL_PANDA_EGG EggBinMakerCompareNodes {
144 EggBinMakerCompareNodes() {
149 EggBinMakerCompareNodes(
EggBinMaker *ebm) : _ebm(ebm) { }
161class EXPCL_PANDA_EGG EggBinMaker :
public EggObject {
172 get_bin_number(
const EggNode *node)=0;
184 make_bin(
int bin_number,
const EggNode *child,
EggGroup *collapse_from);
191 typedef pmap<EggGroupNode *, SortedNodes> GroupNodes;
195 typedef pvector< PT(
EggNode) > Nodes;
196 typedef pvector<Nodes> Bins;
199 int get_bins_for_group(GroupNodes::const_iterator gi);
200 void make_bins_for_group(
EggGroupNode *group,
const Bins &bins);
201 void setup_bin(
EggBin *bin,
const Nodes &nodes);
203 GroupNodes _group_nodes;
211 static void init_type() {
212 EggObject::init_type();
214 EggObject::get_class_type());
217 return get_class_type();
219 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This is just an STL function object, used to sort nodes within EggBinMaker.
This is a handy class for collecting related nodes together.
int make_bins(EggGroupNode *root_group)
The main entry point to EggBinMaker.
virtual std::string get_bin_name(int bin_number, const EggNode *child)
May be overridden in derived classes to define a name for each new bin, based on its bin number,...
virtual void prepare_node(EggNode *node)
May be overridden in derived classes to perform some setup work as each node is encountered.
virtual bool collapse_group(const EggGroup *group, int bin_number)
May be overridden in derived classes to specify whether a particular group node, apparently redundant...
virtual bool sorts_less(int bin_number, const EggNode *a, const EggNode *b)
May be overridden in derived classes to create additional bins within a particular bin number,...
A type of group node that holds related subnodes.
A base class for nodes in the hierarchy that are not leaf nodes.
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
A base class for things that may be directly added into the egg hierarchy.
TypeHandle is the identifier used to differentiate C++ class types.
This is our own Panda specialization on the default STL multiset.
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.
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(),...