VR-Forces 4.1 Class Documentation
DtSpeedTreeForest.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtSpeedTreeForest.h,v $ $Revision: 1.26 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtSpeedTreeForest_H_
14 #define DtSpeedTreeForest_H_
15 
16 #include <vrvSt/vrvSt.h>
17 #include <vrvOsg/DtOsgForest.h>
19 #include <osg/ref_ptr>
20 #include <osg/PositionAttitudeTransform>
21 #include <osg/Geode>
22 
23 namespace makVrv
24 {
25 
26  class DtAgentUpdateResolverInterface;
27  class DtSpeedTreeModelInstance;
28 
32  {
33 
34  public:
35 
37  friend class DtSpeedTreeForestClassesCreator;
39 
41  virtual ~DtSpeedTreeForest();
42 
46 
47 
49  virtual void removeTree(DtUniqueID record);
50 
53  virtual void setTreeClippingPlane(float fFar);
54 
64  virtual void setTreeLodDistances(float fNear, float fFar);
65 
67  virtual void setPerformanceProfile(int profile);
68 
69 
71 
72 
76 
77 
79  virtual void addUniqueTree(const DtTreeRecord& record);
80 
82  virtual DtSpeedTreeModelInstance* findSpeedTreeModelInstance( const std::string& modelDef);
83 
85  bool makeContextCurrent();
86 
88 
89  protected:
90 
93 
95  virtual void slot_treeModelInstanceToBeDestroyed(const std::string& modelDef);
96 
98  virtual void slot_treeModelInstanceCreated(const std::string& modelDef);
99 
101  virtual DtTreeModel* castUpdaterToTreeModel( DtAgentUpdateResolverInterface* updater );
102 
104  virtual bool createTree(const DtTreeRecord& record);
105 
106  protected:
107 
108  osg::ref_ptr<osg::PositionAttitudeTransform> myPat;
109  osg::ref_ptr<osg::Geode> myGeode;
110  //osg::ref_ptr<DtIgSpeedTreeForestDrawable> myDrawable;
111  osg::ref_ptr<DtSpeedTreeDrawable> myDrawable;
112 
113  };
114 
118  {
119 
120  public:
121 
123  virtual DtForestObject* create(DtDe& de, DtUniqueID id);
124 
125  };
126 }
127 
128 #endif
129 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)