openscenegraph
|
#include <StateGraph>
Public Types | |
typedef std::map< const osg::StateSet *, osg::ref_ptr< StateGraph > > | ChildList |
typedef std::vector< osg::ref_ptr< RenderLeaf > > | LeafList |
![]() | |
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) |
![]() | |
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 |
![]() | |
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 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 | |
![]() | |
virtual | ~Object () |
![]() | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
![]() | |
std::string | _name |
DataVariance | _dataVariance |
osg::UserDataContainer * | _userDataContainer |
![]() | |
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 |
|
inline |
|
inline |
|
inline |
add a render leaf.
|
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.
|
inlinevirtual |
|
inlinevirtual |
Clone the type of an object, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
|
inline |
return true if all of drawables, lights and children are empty.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Get user data.
Reimplemented from osg::Object.
|
inlinevirtual |
Get const user data.
Reimplemented from osg::Object.
|
inlinevirtual |
Reimplemented from osg::Object.
|
inline |
|
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 |
|
inlinestatic |
|
inlinestatic |
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.
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.
|
inline |
|
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.
|
inline |
|
mutable |
ChildList osgUtil::StateGraph::_children |
int osgUtil::StateGraph::_depth |
bool osgUtil::StateGraph::_dynamic |
LeafList osgUtil::StateGraph::_leaves |
|
mutable |
StateGraph* osgUtil::StateGraph::_parent |
const osg::StateSet* osgUtil::StateGraph::_stateset |
osg::ref_ptr<osg::Referenced> osgUtil::StateGraph::_userData |