VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectBuildingsHandler.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
17 
18 #include <osgEarth/Layer>
19 
20 #include <osg/observer_ptr>
21 #include <osg/ref_ptr>
22 #include <osg/Node>
23 
24 #include <boost/thread/mutex.hpp>
25 #include <boost/thread/condition_variable.hpp>
26 
27 namespace osgEarth
28 {
29  class Layer;
30 }
31 namespace osg
32 {
33  class Node;
34 }
35 
36 namespace makVrv
37 {
38  class DtDe;
39  class DtCellToGeoTypicalIndirectGeoMap;
40  class DtCellToGeoSpecificIndirectGeoMap;
41  class DtIndirectModelsContainer;
42  class DtModelSemanticsMapper;
43  class DtIndirectFadeParameters;
44 
55  {
56  public:
58  virtual ~DtIndirectBuildingsHandler();
59 
60  protected:
62  DtIndirectBuildingsHandler(DtDe& de, const osgEarth::Layer& layer, const DtIndirectFadeParameters& fadeParameters, bool dynamicTerrainInstallerActive, bool cullFaceEnabled);
63 
66 
67  private:
72 
73  public:
76  virtual void onDataPremerge(osg::Node* data);
77 
80  virtual void onDataUnloaded(const osg::Node* data);
81 
82  protected:
84  virtual void processBuildingsExternalModelNodes(const osg::Node* data);
85 
87  virtual void processInstancedModelNodes(const osg::Node* data);
88 
91  virtual void processElevationsLodNodes(const osg::Node* data);
92 
97  const osg::Node* preloadModelAndRunDynamicTerrainParser(const std::string& modelName);
98 
99  protected:
100 
107  osg::observer_ptr<const osgEarth::Layer> myLayer;
108 
112 
117 
119  // tile will have its own registrar. Therefore, we need the gs
120  // variant
122 
124 
126  boost::condition_variable myProcessedNodeMapCondition;
128  std::map<std::string, NodeRefPtr > myProcessedNodeMap;
129  std::map<std::string, bool > myIsProcessingNodeMap;
131 
133  const bool myCullFaceEnabled;
134  };
135 
138  {
139  public:
142 
145 
146  private:
151 
152  public:
153 
155  virtual DtIndirectBuildingsHandler* create(const osgEarth::Layer& layer,
156  const DtIndirectFadeParameters& fadeParameters, bool dynamicTerrainInstallerActive, bool cullFaceEnabled) const;
157 
160  static DtIndirectBuildingsHandlerCreator& instance(DtDe& de);
161 
163  static const std::string& theClassName();
164  protected:
166 
167  };
168 }
DtCellToGeoTypicalIndirectGeoMap * myCellToGTIndirectGeoMap
instanced models go here geotypical, share models
Definition: DtIndirectBuildingsHandler.h:115
Virtual base class.
Definition: DtVirtualBaseClass.h:19
DtCellToGeoSpecificIndirectGeoMap * myCellToBuildingsGSIndirectGeoMap
external models go here geospecific
Definition: DtIndirectBuildingsHandler.h:111
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoSpecificIndirectGeo DtCellG...
Definition: DtCellToGeoSpecificIndirectGeoMap.h:39
boost::condition_variable myProcessedNodeMapCondition
Definition: DtIndirectBuildingsHandler.h:126
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
std::map< std::string, NodeRefPtr > myProcessedNodeMap
Definition: DtIndirectBuildingsHandler.h:128
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoTypicalIndirectGeo DtCellGe...
Definition: DtCellToGeoTypicalIndirectGeoMap.h:39
class used to collect geometry coming in via buildings layer and add it to the indirect engine...
Definition: DtIndirectBuildingsHandler.h:54
const bool myDynamicTerrainInstallerActive
Definition: DtIndirectBuildingsHandler.h:132
DtIndirectModelsContainer * myGTModelsContainer
Definition: DtIndirectBuildingsHandler.h:116
class for holding an indirect geometry registrar (which holds the information about how to draw model...
Definition: DtIndirectModelsContainer.h:43
boost::mutex myProcessedNodeMapMutex
Definition: DtIndirectBuildingsHandler.h:125
Contains makVrv::DtVirtualBaseClass class.
const bool myCullFaceEnabled
Definition: DtIndirectBuildingsHandler.h:133
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtIndirectFadeParameters.h:17
DtDe & myDe
Definition: DtIndirectBuildingsHandler.h:165
DtDe & myDe
Definition: DtIndirectBuildingsHandler.h:101
creator class for DtIndirectBuildingsHandler, registered with the DtDe in it&#39;s instance() function ...
Definition: DtIndirectBuildingsHandler.h:137
std::map< std::string, bool > myIsProcessingNodeMap
Definition: DtIndirectBuildingsHandler.h:129
DtModelSemanticsMapper & myModelSematicsMapper
Definition: DtIndirectBuildingsHandler.h:130
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtCellToGeoSpecificIndirectGeoMap * myCellToTaggedGeodesGeoSpecificIndirectGeoMap
Procedural stuff that ends up as geodes. Is also geospecific in the sense that each.
Definition: DtIndirectBuildingsHandler.h:121
osg::observer_ptr< const osgEarth::Layer > myLayer
store by observer ptr here onDataPremerge for a node can get launched (in another thread) just after ...
Definition: DtIndirectBuildingsHandler.h:107
DtIndirectFadeParameters myFadeParameters
Definition: DtIndirectBuildingsHandler.h:123
The DtModelSemanticsMapper object is responsible for mapping Names of model semantics declarations (f...
Definition: DtModelSemanticsMapper.h:27
Contains DLL export macros.
Contains makVrv::DtIndirectFadeParameters class.
osg::ref_ptr< const osg::Node > NodeRefPtr
Definition: DtIndirectBuildingsHandler.h:127

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)