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

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

#include "cullBinBackToFront.h"

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

List of all members.

Classes

class  ObjectData

Public Member Functions

 CullBinBackToFront (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 furthest to nearest based on the center of its bounding volume.

This is primarily intended for rendering transparent and semi-transparent geometry that must be sorted from back to front.

Definition at line 34 of file cullBinBackToFront.h.


Member Function Documentation

void CullBinBackToFront::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 cullBinBackToFront.cxx.

void CullBinBackToFront::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 cullBinBackToFront.cxx.

void CullBinBackToFront::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 cullBinBackToFront.cxx.

References CullBin::ResultGraphBuilder::add_object().

void CullBinBackToFront::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 cullBinBackToFront.cxx.

static void CullBinBackToFront::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 cullBinBackToFront.h.

References CullBin::init_type().

CullBin * CullBinBackToFront::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 cullBinBackToFront.cxx.


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