VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
makVrv::DtSceneGraph Class Reference

Abstraction over the OSG scene graph.

Provides basic scene graph manipulation and querying

Public Member Functions

 DtSceneGraph (DtDe &de, DtOsgRenderer *renderer)
 
virtual ~DtSceneGraph ()
 
virtual bool isSceneRootEmpty (const DtSceneRoot &sr)
 
virtual void addNodeToRoot (osg::Node *node, const DtSceneRoot &sr, bool createOnAccess)
 
virtual void addSceneRootToRoot (const DtSceneRoot &childRoot, const DtSceneRoot &parentRoot, bool createOnAccess)
 
virtual void addRootToNode (osg::Group *node, const DtSceneRoot &sr, bool createOnAccess)
 
virtual void addActiveRootToNode (osg::Group *node, const DtSceneRoot &sr, bool createOnAccess)
 
virtual bool removeNodeFromRoot (osg::Node *node, const DtSceneRoot &sr)
 
virtual void removeSceneRootFromRoot (const DtSceneRoot &childRoot, const DtSceneRoot &parentRoot)
 
virtual void removeRootFromNode (osg::Group *node, const DtSceneRoot &sr)
 
virtual void removeActiveRootFromNode (osg::Group *node, const DtSceneRoot &sr)
 
virtual void traverseRoot (osg::NodeVisitor &nv, const DtSceneRoot &sr)
 
virtual void setSceneRootNodeMask (const DtSceneRoot &sr, osg::Node::NodeMask nodeMask)
 
virtual osg::Node::NodeMask sceneRootNodeMask (const DtSceneRoot &sr)
 
virtual osg::BoundingSphere sceneRootBound (const DtSceneRoot &sr)
 
virtual osg::BoundingSphere sceneRootListBound (const DtSceneRootList &srList)
 
virtual osg::Group * findSceneRootChildByName (const DtSceneRoot &parent, const std::string &rootName, bool subString=false)
 
virtual void setRenderRootAsSceneData (osgViewer::View &view)
 
virtual osg::Group * createModelSetRoot (DtModelSetId modelSet)
 
virtual bool matchesSceneRoot (const DtSceneRoot &sr, osg::Group *group)
 

Protected Member Functions

virtual osg::Group * getContainerRoot (const DtSceneRoot &root, bool createOnAccess)
 
virtual osg::Group * getActiveRoot (const DtSceneRoot &root)
 

Private Attributes

DtOsgRenderermyRenderer
 
DtDemyDe
 

Constructor & Destructor Documentation

makVrv::DtSceneGraph::DtSceneGraph ( DtDe de,
DtOsgRenderer renderer 
)

CTOR.

virtual makVrv::DtSceneGraph::~DtSceneGraph ( )
virtual

DTOR.

Member Function Documentation

virtual bool makVrv::DtSceneGraph::isSceneRootEmpty ( const DtSceneRoot sr)
virtual

Checks to see if the specified sceneRoot currently has any children. Note that: in some cases, this may cause a scene root to be created if it doesn't exist A scene root that doesn't exist (and doesn't get created) is considered 'empty' by this method.

virtual void makVrv::DtSceneGraph::addNodeToRoot ( osg::Node *  node,
const DtSceneRoot sr,
bool  createOnAccess 
)
virtual

Add a node to the specified SceneRoot.

virtual void makVrv::DtSceneGraph::addSceneRootToRoot ( const DtSceneRoot childRoot,
const DtSceneRoot parentRoot,
bool  createOnAccess 
)
virtual

Add a (child) SceneRoot to the specified SceneRoot.

virtual void makVrv::DtSceneGraph::addRootToNode ( osg::Group *  node,
const DtSceneRoot sr,
bool  createOnAccess 
)
virtual

Add the specified SceneRoot to an OSG group node.

This should be used with caution - it creates a dependency between the caller and the scene graph's internal node structure.

virtual void makVrv::DtSceneGraph::addActiveRootToNode ( osg::Group *  node,
const DtSceneRoot sr,
bool  createOnAccess 
)
virtual

Add the specified SceneRoot to an OSG group node using its active parent.

This should be used with caution - it creates a dependency between the caller and the scene graph's internal node structure.

virtual bool makVrv::DtSceneGraph::removeNodeFromRoot ( osg::Node *  node,
const DtSceneRoot sr 
)
virtual

Remove a node from the specified SceneRoot.

virtual void makVrv::DtSceneGraph::removeSceneRootFromRoot ( const DtSceneRoot childRoot,
const DtSceneRoot parentRoot 
)
virtual

Remove a (child) sceneRoot from the specified parent SceneRoot.

virtual void makVrv::DtSceneGraph::removeRootFromNode ( osg::Group *  node,
const DtSceneRoot sr 
)
virtual

Remove a scene root from an OSG group node.

This should be used with caution - it creates a dependency between the caller and the scene graph's internal node structure.

virtual void makVrv::DtSceneGraph::removeActiveRootFromNode ( osg::Group *  node,
const DtSceneRoot sr 
)
virtual

Remove a scene root's active parent from an OSG group node.

This should be used with caution - it creates a dependency between the caller and the scene graph's internal node structure.

virtual void makVrv::DtSceneGraph::traverseRoot ( osg::NodeVisitor &  nv,
const DtSceneRoot sr 
)
virtual

Traverse from the specified SceneRoot with the given visitor.

virtual void makVrv::DtSceneGraph::setSceneRootNodeMask ( const DtSceneRoot sr,
osg::Node::NodeMask  nodeMask 
)
virtual

Set the nodemask of a SceneRoot.

virtual osg::Node::NodeMask makVrv::DtSceneGraph::sceneRootNodeMask ( const DtSceneRoot sr)
virtual

Get the nodemask of a SceneRoot.

virtual osg::BoundingSphere makVrv::DtSceneGraph::sceneRootBound ( const DtSceneRoot sr)
virtual

Get the bounding sphere of sceneRoot.

virtual osg::BoundingSphere makVrv::DtSceneGraph::sceneRootListBound ( const DtSceneRootList srList)
virtual

Get the bounding sphere of list of sceneRoots.

virtual osg::Group* makVrv::DtSceneGraph::findSceneRootChildByName ( const DtSceneRoot parent,
const std::string &  rootName,
bool  subString = false 
)
virtual

Look up a root by name in the parent specified by SceneRoot.

This should not be used to access roots that are created by Vantage. It Is provided for plugins to find the roots possibly created by other plugins (such as multiple GlStudio plugins, for example)

Parameters
subString,:matches name as a substring of the name, else exact name match
virtual void makVrv::DtSceneGraph::setRenderRootAsSceneData ( osgViewer::View &  view)
virtual

Set the sceneData of a view to the top of the scene graph.

virtual osg::Group* makVrv::DtSceneGraph::createModelSetRoot ( DtModelSetId  modelSet)
virtual

Create a root node for the model set and return it.

virtual bool makVrv::DtSceneGraph::matchesSceneRoot ( const DtSceneRoot sr,
osg::Group *  group 
)
virtual

Test if this group matches the given scene root.

virtual osg::Group* makVrv::DtSceneGraph::getContainerRoot ( const DtSceneRoot root,
bool  createOnAccess 
)
protectedvirtual
virtual osg::Group* makVrv::DtSceneGraph::getActiveRoot ( const DtSceneRoot root)
protectedvirtual

Member Data Documentation

DtOsgRenderer* makVrv::DtSceneGraph::myRenderer
private
DtDe& makVrv::DtSceneGraph::myDe
private

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)