osgUtil::StateGraph Class Reference

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

Inheritance diagram for osgUtil::StateGraph:

Inheritance graph
[legend]

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
 return true if all of drawables, lights and children are empty.
bool leaves_empty () const
float getAverageDistance () const
float getMinimumDistance () const
void sortFrontToBack ()
void reset ()
 Reset the internal contents of a StateGraph, including deleting all children.
void clean ()
 Recursively clean the StateGraph of all its drawables, lights and depths.
void prune ()
 Recursively prune the StateGraph of empty children.
StateGraphfind_or_insert (const osg::StateSet *stateset)
void addLeaf (RenderLeaf *leaf)
 add a render 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

typedef std::map< const osg::StateSet*, osg::ref_ptr<StateGraph> > osgUtil::StateGraph::ChildList

typedef std::vector< osg::ref_ptr<RenderLeaf> > osgUtil::StateGraph::LeafList


Constructor & Destructor Documentation

osgUtil::StateGraph::StateGraph (  )  [inline]

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

osgUtil::StateGraph::~StateGraph (  )  [inline]


Member Function Documentation

StateGraph* osgUtil::StateGraph::cloneType (  )  const [inline]

void osgUtil::StateGraph::setUserData ( osg::Referenced obj  )  [inline]

osg::Referenced* osgUtil::StateGraph::getUserData (  )  [inline]

const osg::Referenced* osgUtil::StateGraph::getUserData (  )  const [inline]

const osg::StateSet* osgUtil::StateGraph::getStateSet (  )  const [inline]

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

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

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

float osgUtil::StateGraph::getAverageDistance (  )  const [inline]

float osgUtil::StateGraph::getMinimumDistance (  )  const [inline]

void osgUtil::StateGraph::sortFrontToBack (  )  [inline]

void osgUtil::StateGraph::reset (  ) 

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

void osgUtil::StateGraph::clean (  ) 

Recursively clean the StateGraph of all its drawables, lights and depths.

Leaves children intact, and ready to be populated again.

void osgUtil::StateGraph::prune (  ) 

Recursively prune the StateGraph of empty children.

StateGraph* osgUtil::StateGraph::find_or_insert ( const osg::StateSet stateset  )  [inline]

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

add a render leaf.

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]


Member Data Documentation

StateGraph* osgUtil::StateGraph::_parent

const osg::StateSet* osgUtil::StateGraph::_stateset

int osgUtil::StateGraph::_depth

ChildList osgUtil::StateGraph::_children

LeafList osgUtil::StateGraph::_leaves

float osgUtil::StateGraph::_averageDistance [mutable]

float osgUtil::StateGraph::_minimumDistance [mutable]

osg::ref_ptr<osg::Referenced> osgUtil::StateGraph::_userData

bool osgUtil::StateGraph::_dynamic


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:52 2007 for the OpenSceneGraph by doxygen 1.5.3.