Panda3D
Public Member Functions | Static Public Member Functions | List of all members
CullResult Class Reference

This stores the result of a BinCullHandler traversal: an ordered collection of CullBins, each of which holds a number of Geoms and RenderStates to be rendered in some defined order. More...

#include "cullResult.h"

Inheritance diagram for CullResult:
ReferenceCount MemoryBase

Public Member Functions

 CullResult (GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector)
 
void add_object (CullableObject *object, const CullTraverser *traverser)
 
void draw (Thread *current_thread)
 Asks all the bins to draw themselves in the correct order. More...
 
void finish_cull (SceneSetup *scene_setup, Thread *current_thread)
 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. More...
 
CullBinget_bin (int bin_index)
 Returns the CullBin associated with the indicated bin_index, or NULL if the bin_index is invalid. More...
 
 PT (CullResult) make_next() const
 
 PT (PandaNode) make_result_graph()
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

Static Public Member Functions

static void bin_removed (int bin_index)
 Intended to be called by CullBinManager::remove_bin(), this informs all the CullResults in the world to remove the indicated bin_index from their cache if it has been cached. More...
 
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Additional Inherited Members

- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count. More...
 

Detailed Description

This stores the result of a BinCullHandler traversal: an ordered collection of CullBins, each of which holds a number of Geoms and RenderStates to be rendered in some defined order.

This is also used to keep the results of last frame's cull traversal around to make next frame's traversal of the same scene a little easier.

Definition at line 44 of file cullResult.h.

Member Function Documentation

◆ bin_removed()

void CullResult::bin_removed ( int  bin_index)
static

Intended to be called by CullBinManager::remove_bin(), this informs all the CullResults in the world to remove the indicated bin_index from their cache if it has been cached.

Definition at line 341 of file cullResult.cxx.

◆ draw()

void CullResult::draw ( Thread current_thread)

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

Definition at line 287 of file cullResult.cxx.

References CullBinManager::get_global_ptr(), and CullBinManager::get_num_bins.

Referenced by DisplayRegionDrawCallbackData::upcall().

◆ finish_cull()

void CullResult::finish_cull ( SceneSetup scene_setup,
Thread current_thread 
)

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.

Definition at line 265 of file cullResult.cxx.

References CullBinManager::get_global_ptr().

◆ get_bin()

CullBin * CullResult::get_bin ( int  bin_index)
inline

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.

Definition at line 27 of file cullResult.I.


The documentation for this class was generated from the following files: