14#ifndef CULLTRAVERSER_H
15#define CULLTRAVERSER_H
45class EXPCL_PANDA_PGRAPH CullTraverser :
public TypedReferenceCount {
48 CullTraverser(
const CullTraverser ©);
55 bool dr_incomplete_render);
108 PN_stdfloat latitude, PN_stdfloat longitude);
109 static CPT(
RenderState) get_bounds_outer_viz_state();
110 static CPT(
RenderState) get_bounds_inner_viz_state();
116 DrawMask _camera_mask;
117 bool _has_tag_state_key;
118 std::string _tag_state_key;
123 bool _effective_incomplete_render;
129 static void init_type() {
130 TypedReferenceCount::init_type();
132 TypedReferenceCount::get_class_type());
135 return get_class_type();
137 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This defines a bounding sphere, consisting of a center and a radius.
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
This defines the abstract interface for an object that receives Geoms identified by the CullTraverser...
This collects together the pieces of data that are accumulated for each node while walking the scene ...
void set_view_frustum(GeometricBoundingVolume *view_frustum)
Specifies the bounding volume that corresponds to the view frustum.
CullHandler * get_cull_handler() const
Returns the object that will receive the culled Geoms.
PortalClipper * get_portal_clipper() const
Returns the _portal_clipper pointer.
Thread * get_current_thread() const
Returns the currently-executing thread object, as passed to the CullTraverser constructor.
const std::string & get_tag_state_key() const
Returns the tag state key that has been specified for the scene's camera, if any.
void set_camera_mask(const DrawMask &camera_mask)
Changes the visibility mask for the camera viewing the scene.
virtual void end_traverse()
Should be called when the traverser has finished traversing its scene, this gives it a chance to do a...
virtual void set_scene(SceneSetup *scene_setup, GraphicsStateGuardianBase *gsg, bool dr_incomplete_render)
Sets the SceneSetup object that indicates the initial camera position, etc.
const TransformState * get_world_transform() const
Returns the position of the starting node relative to the camera.
const TransformState * get_camera_transform() const
Returns the position of the camera relative to the starting node.
void set_portal_clipper(PortalClipper *portal_clipper)
Specifies _portal_clipper object pointer that subsequent traverse() or traverse_below may use.
void draw_bounding_volume(const BoundingVolume *vol, const TransformState *internal_transform) const
Draws an appropriate visualization of the indicated bounding volume.
virtual void traverse_below(CullTraverserData &data)
Traverses all the children of the indicated node, with the given data, which has been converted into ...
bool has_tag_state_key() const
Returns true if a nonempty tag state key has been specified for the scene's camera,...
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...
void set_cull_handler(CullHandler *cull_handler)
Specifies the object that will receive the culled Geoms.
bool get_effective_incomplete_render() const
Returns true if the cull traversal is effectively in incomplete_render state, considering both the GS...
SceneSetup * get_scene() const
Returns the SceneSetup object.
static void flush_level()
Flushes the PStatCollectors used during traversal.
const DrawMask & get_camera_mask() const
Returns the visibility mask from the camera viewing the scene.
GeometricBoundingVolume * get_view_frustum() const
Returns the bounding volume that corresponds to the view frustum, or NULL if the view frustum is not ...
GraphicsStateGuardianBase * get_gsg() const
Returns the GraphicsStateGuardian in effect.
bool get_depth_offset_decals() const
Returns true, as depth offsets are the only way that we implement decals nowadays.
void traverse(const NodePath &root)
Begins the traversal from the indicated node.
The smallest atom of cull.
A container for geometry primitives.
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
Encapsulates all the communication with a particular instance of a given rendering backend.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
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 performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.