from panda3d.egg import EggBinMaker
- class EggBinMaker
This is a handy class for collecting related nodes together. It is an abstract class; to use it you must subclass off of it. See the somewhat lengthy comment above.
- collapse_group(group: EggGroup, bin_number: int) bool
May be overridden in derived classes to specify whether a particular group node, apparently redundant, may be safely collapsed out.
- get_bin_name(bin_number: int, child: EggNode) str
May be overridden in derived classes to define a name for each new bin, based on its bin number, and a sample child.
- make_bin(bin_number: int, child: EggNode, collapse_from: EggGroup) EggBin
May be overridden in derived classes to construct a new
EggBinobject (or some derived class, if needed), and preload some initial data into as required.
child is an arbitrary child of the bin, and collapse_from is the group the bin is being collapsed with, if any (implying
collapse_group()returned true), or NULL if not.
- make_bins(root_group: EggGroupNode) int
- prepare_node(node: EggNode)
May be overridden in derived classes to perform some setup work as each node is encountered. This will be called once for each node in the egg hierarchy.
- sorts_less(bin_number: int, a: EggNode, b: EggNode) bool
May be overridden in derived classes to create additional bins within a particular bin number, based on some arbitrary property of nodes. This function establishes an arbitrary but fixed ordering between nodes; if two nodes do not sort to the same position, different bins are created for each one (with the same bin number on each bin).