17INLINE SceneGraphReducer::
27INLINE SceneGraphReducer::
53 _combine_radius = combine_radius;
62 return _combine_radius;
80 nassertv(node !=
nullptr);
83 r_apply_attribs(node, attribs, attrib_types, _transformer);
96 nassertv(node !=
nullptr);
97 r_apply_attribs(node, attribs, attrib_types, transformer);
118 nassertr(root !=
nullptr, 0);
122 count += r_collect_vertex_data(root, collect_bits, _transformer,
true);
140 nassertr(root !=
nullptr, 0);
144 count += r_collect_vertex_data(root, collect_bits, _transformer,
false);
158 nassertr(root !=
nullptr, 0);
161 return r_make_nonindexed(root, nonindexed_bits);
174 nassertv(root !=
nullptr);
176 if (_gsg !=
nullptr) {
178 r_premunge(root, initial_state);
This class is used by the SceneGraphReducer to maintain and accumulate the set of attributes we have ...
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
A lightweight class that can be used to automatically start and stop a PStatCollector around a sectio...
A basic node of the scene graph or data graph.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
int collect_vertex_data(PandaNode *root, int collect_bits=~0)
Collects all different GeomVertexData blocks that have compatible formats at this node and below into...
int make_compatible_format(PandaNode *root, int collect_bits=~0)
Walks through the tree at this node and below and unifies the GeomVertexFormat for any GeomVertexData...
int make_nonindexed(PandaNode *root, int nonindexed_bits=~0)
Converts indexed geometry to nonindexed geometry at the indicated node and below, by duplicating vert...
void set_combine_radius(PN_stdfloat combine_radius)
Specifies the radius that is used in conjunction with CS_within_radius to decide whether a subgraph's...
PN_stdfloat get_combine_radius() const
Returns the radius that is used in conjunction with CS_within_radius.
GraphicsStateGuardianBase * get_gsg() const
Returns the particular GraphicsStateGuardian that this object will attempt to optimize to.
void premunge(PandaNode *root, const RenderState *initial_state)
Walks the scene graph rooted at this node and below, and uses the indicated GSG to premunge every Geo...
bool check_live_flatten(PandaNode *node)
In a non-release build, returns false if the node is correctly not in a live scene graph.
void apply_attribs(PandaNode *node, int attrib_types=~(TT_clip_plane|TT_cull_face|TT_apply_texture_color))
Walks the scene graph, accumulating attribs of the indicated types, applying them to the vertices,...