68 ResultGraphBuilder builder(root_node);
69 fill_result_graph(builder);
76CullBin::ResultGraphBuilder::
87void CullBin::ResultGraphBuilder::
89 if (_current_transform != object->_internal_transform ||
90 _current_state != object->_state) {
94 _current_transform =
object->_internal_transform;
95 _current_state =
object->_state;
96 _current_node =
new GeomNode(
"object_" + format_string(_object_index));
97 _root_node->add_child(_current_node);
98 _current_node->set_transform(_current_transform);
99 _current_node->set_state(_current_state);
102 record_one_object(_current_node,
object);
109void CullBin::ResultGraphBuilder::
110record_one_object(GeomNode *node, CullableObject *
object) {
111 PT(Geom) new_geom =
object->_geom->make_copy();
112 new_geom->set_vertex_data(object->_munged_data);
virtual PointerTo< CullBin > make_next() const
Returns a newly-allocated CullBin object that contains a copy of just the subset of the data from thi...
virtual void finish_cull(SceneSetup *scene_setup, Thread *current_thread)
Called after all the geoms have been added, this indicates that the cull process is finished for this...
PointerTo< PandaNode > make_result_graph()
Returns a special scene graph constructed to represent the results of the cull.
The smallest atom of cull.
void add_geom(Geom *geom, const RenderState *state=RenderState::make_empty())
Adds a new Geom to the node.
A lightweight class that represents a single element that may be timed and/or counted via stats.
A basic node of the scene graph or data graph.
This object holds the camera position, etc., and other general setup information for rendering a part...
A thread; that is, a lightweight process.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.