VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtStreamedSpeedTreeForest.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/DtUniqueID.h>
13 #include <vrvSt/vrvSt.h>
14 
15 #include <vrvCore/DtTreeRecord.h>
16 
17 #include <boost/unordered_map.hpp>
18 #include <boost/unordered_set.hpp>
19 
20 namespace osg
21 {
22  class Node;
23  class Observer;
24 }
25 
26 namespace osgEarth
27 {
28  class Map;
29  class MapNode;
30  class ModelLayer;
31 
32  namespace Features
33  {
34  class CustomFeatureNode;
35  }
36 }
37 
38 namespace makVrv
39 {
40  class DtDe;
41  class DtSpeedTreeForest;
42  class DtOsgTerrainPatchObject;
43  class CellNodeObserver;
44 
49  {
50  public:
53 
54  void onDataLoaded(const DtOsgTerrainPatchObject& patch, const osgEarth::Map* map,
55  const osgEarth::ModelLayer* layer, const osg::Node* data);
56  void onDataUnLoaded(const osgEarth::Map* map, const osgEarth::ModelLayer* layer,
57  const osg::Node* data);
58 
59  void onLayerLoaded(const osgEarth::MapNode* mapNode,
60  const osgEarth::ModelLayer* layer);
61  void onLayerUnLoaded(const osgEarth::MapNode* mapNode,
62  const osgEarth::ModelLayer* layer);
63 
64  void mapDataToCell(const osg::Node* dataNode, DtUniqueID cellID);
65 
66  void removeForestFromMapData(const osg::Node* dataNode);
67 
69  protected:
71  const osg::Node* data);
73  const osgEarth::Features::CustomFeatureNode* pFeatureNode, const osg::Node* data);
74 
75  bool observerExists(const osg::Node* data);
76  void createObserver(const osgEarth::Map* map, const osgEarth::ModelLayer* layer,
77  const osg::Node* data);
78  void destroyObserver(const osg::Node* data, bool bCheck);
80 
81  protected:
82  typedef std::map<std::string, std::pair<std::string, bool> > MarkerToModelDefinition;
83  static bool verifyExists(const osg::Observer* lhs, const osg::Node* data);
84  static bool getValidTreeModelDefinition(DtDe& de,
85  std::string& strCleanModelName, const std::string& strModelName,
87  typedef boost::unordered_set<std::string> ModelDefinitionSet;
88  protected:
93 
94  typedef boost::unordered_map<const osg::Node*, CellNodeObserver*>
97 
98  typedef std::set<DtUniqueID> IdSet;
99  typedef boost::unordered_map<const osg::Node*, IdSet> MapCellsToSubCells;
101  };
102 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)