34 return _current_thread;
55 return _has_tag_state_key;
66 return _tag_state_key;
77 return _scene_setup->get_camera_transform();
95 return _scene_setup->get_world_transform();
107 return _initial_state;
133 _camera_mask = camera_mask;
156 _view_frustum = view_frustum;
175 return _view_frustum;
186 _cull_handler = cull_handler;
197 return _cull_handler;
207 _portal_clipper = portal_clipper;
217 return _portal_clipper;
233 return _effective_incomplete_render;
243 _nodes_pcollector.flush_level();
244 _geom_nodes_pcollector.flush_level();
245 _geoms_pcollector.flush_level();
246 _geoms_occluded_pcollector.flush_level();
254 INLINE
void CullTraverser::
256 if (is_in_view(data)) {
257 if (pgraph_cat.is_spam()) {
259 <<
"\n" << data._node_path
260 <<
" " << data._draw_mask <<
"\n";
264 int fancy_bits = node_reader->get_fancy_bits();
266 if ((fancy_bits & (PandaNode::FB_transform |
267 PandaNode::FB_state |
268 PandaNode::FB_effects |
270 PandaNode::FB_draw_mask |
271 PandaNode::FB_cull_callback)) == 0 &&
272 data._cull_planes->is_empty()) {
287 node_reader->
get_state()->get_attrib(FogAttrib::get_class_slot());
297 if (fancy_bits & PandaNode::FB_cull_callback) {
299 if (!node->cull_callback(
this, data)) {
Fog * get_fog() const
If the FogAttrib is not an 'off' FogAttrib, returns the fog that is associated.
A basic node of the scene graph or data graph.
bool has_tag_state_key() const
Returns true if a nonempty tag state key has been specified for the scene's camera, false otherwise.
void set_camera_mask(const DrawMask &camera_mask)
Changes the visibility mask for the camera viewing the scene.
CullHandler * get_cull_handler() const
Returns the object that will receive the culled Geoms.
const TransformState * get_camera_transform() const
Returns the position of the camera relative to the starting node.
static void flush_level()
Flushes the PStatCollectors used during traversal.
const RenderEffects * get_effects() const
Returns the complete RenderEffects that will be applied to this node.
virtual void traverse_below(CullTraverserData &data)
Traverses all the children of the indicated node, with the given data, which has been converted into ...
Thread * get_current_thread() const
Returns the currently-executing thread object, as passed to the CullTraverser constructor.
const RenderState * get_state() const
Returns the complete RenderState that will be applied to all nodes at this level and below...
This collects together the pieces of data that are accumulated for each node while walking the scene ...
void adjust_to_camera(const TransformState *camera_transform)
This function is intended to be called by the cull traverser to compute the appropriate camera-relati...
PandaNode * node() const
Returns the node traversed to so far.
Applies a Fog to the geometry at and below this node.
PortalClipper * get_portal_clipper() const
Returns the _portal_clipper pointer.
bool get_effective_incomplete_render() const
Returns true if the cull traversal is effectively in incomplete_render state, considering both the GS...
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
void set_portal_clipper(PortalClipper *portal_clipper)
Specifies _portal_clipper object pointer that subsequent traverse() or traverse_below may use...
const string & get_tag_state_key() const
Returns the tag state key that has been specified for the scene's camera, if any. ...
bool has_show_bounds() const
This function is provided as an optimization, to speed up the render-time checking for the existance ...
bool get_depth_offset_decals() const
Returns true, as depth offsets are the only way that we implement decals nowadays.
This defines the abstract interface for an object that receives Geoms identified by the CullTraverser...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling...
Specifies how atmospheric fog effects are applied to geometry.
void set_view_frustum(GeometricBoundingVolume *view_frustum)
Specifies the bounding volume that corresponds to the view frustum.
const TransformState * get_world_transform() const
Returns the position of the starting node relative to the camera.
GraphicsStateGuardianBase * get_gsg() const
Returns the GraphicsStateGuardian in effect.
PandaNodePipelineReader * node_reader()
Returns the PipelineReader for the node traversed to so far.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
void apply_transform_and_state(CullTraverser *trav)
Applies the transform and state from the current node onto the current data.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
A thread; that is, a lightweight process.
const RenderState * get_initial_state() const
Returns the initial RenderState at the top of the scene graph we are traversing, or the empty state i...
GeometricBoundingVolume * get_view_frustum() const
Returns the bounding volume that corresponds to the view frustum, or NULL if the view frustum is not ...
Encapsulates the data from a PandaNode, pre-fetched for one stage of the pipeline.
SceneSetup * get_scene() const
Returns the SceneSetup object.
const DrawMask & get_camera_mask() const
Returns the visibility mask from the camera viewing the scene.
This object holds the camera position, etc., and other general setup information for rendering a part...
This represents a unique collection of RenderEffect objects that correspond to a particular renderabl...
bool has_show_tight_bounds() const
If has_show_bounds() returns true, this will return true if the ShowBoundsEffect in question requests...
void set_cull_handler(CullHandler *cull_handler)
Specifies the object that will receive the culled Geoms.