VR-Forces 4.8 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 Layer;
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::Layer* layer,
47  const osg::Node* data);
48  void onDataUnLoaded(const osgEarth::Map* map, const osgEarth::Layer* layer,
49  const osg::Node* data);
50 
51  void onLayerLoaded(const osgEarth::MapNode* mapNode,
52  osgEarth::Layer* layer);
53  void onLayerUnLoaded(const osgEarth::MapNode* mapNode,
54  const osgEarth::Layer* 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::Layer* layer);
71 
72  protected:
73  typedef boost::unordered_map<std::string, DtStreamedSpeedTreeForest*>
76 
78 
80  };
81 }
boost::unordered_map< std::string, DtStreamedSpeedTreeForest * > MapStreamedForests
Definition: DtTerrainPatchObjectForestManager.h:74
DtStreamedSpeedTreeForest manages the streaming management for The DtSpeedTreeForest that is contains...
Definition: DtStreamedSpeedTreeForest.h:50
MapStreamedForests myStreamedForests
Definition: DtTerrainPatchObjectForestManager.h:75
#define DT_DLL_VRVST
Definition: vrvSt.h:23
DtOsgTerrainPatchObject & myPatch
Definition: DtTerrainPatchObjectForestManager.h:77
Contains DLL export macros.
std::vector< DtTreeRecord * > DtVectorTreeRecords
Definition: DtTreeRecord.h:137
A DtOsgTerrainPatchObject contains the methods for loading a file as a terrain.
Definition: DtOsgTerrainPatchObject.h:50
DtTerrainPatchObjectForestManager manages a collection of DtStreamedSpeedTreeForest objects...
Definition: DtTerrainPatchObjectForestManager.h:39
DtDe & myDe
Definition: DtTerrainPatchObjectForestManager.h:79
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains makVrv::DtTreeRecord class.
Contains makVrv::DtTerrainPatchObject class.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)