PipeOcclusionCullTraverser

Inheritance:

Methods of PipeOcclusionCullTraverser:

Methods of CullTraverser:

Methods of TypedReferenceCount:

Methods of TypedObject:

Methods of ReferenceCount:

PipeOcclusionCullTraverser
PipeOcclusionCullTraverser::PipeOcclusionCullTraverser(GraphicsOutput *host);

Description:

endTraverse
virtual void PipeOcclusionCullTraverser::end_traverse(void);

Description: Should be called when the traverser has finished traversing its scene, this gives it a chance to do any necessary finalization.

getBuffer
GraphicsOutput *PipeOcclusionCullTraverser::get_buffer(void) const;

Description:

getClassType
static TypeHandle PipeOcclusionCullTraverser::get_class_type(void);

Undocumented function.

getOcclusionMask
BitMask< unsigned int, 32 > const &PipeOcclusionCullTraverser::get_occlusion_mask(void) const;

Description: Returns the DrawMask for occlusion polygons. See set_occlusion_mask().

getTexture
Texture *PipeOcclusionCullTraverser::get_texture(void);

Description: Returns a Texture that can be used to visualize the efforts of the occlusion cull.

setOcclusionMask
void PipeOcclusionCullTraverser::set_occlusion_mask(BitMask< unsigned int, 32 > const &occlusion_mask);

Description: 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
virtual void PipeOcclusionCullTraverser::set_scene(SceneSetup *scene_setup, GraphicsStateGuardianBase *gsg, bool dr_incomplete_render);

Description:

CullTraverser
CullTraverser::CullTraverser(void);

Description:

drawBoundingVolume
void CullTraverser::draw_bounding_volume(BoundingVolume const *vol, TransformState const *net_transform, TransformState const *modelview_transform);

Description: Draws an appropriate visualization of the indicated bounding volume.

endTraverse
virtual void CullTraverser::end_traverse(void);

Description: Should be called when the traverser has finished traversing its scene, this gives it a chance to do any necessary finalization.

flushLevel
static void CullTraverser::flush_level(void);

Description: Flushes the PStatCollectors used during traversal.

getCameraMask
BitMask< unsigned int, 32 > const &CullTraverser::get_camera_mask(void) const;

Description: Returns the visibility mask from the camera viewing the scene.

getCameraTransform
TransformState const *CullTraverser::get_camera_transform(void) const;

Description: Returns the position of the camera relative to the starting node.

getClassType
static TypeHandle CullTraverser::get_class_type(void);

Undocumented function.

getCullHandler
CullHandler *CullTraverser::get_cull_handler(void) const;

Description: Returns the object that will receive the culled Geoms.

getCurrentThread
Thread *CullTraverser::get_current_thread(void) const;

Description: Returns the currently-executing thread object, as passed to the CullTraverser constructor.

getDepthOffsetDecals
bool CullTraverser::get_depth_offset_decals(void) const;

Description: Returns the depth_offset_decals flag. See set_depth_offset_decals().

getEffectiveIncompleteRender
bool CullTraverser::get_effective_incomplete_render(void) const;

Description: Returns true if the cull traversal is effectively in incomplete_render state, considering both the GSG's incomplete_render and the current DisplayRegion's incomplete_render flags. This returns the flag during the cull traversal; see GSG::get_effective_incomplete_render() for this same flag during the draw traversal.

getGsg
GraphicsStateGuardianBase *CullTraverser::get_gsg(void) const;

Description: Returns the GraphicsStateGuardian in effect.

getInitialState
RenderState const *CullTraverser::get_initial_state(void) const;

Description: Returns the initial RenderState at the top of the scene graph we are traversing, or the empty state if the initial state was never set.

getPortalClipper
PortalClipper *CullTraverser::get_portal_clipper(void) const;

Description: Returns the _portal_clipper pointer

getScene
SceneSetup *CullTraverser::get_scene(void) const;

