Panda3D
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions
CullBinFrontToBack Class Reference

A specific kind of CullBin that sorts geometry in order from nearest to furthest based on the center of its bounding volume. More...

#include "cullBinFrontToBack.h"

Inheritance diagram for CullBinFrontToBack:
CullBin TypedReferenceCount CullBinEnums TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Classes

class  ObjectData

Public Member Functions

 CullBinFrontToBack (const string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector)
virtual void add_object (CullableObject *object, Thread *current_thread)
 Adds a geom, along with its associated state, to the bin for rendering.
virtual void draw (bool force, Thread *current_thread)
 Draws all the geoms in the bin, in the appropriate order.
virtual 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.
virtual TypeHandle force_init_type ()
virtual TypeHandle get_type () const

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.
static CullBinmake_bin (const string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector)
 Factory constructor for passing to the CullBinManager.

Protected Member Functions

virtual void fill_result_graph (ResultGraphBuilder &builder)
 Called by CullBin::make_result_graph() to add all the geoms to the special cull result scene graph.

Detailed Description

A specific kind of CullBin that sorts geometry in order from nearest to furthest based on the center of its bounding volume.

This is useful for rendering opaque geometry, taking optimal advantage of a hierarchical Z-buffer.

Definition at line 35 of file cullBinFrontToBack.h.


Member Function Documentation

void CullBinFrontToBack::add_object ( CullableObject object,
Thread current_thread 
) [virtual]

Adds a geom, along with its associated state, to the bin for rendering.

Implements CullBin.

Definition at line 59 of file cullBinFrontToBack.cxx.

void CullBinFrontToBack::draw ( bool  force,
Thread current_thread 
) [virtual]

Draws all the geoms in the bin, in the appropriate order.

Implements CullBin.

Definition at line 100 of file cullBinFrontToBack.cxx.

void CullBinFrontToBack::fill_result_graph ( CullBin::ResultGraphBuilder builder) [protected, virtual]

Called by CullBin::make_result_graph() to add all the geoms to the special cull result scene graph.

Implements CullBin.

Definition at line 116 of file cullBinFrontToBack.cxx.

References CullBin::ResultGraphBuilder::add_object().

void CullBinFrontToBack::finish_cull ( SceneSetup scene_setup,
Thread current_thread 
) [virtual]

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.

Reimplemented from CullBin.

Definition at line 88 of file cullBinFrontToBack.cxx.

static void CullBinFrontToBack::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from CullBin.

Definition at line 70 of file cullBinFrontToBack.h.

References CullBin::init_type().

CullBin * CullBinFrontToBack::make_bin ( const string &  name,
GraphicsStateGuardianBase gsg,
const PStatCollector draw_region_pcollector 
) [static]

Factory constructor for passing to the CullBinManager.

Definition at line 47 of file cullBinFrontToBack.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations