openscenegraph
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
osgUtil::StateGraph Class Reference
Inheritance diagram for osgUtil::StateGraph:
osg::Referenced

List of all members.

Public Types

typedef std::map< const
osg::StateSet *, osg::ref_ptr
< StateGraph > > 
ChildList
typedef std::vector
< osg::ref_ptr< RenderLeaf > > 
LeafList

Public Member Functions

 StateGraph ()
 StateGraph (StateGraph *parent, const osg::StateSet *stateset)
 ~StateGraph ()
StateGraphcloneType () const
void setUserData (osg::Referenced *obj)
osg::ReferencedgetUserData ()
const osg::ReferencedgetUserData () const
const osg::StateSetgetStateSet () const
bool empty () const
bool leaves_empty () const
float getAverageDistance () const
float getMinimumDistance () const
void sortFrontToBack ()
void reset ()
void clean ()
void prune ()
StateGraphfind_or_insert (const osg::StateSet *stateset)
void addLeaf (RenderLeaf *leaf)

Static Public Member Functions

static void moveStateGraph (osg::State &state, StateGraph *sg_curr, StateGraph *sg_new)
static void moveToRootStateGraph (osg::State &state, StateGraph *sg_curr)
static int numToPop (StateGraph *sg_curr)

Public Attributes

StateGraph_parent
const osg::StateSet_stateset
int _depth
ChildList _children
LeafList _leaves
float _averageDistance
float _minimumDistance
osg::ref_ptr< osg::Referenced_userData
bool _dynamic

Detailed Description

StateGraph - contained in a renderBin, defines the scene to be drawn.


Member Typedef Documentation


Constructor & Destructor Documentation

osgUtil::StateGraph::StateGraph ( StateGraph parent,
const osg::StateSet stateset 
) [inline]

Member Function Documentation

void osgUtil::StateGraph::addLeaf ( RenderLeaf leaf) [inline]

Recursively clean the StateGraph of all its drawables, lights and depths. Leaves children intact, and ready to be populated again.

bool osgUtil::StateGraph::empty ( ) const [inline]

return true if all of drawables, lights and children are empty.

float osgUtil::StateGraph::getAverageDistance ( ) const [inline]
float osgUtil::StateGraph::getMinimumDistance ( ) const [inline]
bool osgUtil::StateGraph::leaves_empty ( ) const [inline]
static void osgUtil::StateGraph::moveStateGraph ( osg::State state,
StateGraph sg_curr,
StateGraph sg_new 
) [inline, static]
static void osgUtil::StateGraph::moveToRootStateGraph ( osg::State state,
StateGraph sg_curr 
) [inline, static]
static int osgUtil::StateGraph::numToPop ( StateGraph sg_curr) [inline, static]

References _parent, and getStateSet().

Recursively prune the StateGraph of empty children.

Reset the internal contents of a StateGraph, including deleting all children.


Member Data Documentation

Referenced by moveStateGraph().


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