|
openscenegraph
|
#include <StateGraph>
Public Types | |
| typedef std::map< const osg::StateSet *, osg::ref_ptr< StateGraph > > | ChildList |
| typedef std::vector< osg::ref_ptr< RenderLeaf > > | LeafList |
| Public Types inherited from osg::Object | |
| enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED } |
Public Member Functions | |
| StateGraph () | |
| StateGraph (StateGraph *parent, const osg::StateSet *stateset) | |
| ~StateGraph () | |
| virtual osg::Object * | cloneType () const |
| virtual StateGraph * | cloneStateGraph () const |
| virtual osg::Object * | clone (const osg::CopyOp &) const |
| virtual bool | isSameKindAs (const osg::Object *obj) const |
| virtual const char * | libraryName () const |
| virtual const char * | className () const |
| void | setUserData (osg::Referenced *obj) |
| osg::Referenced * | getUserData () |
| const osg::Referenced * | getUserData () const |
| void | setStateSet (const osg::StateSet *stateset) |
| const osg::StateSet * | getStateSet () const |
| bool | empty () const |
| bool | leaves_empty () const |
| float | getAverageDistance () const |
| float | getMinimumDistance () const |
| void | sortFrontToBack () |
| void | reset () |
| void | clean () |
| void | prune () |
| void | resizeGLObjectBuffers (unsigned int maxSize) |
| void | releaseGLObjects (osg::State *state=0) const |
| StateGraph * | find_or_insert (const osg::StateSet *stateset) |
| void | addLeaf (RenderLeaf *leaf) |
| Public Member Functions inherited from osg::Object | |
| Object () | |
| Object (bool threadSafeRefUnref) | |
| Object (const Object &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
| std::string | getCompoundClassName () const |
| virtual Node * | asNode () |
| virtual const Node * | asNode () const |
| virtual NodeVisitor * | asNodeVisitor () |
| virtual const NodeVisitor * | asNodeVisitor () const |
| virtual StateSet * | asStateSet () |
| virtual const StateSet * | asStateSet () const |
| virtual StateAttribute * | asStateAttribute () |
| virtual const StateAttribute * | asStateAttribute () const |
| virtual Uniform * | asUniform () |
| virtual const Uniform * | asUniform () const |
| virtual Camera * | asCamera () |
| virtual const Camera * | asCamera () const |
| virtual Drawable * | asDrawable () |
| virtual const Drawable * | asDrawable () const |
| virtual Callback * | asCallback () |
| virtual const Callback * | asCallback () const |
| virtual CallbackObject * | asCallbackObject () |
| virtual const CallbackObject * | asCallbackObject () const |
| virtual UserDataContainer * | asUserDataContainer () |
| virtual const UserDataContainer * | asUserDataContainer () const |
| virtual ValueObject * | asValueObject () |
| virtual const ValueObject * | asValueObject () const |
| virtual Image * | asImage () |
| virtual const Image * | asImage () const |
| virtual void | setThreadSafeRefUnref (bool threadSafe) |
| virtual void | setName (const std::string &name) |
| void | setName (const char *name) |
| const std::string & | getName () const |
| void | setDataVariance (DataVariance dv) |
| DataVariance | getDataVariance () const |
| virtual void | computeDataVariance () |
| void | setUserDataContainer (osg::UserDataContainer *udc) |
| template<class T> | |
| void | setUserDataContainer (const ref_ptr< T > &udc) |
| osg::UserDataContainer * | getUserDataContainer () |
| const osg::UserDataContainer * | getUserDataContainer () const |
| osg::UserDataContainer * | getOrCreateUserDataContainer () |
| template<class T> | |
| void | setUserData (const ref_ptr< T > &ud) |
| template<typename T> | |
| bool | getUserValue (const std::string &name, T &value) const |
| template<typename T> | |
| void | setUserValue (const std::string &name, const T &value) |
| template<typename T> | |
| BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool | getUserValue (const std::string &name, T &value) const |
| Public Member Functions inherited from osg::Referenced | |
| Referenced () | |
| Referenced (bool threadSafeRefUnref) | |
| Referenced (const Referenced &) | |
| Referenced & | operator= (const Referenced &) |
| bool | getThreadSafeRefUnref () const |
| OpenThreads::Mutex * | getRefMutex () const |
| int | ref () const |
| int | unref () const |
| int | unref_nodelete () const |
| int | referenceCount () const |
| ObserverSet * | getObserverSet () const |
| ObserverSet * | getOrCreateObserverSet () 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::Mutex * | getGlobalReferencedMutex () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| static DeleteHandler * | getDeleteHandler () |
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::Object | |
| virtual | ~Object () |
| Protected Member Functions inherited from osg::Referenced | |
| virtual | ~Referenced () |
| void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
| void | deleteUsingDeleteHandler () const |
| Protected Attributes inherited from osg::Object | |
| std::string | _name |
| DataVariance | _dataVariance |
| osg::UserDataContainer * | _userDataContainer |
| Protected Attributes inherited from osg::Referenced | |
| OpenThreads::AtomicPtr | _observerSet |
| OpenThreads::Atomic | _refCount |
StateGraph - contained in a renderBin, defines the scene to be drawn.
| typedef std::map< const osg::StateSet*, osg::ref_ptr<StateGraph> > osgUtil::StateGraph::ChildList |
| typedef std::vector< osg::ref_ptr<RenderLeaf> > osgUtil::StateGraph::LeafList |
|
inline |
References _averageDistance, _depth, _dynamic, _minimumDistance, _parent, _stateset, _userData, and NULL.
Referenced by clone(), cloneStateGraph(), cloneType(), find_or_insert(), isSameKindAs(), moveStateGraph(), moveToRootStateGraph(), numToPop(), and StateGraph().
|
inline |
References _averageDistance, _depth, _dynamic, _minimumDistance, _parent, _stateset, _userData, osg::Object::DYNAMIC, osg::Object::getDataVariance(), NULL, and StateGraph().
|
inline |
|
inline |
add a render leaf.
References _averageDistance, osgUtil::RenderLeaf::_dynamic, _dynamic, _leaves, _minimumDistance, and osgUtil::RenderLeaf::_parent.
|
inlinevirtual |
return the name of the object's class type. Must be defined by derived classes.
Implements osg::Object.
| void osgUtil::StateGraph::clean | ( | ) |
Recursively clean the StateGraph of all its drawables, lights and depths. Leaves children intact, and ready to be populated again.
|
inlinevirtual |
Clone an object, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
References StateGraph().
|
inlinevirtual |
References StateGraph().
|
inlinevirtual |
Clone the type of an object, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
References StateGraph().
|
inline |
|
inline |
References _children, and StateGraph().
|
inline |
References _averageDistance, and _leaves.
|
inline |
References _leaves, and _minimumDistance.
|
inline |
References _stateset.
Referenced by moveStateGraph(), moveToRootStateGraph(), and numToPop().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from osg::Object.
References StateGraph().
|
inline |
References _leaves.
|
inlinevirtual |
return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.
Implements osg::Object.
|
inlinestatic |
References _depth, _parent, getStateSet(), NULL, osg::State::popStateSet(), osg::State::pushStateSet(), and StateGraph().
|
inlinestatic |
References _parent, getStateSet(), osg::State::popStateSet(), and StateGraph().
|
inlinestatic |
References _parent, getStateSet(), numToPop(), and StateGraph().
Referenced by numToPop().
| void osgUtil::StateGraph::prune | ( | ) |
Recursively prune the StateGraph of empty children.
|
inlinevirtual |
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. Otherwise, releases OpenGL objects for all graphics contexts.
Reimplemented from osg::Object.
References _children, _leaves, _stateset, and releaseGLObjects().
Referenced by releaseGLObjects().
| void osgUtil::StateGraph::reset | ( | ) |
Reset the internal contents of a StateGraph, including deleting all children.
|
inlinevirtual |
Resize any per context GLObject buffers to specified size.
Reimplemented from osg::Object.
References _children, _leaves, and resizeGLObjectBuffers().
Referenced by resizeGLObjectBuffers().
|
inline |
References _stateset.
|
inlinevirtual |
Set user data, data must be subclassed from Referenced to allow automatic memory handling. If your own data isn't directly subclassed from Referenced then create an adapter object which points to your own object and handles the memory addressing.
Reimplemented from osg::Object.
References _userData.
|
inline |
References _leaves.
|
mutable |
Referenced by addLeaf(), getAverageDistance(), StateGraph(), and StateGraph().
| ChildList osgUtil::StateGraph::_children |
Referenced by empty(), find_or_insert(), releaseGLObjects(), and resizeGLObjectBuffers().
| int osgUtil::StateGraph::_depth |
Referenced by moveStateGraph(), StateGraph(), and StateGraph().
| bool osgUtil::StateGraph::_dynamic |
Referenced by addLeaf(), StateGraph(), and StateGraph().
| LeafList osgUtil::StateGraph::_leaves |
Referenced by addLeaf(), empty(), getAverageDistance(), getMinimumDistance(), leaves_empty(), releaseGLObjects(), resizeGLObjectBuffers(), and sortFrontToBack().
|
mutable |
Referenced by addLeaf(), getMinimumDistance(), StateGraph(), and StateGraph().
| StateGraph* osgUtil::StateGraph::_parent |
Referenced by moveStateGraph(), moveToRootStateGraph(), numToPop(), StateGraph(), and StateGraph().
| const osg::StateSet* osgUtil::StateGraph::_stateset |
Referenced by getStateSet(), releaseGLObjects(), setStateSet(), StateGraph(), and StateGraph().
| osg::ref_ptr<osg::Referenced> osgUtil::StateGraph::_userData |
Referenced by getUserData(), getUserData(), setUserData(), StateGraph(), and StateGraph().