17 INLINE CullTraverserData::
18 CullTraverserData(
const NodePath &start,
25 _node_reader(start.node(), current_thread),
26 _net_transform(net_transform),
28 _view_frustum(view_frustum),
34 bool check_bounds = (view_frustum !=
nullptr);
35 _node_reader.check_cached(check_bounds);
42 INLINE CullTraverserData::
48 _node_reader(child, parent._node_reader.get_current_thread()),
49 _net_transform(parent._net_transform),
50 _state(parent._state),
51 _view_frustum(parent._view_frustum),
52 _cull_planes(parent._cull_planes),
53 _draw_mask(parent._draw_mask),
54 _portal_depth(parent._portal_depth)
57 bool check_bounds = !_cull_planes->is_empty() ||
58 (_view_frustum !=
nullptr);
67 return (
PandaNode *)_node_reader.get_node();
93 result._head = r_get_node_path();
122 return _net_transform;
131 INLINE
bool CullTraverserData::
132 is_in_view(
const DrawMask &camera_mask) {
143 if (_view_frustum ==
nullptr &&
144 _cull_planes->is_empty()) {
151 return is_in_view_impl();
161 return (_draw_mask & PandaNode::get_overall_bit()).is_zero() ||
162 (_draw_mask & camera_mask).is_zero();
This represents the set of clip planes and/or occluders that are definitely in effect for the current...
This collects together the pieces of data that are accumulated for each node while walking the scene ...
PandaNode * node() const
Returns the node traversed to so far.
bool is_this_node_hidden(const DrawMask &camera_mask) const
Returns true if this particular node is hidden, even though we might be traversing past this node to ...
PandaNodePipelineReader * node_reader()
Returns the PipelineReader for the node traversed to so far.
get_node_path
Constructs and returns an actual NodePath that represents the same path we have just traversed.
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
const TransformState * get_world_transform() const
Returns the position of the starting node relative to the camera.
SceneSetup * get_scene() const
Returns the SceneSetup object.
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
static NodePath fail()
Creates a NodePath with the ET_fail error type set.
Encapsulates the data from a PandaNode, pre-fetched for one stage of the pipeline.
const TransformState * get_transform() const
Returns the transform that has been set on this particular node.
void check_cached(bool update_bounds) const
Ensures that the draw masks etc.
bool compare_draw_mask(DrawMask running_draw_mask, DrawMask camera_mask) const
Compares the running draw mask computed during a traversal with this node's net draw masks.
A basic node of the scene graph or data graph.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
const TransformState * get_cs_world_transform() const
Returns the position from the starting node relative to the camera, in the GSG's internal coordinate ...
A thread; that is, a lightweight process.
CPT(TransformState) CullTraverserData
Returns the modelview transform: the relative transform from the camera to the model.