osgDB::SharedStateManager Class Reference

Inheritance diagram for osgDB::SharedStateManager:

Inheritance graph
[legend]

List of all members.

Public Types

enum  ShareMode { SHARE_NONE = 0x00, SHARE_TEXTURES = 0x01, SHARE_STATESETS = 0x02, SHARE_ALL }

Public Member Functions

 SharedStateManager ()
void setShareMode (unsigned int mode)
unsigned int getShareMode ()
void prune ()
void share (osg::Node *node, OpenThreads::Mutex *mt=0)
void apply (osg::Node &node)
void apply (osg::Geode &geode)

Protected Types

typedef std::set
< osg::ref_ptr
< osg::StateAttribute > > 
TextureSet
typedef std::set
< osg::ref_ptr
< osg::StateSet > > 
StateSetSet
typedef std::pair
< osg::StateAttribute *,
bool > 
TextureSharePair
typedef std::map
< osg::StateAttribute *,
TextureSharePair
TextureTextureSharePairMap
typedef std::pair
< osg::StateSet *,
bool > 
StateSetSharePair
typedef std::map
< osg::StateSet *,
StateSetSharePair
StateSetStateSetSharePairMap

Protected Member Functions

void process (osg::StateSet *ss, osg::Object *parent)
osg::StateAttributefind (osg::StateAttribute *sa)
osg::StateSetfind (osg::StateSet *ss)
void setStateSet (osg::StateSet *ss, osg::Object *object)
void shareTextures (osg::StateSet *ss)

Protected Attributes

TextureSet _sharedTextureList
StateSetSet _sharedStateSetList
TextureTextureSharePairMap tmpSharedTextureList
StateSetStateSetSharePairMap tmpSharedStateSetList
unsigned int shareMode
OpenThreads::Mutex * mutex


Member Typedef Documentation

typedef std::set< osg::ref_ptr<osg::StateAttribute> > osgDB::SharedStateManager::TextureSet [protected]

typedef std::set< osg::ref_ptr<osg::StateSet> > osgDB::SharedStateManager::StateSetSet [protected]

typedef std::pair<osg::StateAttribute*, bool> osgDB::SharedStateManager::TextureSharePair [protected]

typedef std::map<osg::StateAttribute*, TextureSharePair> osgDB::SharedStateManager::TextureTextureSharePairMap [protected]

typedef std::pair<osg::StateSet*, bool> osgDB::SharedStateManager::StateSetSharePair [protected]

typedef std::map<osg::StateSet*, StateSetSharePair> osgDB::SharedStateManager::StateSetStateSetSharePairMap [protected]


Member Enumeration Documentation

enum osgDB::SharedStateManager::ShareMode

Enumerator:
SHARE_NONE 
SHARE_TEXTURES 
SHARE_STATESETS 
SHARE_ALL 


Constructor & Destructor Documentation

osgDB::SharedStateManager::SharedStateManager (  ) 


Member Function Documentation

void osgDB::SharedStateManager::setShareMode ( unsigned int  mode  )  [inline]

unsigned int osgDB::SharedStateManager::getShareMode (  )  [inline]

void osgDB::SharedStateManager::prune (  ) 

void osgDB::SharedStateManager::share ( osg::Node node,
OpenThreads::Mutex *  mt = 0 
)

void osgDB::SharedStateManager::apply ( osg::Node node  )  [virtual]

Reimplemented from osg::NodeVisitor.

void osgDB::SharedStateManager::apply ( osg::Geode geode  )  [virtual]

Reimplemented from osg::NodeVisitor.

void osgDB::SharedStateManager::process ( osg::StateSet ss,
osg::Object parent 
) [protected]

osg::StateAttribute* osgDB::SharedStateManager::find ( osg::StateAttribute sa  )  [protected]

osg::StateSet* osgDB::SharedStateManager::find ( osg::StateSet ss  )  [protected]

void osgDB::SharedStateManager::setStateSet ( osg::StateSet ss,
osg::Object object 
) [protected]

void osgDB::SharedStateManager::shareTextures ( osg::StateSet ss  )  [protected]


Member Data Documentation

TextureSet osgDB::SharedStateManager::_sharedTextureList [protected]

StateSetSet osgDB::SharedStateManager::_sharedStateSetList [protected]

TextureTextureSharePairMap osgDB::SharedStateManager::tmpSharedTextureList [protected]

StateSetStateSetSharePairMap osgDB::SharedStateManager::tmpSharedStateSetList [protected]

unsigned int osgDB::SharedStateManager::shareMode [protected]

OpenThreads::Mutex* osgDB::SharedStateManager::mutex [protected]


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