14#ifndef PIPEOCCLUSIONCULLTRAVERSER_H
15#define PIPEOCCLUSIONCULLTRAVERSER_H
41class EXPCL_PANDA_GRUTIL PipeOcclusionCullTraverser :
public CullTraverser,
45 PipeOcclusionCullTraverser(
const PipeOcclusionCullTraverser ©) =
delete;
49 bool dr_incomplete_render);
63 const CullTraverser *traverser);
67 static LVertex compute_sphere_point(PN_stdfloat latitude, PN_stdfloat longitude);
70 void make_solid_test_state();
78 perform_occlusion_test(
const Geom *geom,
82 void show_results(
int num_fragments,
const Geom *geom,
91 DrawMask _occlusion_mask;
94 PT(CullTraverser) _internal_trav;
97 CullHandler *_internal_cull_handler;
98 CullHandler *_true_cull_handler;
107 PT(
Geom) _sphere_geom;
111 class PendingObject {
114 INLINE ~PendingObject();
119 typedef pvector<PendingObject> PendingObjects;
120 PendingObjects _pending_objects;
136 static void init_type() {
137 CullTraverser::init_type();
139 CullTraverser::get_class_type());
142 return get_class_type();
144 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
virtual void record_object(CullableObject *object, const CullTraverser *traverser)
This callback function is intended to be overridden by a derived class.
This collects together the pieces of data that are accumulated for each node while walking 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.
virtual void traverse_below(CullTraverserData &data)
Traverses all the children of the indicated node, with the given data, which has been converted into ...
The smallest atom of cull.
A rectangular subregion within a window for rendering into.
A container for geometry primitives.
This class is the main interface to controlling the render process.
This is a base class for the various different classes that represent the result of a frame of render...
An object to create GraphicsOutputs that share a particular 3-D API.
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.
Returned from a GSG in response to begin_occlusion_query() .
A lightweight class that represents a single element that may be timed and/or counted via stats.
Texture * get_texture()
Returns a Texture that can be used to visualize the efforts of the occlusion cull.
const DrawMask & get_occlusion_mask() const
Returns the DrawMask for occlusion polygons.
void set_occlusion_mask(const DrawMask &occlusion_mask)
Specifies the DrawMask that should be set on occlusion polygons for this scene.
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...
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
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.
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.