VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTerrainPatchObjectForestManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
8 #include <vrvSt/vrvSt.h>
9 #include <string>
10 
11 #include <boost/unordered_map.hpp>
12 #include <boost/unordered_set.hpp>
13 
14 #include <vrvCore/DtTreeRecord.h>
16 
17 namespace osg
18 {
19  class Node;
20 }
21 
22 namespace osgEarth
23 {
24  class Map;
25  class MapNode;
26  class ModelLayer;
27 }
28 
29 namespace makVrv
30 {
31  class DtDe;
32  class DtOsgTerrainPatchObject;
33  class DtStreamedSpeedTreeForest;
34 
40  {
41  public:
45 
46  void onDataLoaded(const osgEarth::Map* map, const osgEarth::ModelLayer* layer,
47  const osg::Node* data);
48  void onDataUnLoaded(const osgEarth::Map* map, const osgEarth::ModelLayer* layer,
49  const osg::Node* data);
50 
51  void onLayerLoaded(const osgEarth::MapNode* mapNode,
52  const osgEarth::ModelLayer* layer);
53  void onLayerUnLoaded(const osgEarth::MapNode* mapNode,
54  const osgEarth::ModelLayer* layer);
55 
56  void addSpeedTreesToForest(const std::string& forestName, const osg::Node* group, const DtVectorTreeRecords& treeRecords);
57 
58  void removeTreesFromForest(const std::string& forestName, const osg::Node* dataNode);
59 
60  protected:
61  DtStreamedSpeedTreeForest* createForest(const std::string& strName);
62  bool hasForest(const std::string& strName);
63  DtStreamedSpeedTreeForest* getForest(const std::string& strName);
64  void destroyForest(const std::string& strName);
65  size_t numForests(void) const;
66  void destroyAllForests(void);
67 
68  protected:
69  static std::string getForestName(const osgEarth::Map* map,
70  const osgEarth::ModelLayer* layer);
71 
72  protected:
73  typedef boost::unordered_map<std::string, DtStreamedSpeedTreeForest*>
76 
78 
80  };
81 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)