VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtStreamingSpeedTreeForestManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvSt/vrvSt.h>
13 
15 
16 #include <unordered_map>
17 
18 #include <vrvCore/DtTreeRecord.h>
19 
21 
22 namespace osg
23 {
24  class Node;
25 }
26 
27 namespace osgEarth
28 {
29  class Map;
30  class MapNode;
31  class Layer;
32  class VisibleLayer;
33 }
34 
35 namespace osgEarth
36 {
37  class CustomFeatureNode;
38 }
39 
40 namespace makVrv
41 {
42  class DtSpeedTreeForest;
43  class DtTerrainPatchObject;
44  class DtOsgTerrainPatchObject;
45  class DtTerrainPatchObjectForestManager;
46 
52  : public DtVirtualBaseClass
53  {
54  public:
55  static DtStreamingSpeedTreeForestManager& instance(DtDe& de);
56 
57  static void registerInstance(DtDe& de,
59 
60  public:
63 
66 
69 
72 
73 
74  public:
75  //Used to cleanup the patch object forest managers before the singleton is recreated.
76  virtual void cleanupPatchObjectForestManagers();
77 
78  protected:
79 
82 
83  void slot_terrainPatchCreated(DtTerrainPatchObject& patch);
84  void slot_terrainPatchAboutToBeDeleted(DtTerrainPatchObject& patch);
85 
86 
87  void slot_createListOfTreesOnTerrain(const DtVectorTreeRecords& treeRecords, DtTerrainPatchObject& patch);
88 
90  void onLayerVisibilityChanged(DtOsgTerrainPatchObject* patch, const osgEarth::VisibleLayer* layer);
91 
92  void onLayerLoaded(DtOsgTerrainPatchObject* patch,
93  const osgEarth::MapNode* mapNode, osgEarth::Layer* layer);
94  void onLayerUnLoaded(DtOsgTerrainPatchObject* patch,
95  const osgEarth::MapNode* mapNode, const osgEarth::Layer* layer);
96 
97  void onDataLoaded(DtOsgTerrainPatchObject* patch,
98  const osgEarth::Layer* layer, const osg::Node* data);
99  void onDataUnLoaded(DtOsgTerrainPatchObject* patch,
100  const osgEarth::Layer* layer, const osg::Node* data);
101 
102  DtTerrainPatchObjectForestManager* forestManager(
103  DtOsgTerrainPatchObject* patch);
104 
105  protected:
107 
108  typedef std::unordered_map<DtOsgTerrainPatchObject*,
110 
114  };
115 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtDe & myDe
Definition: DtStreamingSpeedTreeForestManager.h:106
#define DT_DLL_VRVST
Definition: vrvSt.h:20
DtStreamingSpeedTreeForestManager is a singleton class that manages a collection of DtTerrainPatchObj...
Definition: DtStreamingSpeedTreeForestManager.h:51
Contains DLL export macros.
std::vector< DtTreeRecord * > DtVectorTreeRecords
Definition: DtTreeRecord.h:137
A DtTerrainPatchObject contains the methods for loading a file as a terrain. When loading a file as a...
Definition: DtTerrainPatchObject.h:37
Contains makVrv::DtVirtualBaseClass class.
A DtOsgTerrainPatchObject contains the methods for loading a file as a terrain. When loading a file a...
Definition: DtOsgTerrainPatchObject.h:51
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtTerrainPatchObjectForestManager manages a collection of DtStreamedSpeedTreeForest objects...
Definition: DtTerrainPatchObjectForestManager.h:40
Base class to provide boost signal/slot management.
DtSignalConnectionManager mySignalConnections
Definition: DtStreamingSpeedTreeForestManager.h:112
DtStreamingSpeedTreeVisibilityCallback is a callback responsible for hiding/showing speedtrees for an...
Definition: DtStreamingSpeedTreeFeatureCallback.h:44
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
DtStreamingSpeedTreeFeatureCallback is a data broker callback that will create speedtrees for an osgE...
Definition: DtStreamingSpeedTreeFeatureCallback.h:62
MapPatchesToForestManager myMapPatchesToForestManager
Definition: DtStreamingSpeedTreeForestManager.h:111
Contains makVrv::DtTreeRecord class.
std::unordered_map< DtOsgTerrainPatchObject *, DtTerrainPatchObjectForestManager * > MapPatchesToForestManager
Definition: DtStreamingSpeedTreeForestManager.h:109
bool myConnectedToPatchDeletion
Definition: DtStreamingSpeedTreeForestManager.h:113

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)