VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtSceneGraph.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/DtOsgRenderer.h>
13 #include <cstdio>
14 namespace makVrv
15 {
21  {
22  public:
24  DtSceneGraph(DtOsgRenderer* renderer);
25 
27  virtual ~DtSceneGraph();
28 
30  virtual void addNodeToRoot(osg::Node* node, DtOsgRenderer::SceneRoot sr, bool createOnAccess);
31 
36  virtual void addRootToNode(osg::Group* node, DtOsgRenderer::SceneRoot sr, bool createOnAccess);
37 
42  virtual void addActiveRootToNode(osg::Group* node, DtOsgRenderer::SceneRoot sr, bool createOnAccess);
43 
45  virtual void removeNodeFromRoot(osg::Node* node, DtOsgRenderer::SceneRoot sr);
46 
51  virtual void removeRootFromNode(osg::Group* node, DtOsgRenderer::SceneRoot sr);
52 
57  virtual void removeActiveRootFromNode(osg::Group* node, DtOsgRenderer::SceneRoot sr);
58 
60  virtual void traverseRoot(osg::NodeVisitor& nv, DtOsgRenderer::SceneRoot sr);
61 
63  virtual void setSceneRootNodeMask(DtOsgRenderer::SceneRoot sr, osg::Node::NodeMask nodeMask);
64 
66  virtual osg::Node::NodeMask sceneRootNodeMask(DtOsgRenderer::SceneRoot sr);
67 
69  virtual osg::BoundingSphere sceneRootBound(DtOsgRenderer::SceneRoot sr);
70 
72  virtual osg::BoundingSphere sceneRootListBound( const DtOsgRenderer::RootList& srList );
73 
79  virtual osg::Group* findSceneRootChildByName(
80  DtOsgRenderer::SceneRoot parent, const std::string& rootName );
81 
83  virtual void setRenderRootAsSceneData( osgViewer::View& view );
84 
86  virtual osg::Group* createModelSetRoot( int modelSet );
87 
88  protected:
89  // Used internally by the other scene root using functions to find the
90  // correct root for adding/removing children, Getting child counts, etc.
91  virtual osg::Group* getContainerRoot(DtOsgRenderer::SceneRoot root, bool createOnAccess);
92 
93  // Container roots may have other roots over them for doing transforms, etc.
94  // This gets the topmost root associated with that scene root, useful for
95  // traversal, nodeMask setting/getting, etc.
96  virtual osg::Group* getActiveRoot(DtOsgRenderer::SceneRoot root);
97 
98  private:
100  };
101 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)