Description: Returns the SceneSetup object.

getTagStateKey
string const &CullTraverser::get_tag_state_key(void) const;

Description: Returns the tag state key that has been specified for the scene's camera, if any.

getViewFrustum
GeometricBoundingVolume *CullTraverser::get_view_frustum(void) const;

Description: Returns the bounding volume that corresponds to the view frustum, or NULL if the view frustum is not in use or has not been set.
Note that the view frustum returned here is always in the coordinate space of the starting node, not the current node, even if it is sampled during a traversal. To get the view frustum in the current node's coordinate space, check in the current CullTraverserData.

getWorldTransform
TransformState const *CullTraverser::get_world_transform(void) const;

Description: Returns the position of the starting node relative to the camera. This is the inverse of the camera transform.
Note that this value is always the position of the starting node, not the current node, even if it is sampled during a traversal. To get the transform of the current node use CullTraverserData::get_modelview_transform().

hasTagStateKey
bool CullTraverser::has_tag_state_key(void) const;

Description: Returns true if a nonempty tag state key has been specified for the scene's camera, false otherwise.

setCameraMask
void CullTraverser::set_camera_mask(BitMask< unsigned int, 32 > const &camera_mask);

Description: Changes the visibility mask for the camera viewing the scene. This is normally set automatically at the time setup_scene() is called; you should change this only if you want to render some set of objects different from what the camera normally would draw.

setCullHandler
void CullTraverser::set_cull_handler(CullHandler *cull_handler);

Description: Specifies the object that will receive the culled Geoms. This must be set before calling traverse().

setPortalClipper
void CullTraverser::set_portal_clipper(PortalClipper *portal_clipper);

Description: Specifies _portal_clipper object pointer that subsequent traverse() or traverse_below may use.

setScene
virtual void CullTraverser::set_scene(SceneSetup *scene_setup, GraphicsStateGuardianBase *gsg, bool dr_incomplete_render);

Description: Sets the SceneSetup object that indicates the initial camera position, etc. This must be called before traversal begins.

setViewFrustum
void CullTraverser::set_view_frustum(GeometricBoundingVolume *view_frustum);

Description: Specifies the bounding volume that corresponds to the view frustum. Any primitives that fall entirely outside of this volume are not drawn.

traverse
void CullTraverser::traverse(NodePath const &root);

Description: Begins the traversal from the indicated node.
Description: Traverses from the next node with the given data, which has been constructed with the node but has not yet been converted into the node's space.

traverseBelow
virtual void CullTraverser::traverse_below(CullTraverserData &data);

Description: Traverses all the children of the indicated node, with the given data, which has been converted into the node's space.

getClassType
static TypeHandle TypedReferenceCount::get_class_type(void);

Undocumented function.

getClassType
static TypeHandle TypedObject::get_class_type(void);

Undocumented function.

getType
virtual TypeHandle TypedObject::get_type(void) const = 0;

Derived classes should override this function to return get_class_type().

getTypeIndex
int TypedObject::get_type_index(void) const;

Description: Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index().

isExactType
bool TypedObject::is_exact_type(TypeHandle handle) const;

Description: Returns true if the current object is the indicated type exactly.

isOfType
bool TypedObject::is_of_type(TypeHandle handle) const;

Description: Returns true if the current object is or derives from the indicated type.

getClassType
static TypeHandle ReferenceCount::get_class_type(void);

Undocumented function.

getRefCount
int ReferenceCount::get_ref_count(void) const;

Description: Returns the current reference count.

ref
void ReferenceCount::ref(void) const;

Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.
This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity
bool ReferenceCount::test_ref_count_integrity(void) const;

Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

testRefCountNonzero
bool ReferenceCount::test_ref_count_nonzero(void) const;

Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

unref
bool ReferenceCount::unref(void) const;

Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete().
User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.
This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.
The return value is true if the new reference count is nonzero, false if it is zero.