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

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)
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
virtual void setThreadSafeRefUnref (bool threadSafe)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const

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)
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
static bool getThreadSafeReferenceCounting ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()

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

Additional Inherited Members

- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
OpenThreads::Atomic _refCount

Detailed Description

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

Member Typedef Documentation

Constructor & Destructor Documentation

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

Member Function Documentation

void osgUtil::StateGraph::addLeaf ( RenderLeaf leaf)
inline
void osgUtil::StateGraph::clean ( )

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

StateGraph* osgUtil::StateGraph::cloneType ( ) const
inline
bool osgUtil::StateGraph::empty ( ) const
inline

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

StateGraph* osgUtil::StateGraph::find_or_insert ( const osg::StateSet stateset)
inline
float osgUtil::StateGraph::getAverageDistance ( ) const
inline
float osgUtil::StateGraph::getMinimumDistance ( ) const
inline
const osg::StateSet* osgUtil::StateGraph::getStateSet ( ) const
inline
osg::Referenced* osgUtil::StateGraph::getUserData ( )
inline
const osg::Referenced* osgUtil::StateGraph::getUserData ( ) const
inline
bool osgUtil::StateGraph::leaves_empty ( ) const
inline
static void osgUtil::StateGraph::moveStateGraph ( osg::State state,
StateGraph sg_curr,
StateGraph sg_new 
)
inlinestatic
static void osgUtil::StateGraph::moveToRootStateGraph ( osg::State state,
StateGraph sg_curr 
)
inlinestatic
static int osgUtil::StateGraph::numToPop ( StateGraph sg_curr)
inlinestatic

References _parent, and getStateSet().

void osgUtil::StateGraph::prune ( )

Recursively prune the StateGraph of empty children.

void osgUtil::StateGraph::reset ( )

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

void osgUtil::StateGraph::setUserData ( osg::Referenced obj)
inline
void osgUtil::StateGraph::sortFrontToBack ( )
inline

Member Data Documentation

float osgUtil::StateGraph::_averageDistance
mutable
ChildList osgUtil::StateGraph::_children
int osgUtil::StateGraph::_depth

Referenced by moveStateGraph().

bool osgUtil::StateGraph::_dynamic
LeafList osgUtil::StateGraph::_leaves
float osgUtil::StateGraph::_minimumDistance
mutable
StateGraph* osgUtil::StateGraph::_parent
const osg::StateSet* osgUtil::StateGraph::_stateset
osg::ref_ptr<osg::Referenced> osgUtil::StateGraph::_userData

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