VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtStreamedSpeedTreeForest.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 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, osgEarth::Map* map,
55  osgEarth::ModelLayer* layer, osg::Node* data);
56  void onDataUnLoaded(osgEarth::Map* map, osgEarth::ModelLayer* layer,
57  osg::Node* data);
58 
59  void onLayerLoaded(osgEarth::MapNode* mapNode,
60  osgEarth::ModelLayer* layer);
61  void onLayerUnLoaded(osgEarth::MapNode* mapNode,
62  osgEarth::ModelLayer* layer);
63 
64  void mapDataToCell(osg::Node* dataNode, DtUniqueID cellID);
65 
67  protected:
69  osg::Node* data);
71  osgEarth::Features::CustomFeatureNode* pFeatureNode, osg::Node* data);
72 
73  bool observerExists(osg::Node* data);
74  void createObserver(osgEarth::Map* map, osgEarth::ModelLayer* layer,
75  osg::Node* data);
76  void destroyObserver(osg::Node* data, bool bCheck);
78 
79  protected:
80  typedef std::map<std::string, std::pair<std::string, bool> > MarkerToModelDefinition;
81  static bool verifyExists(const osg::Observer* lhs, osg::Node* data);
82  static bool getValidTreeModelDefinition(DtDe& de,
83  std::string& strCleanModelName, const std::string& strModelName,
85  typedef boost::unordered_set<std::string> ModelDefinitionSet;
86  protected:
91 
92  typedef boost::unordered_map<osg::Node*, CellNodeObserver*>
95 
96  typedef std::set<DtUniqueID> IdSet;
97  typedef boost::unordered_map<osg::Node*, IdSet> MapCellsToSubCells;
99  };
100 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)