VR-Forces Developer's Guide
 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) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
17 
19 
20 #include <osgEarth/Layer>
21 
22 #include <osg/observer_ptr>
23 #include <osg/ref_ptr>
24 #include <osg/Node>
25 
26 #include <boost/thread/mutex.hpp>
27 #include <boost/thread/condition_variable.hpp>
28 
29 #include <unordered_map>
30 
31 namespace osgEarth
32 {
33  class Layer;
34 }
35 namespace osg
36 {
37  class Node;
38 }
39 
40 namespace makVrv
41 {
42  class DtDe;
43  class DtCellToGeoTypicalIndirectGeoMap;
44  class DtCellToGeoSpecificIndirectGeoMap;
45  class DtIndirectModelsContainer;
46  class DtModelSemanticsMapper;
47  class DtIndirectFadeParameters;
48  class DtCellIndirectGeo;
49 
50  class DtIndirectModelContainerForHandlers;
51  class DtBuildingMetadataNodeHandler;
52 
55 
58 
60  template <>
61  inline const char* creatorTypeName<DtIndirectBuildingsHandler>(void) { return "DtIndirectBuildingsHandlerCreator"; }
62 
73  {
74  public:
76  virtual ~DtIndirectBuildingsHandler();
77 
78  protected:
80  DtIndirectBuildingsHandler(DtDe& de, const osgEarth::Layer& layer, const DtIndirectFadeParameters& fadeParameters, bool dynamicTerrainInstallerActive, bool cullFaceEnabled);
81 
84 
85  private:
90 
91  public:
94  virtual void onDataPremerge(osg::Node* data);
95 
98  virtual void onDataUnloaded(const osg::Node* data);
99 
101  virtual void slot_postTick();
102 
103  protected:
105  virtual void processBuildingsExternalModelNodes(const osg::Node* data, DtBuildingMetadataNodeHandler& metadataHandler);
106 
108  virtual void processInstancedModelNodes(const osg::Node* data, DtBuildingMetadataNodeHandler& metadataHandler);
109 
112  virtual void processElevationsLodNodes(const osg::Node* data, DtBuildingMetadataNodeHandler& metadataHandler);
113 
114  protected:
115 
122  osg::observer_ptr<const osgEarth::Layer> myLayer;
123 
127 
132 
134  // tile will have its own registrar. Therefore, we need the gs
135  // variant
137 
139 
141  const bool myCullFaceEnabled;
142 
145 
147  };
148 
149 }
DtCellToGeoTypicalIndirectGeoMap * myGtMap
instanced models go here geotypical, share models
Definition: DtIndirectBuildingsHandler.h:130
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoSpecificIndirectGeo DtCellG...
Definition: DtCellToGeoSpecificIndirectGeoMap.h:39
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
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:72
const bool myDynamicTerrainInstallerActive
Definition: DtIndirectBuildingsHandler.h:140
class for holding an indirect geometry registrar (which holds the information about how to draw model...
Definition: DtIndirectModelsContainer.h:55
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
const bool myCullFaceEnabled
Definition: DtIndirectBuildingsHandler.h:141
DtIndirectModelContainerForHandlers & myIndirectModelContainerForHandlers
Definition: DtIndirectBuildingsHandler.h:146
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Layer Handlers can request models that can be for a dynamic layer or not for a dynamic layer...
Definition: DtIndirectModelContainerForHandlers.h:34
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtIndirectFadeParameters.h:17
Handles the discover of MetadataNode nodes and the sharing of DtIndirectSharedMetadataNodeWrapper obj...
Definition: DtBuildingMetadataNodeHandler.h:33
friend DtIndirectBuildingsHandlerCreator
creator friend class so it is the only one that can create new DtIndirectBuildingsHandler ...
Definition: DtIndirectBuildingsHandler.h:83
DtCellToGeoSpecificIndirectGeoMap * myProceduralGsMap
Procedural stuff that ends up as geodes. Is also geospecific in the sense that each.
Definition: DtIndirectBuildingsHandler.h:136
DtDe & myDe
Definition: DtIndirectBuildingsHandler.h:116
Base class to provide boost signal/slot management.
DtSignalConnectionManager myConnections
manager for connections
Definition: DtIndirectBuildingsHandler.h:144
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:72
DtVirtualBaseClassCreator< DtIndirectBuildingsHandler, const osgEarth::Layer &, const DtIndirectFadeParameters &, const bool &, const bool & > DtIndirectBuildingsHandlerCreator
creator
Definition: DtIndirectBuildingsHandler.h:54
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:122
DtCellToGeoSpecificIndirectGeoMap * myGsMap
external models go here geospecific
Definition: DtIndirectBuildingsHandler.h:126
const char * creatorTypeName< DtIndirectBuildingsHandler >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectBuildingsHandler.h:61
DtIndirectFadeParameters myFadeParameters
Definition: DtIndirectBuildingsHandler.h:138
Contains DLL export macros.
Contains makVrv::DtIndirectFadeParameters class.
DtIndirectModelsContainer * myGtModelsContainer
Definition: DtIndirectBuildingsHandler.h:131

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)