VR-Forces 4.1.1 Class Documentation
DtOsgForest.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgForest.h,v $ $Revision: 1.35 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtOsgForest_H_
14 #define DtOsgForest_H_
15 
16 #include <vrvOsg/vrvOsg.h>
17 #include <vrvCore/DtForestObject.h>
18 #include <vrvCore/DtAgentManager.h>
19 #include <osg/ref_ptr>
20 #include <osg/Group>
21 
22 namespace makVrv
23 {
24  class DtOsgModelInstance;
25 
29  {
30 
31  public:
32 
33  typedef std::map<DtUniqueID, osg::PositionAttitudeTransform*> TreePatMap;
34 
36  friend class DtOsgForestClassesCreator;
37  friend class DtOsgForestCreator;
38 
40  virtual ~DtOsgForest();
41 
45 
46 
48  virtual void removeTree(DtUniqueID id);
49 
51  virtual void removeAllTrees();
52 
54  virtual void setTreeClippingPlane(float fFar);
55 
57  virtual void setTreeLodDistances(float fNear, float fFar);
58 
60  virtual void getTreeClippingPlane(float& fFar);
61 
63  virtual void getTreeLodDistances(float& fNear, float& fFar);
64 
66  virtual void setPerformanceProfile(int profile);
67 
69 
73 
74 
76  virtual void addUniqueTree(const DtTreeRecord& record);
77 
79  unsigned int treeCount() const;
80 
82  virtual DtTreeRecord* findTreeRecord(DtUniqueID id);
83 
85  virtual DtTreeModel* findTreeModel( const std::string& modelDef);
86 
88  virtual DtModelInstance* findModelInstance( const std::string& modelDef);
89 
91  virtual osg::Group* rootGroup();
92 
94 
95  protected:
96 
98  DtOsgForest(DtDe& de, DtUniqueID id);
99 
101  virtual bool createTree(const DtTreeRecord& record);
102 
103  virtual osg::PositionAttitudeTransform* createPat( const DtTreeRecord &record );
104 
106  virtual DtOsgModelInstance* findOsgModelInstance( const std::string& modelDef);
107 
109  virtual osg::PositionAttitudeTransform* findPat(const DtUniqueID id);
110 
112  virtual void removePat(const DtUniqueID id);
113 
115  virtual void slot_treeModelInstanceToBeDestroyed(const std::string& modelDef);
116 
118  virtual void removeTreeModel( const std::string& modelDef);
119 
121  virtual void slot_treeModelInstanceCreated(const std::string& modelDef);
122 
123  protected:
124 
126 
128  osg::ref_ptr<osg::Group> myRoot;
129  float myFarPlane;
130  float myNearLOD;
131  float myFarLOD;
132 
133  };
134 
138  {
139 
140  public:
141 
143  virtual DtForestObject* create(DtDe& de, DtUniqueID id);
144 
145  };
146 
147 }
148 
149 #endif
150 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)