CullResult

Inheritance:

Methods of CullResult:

Methods of ReferenceCount:

addObject
void CullResult::add_object(CullableObject *object, CullTraverser const *traverser);

Description: Adds the indicated CullableObject to the appropriate bin. The bin becomes the owner of the object pointer, and will eventually delete it.

draw
void CullResult::draw(Thread *current_thread);

Description: Asks all the bins to draw themselves in the correct order.

finishCull
void CullResult::finish_cull(SceneSetup *scene_setup, Thread *current_thread);

Description: Called after all the geoms have been added, this indicates that the cull process is finished for this frame and gives the bins a chance to do any post-processing (like sorting) before moving on to draw.

getBin
CullBin *CullResult::get_bin(int bin_index);

Description: Returns the CullBin associated with the indicated bin_index, or NULL if the bin_index is invalid. If there is the first time this bin_index has been requested for this CullResult, creates a new CullBin object on the fly.

makeNext
PointerTo< CullResult > CullResult::make_next(void) const;

Description: Returns a newly-allocated CullResult object that contains a copy of just the subset of the data from this CullResult object that is worth keeping around for next frame.

makeResultGraph
PointerTo< PandaNode > CullResult::make_result_graph(void);

Description: Returns a special scene graph constructed to represent the results of the cull. This will be a hierarchy of nodes, one node for each bin, each of which will in term be a parent of a number of GeomNodes, representing the geometry drawn in each bin.
This is useful mainly for high-level debugging and abstraction tools; it should not be mistaken for the low-level cull result itself. For the low-level cull result, use draw() to efficiently draw the culled scene.

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.