PipeOcclusionCullTraverser
from panda3d.core import PipeOcclusionCullTraverser
- class PipeOcclusionCullTraverser
Bases:
Bases:
CullTraverser
,CullHandler
This specialization of
CullTraverser
uses the graphics pipe itself to perform occlusion culling. As such, it’s likely to be inefficient (since it interferes with the pipe’s normal mode of rendering), and is mainly useful to test other, CPU-based occlusion algorithms.This cannot be used in a multithreaded pipeline environment where cull and draw are operating simultaneously.
It can’t be defined in the cull subdirectory, because it needs access to
GraphicsPipe
andDisplayRegion
and other classes in display. So we put it in grutil instead, for lack of any better ideas.Inheritance diagram
- __init__(host: GraphicsOutput)
- endTraverse()
Should be called when the traverser has finished traversing its scene, this gives it a chance to do any necessary finalization.
- getBuffer() GraphicsOutput
- static getClassType() TypeHandle
- getOcclusionMask() DrawMask
Returns the
DrawMask
for occlusion polygons. SeesetOcclusionMask()
.
- getTexture() Texture
Returns a Texture that can be used to visualize the efforts of the occlusion cull.
- setOcclusionMask(occlusion_mask: DrawMask)
Specifies the
DrawMask
that should be set on occlusion polygons for this scene. This identifies the polygons that are to be treated as occluders. Polygons that do not have this draw mask set will not be considered occluders.
- setScene(scene_setup: SceneSetup, gsg: GraphicsStateGuardianBase, dr_incomplete_render: bool)