VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPagedTilesIndirectManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
15 
18 
19 #include <osg/Matrixd>
20 #include <osg/Geode>
21 
22 #include <string>
23 #include <vector>
24 
25 #include <boost/thread/condition.hpp>
26 #include <boost/signals2/connection.hpp>
27 
28 namespace osg
29 {
30  class Node;
31  class Group;
32 }
33 
34 namespace makVrv
35 {
36  class DtCellToGeoTypicalIndirectGeoMap;
37  class DtCellToGeoSpecificIndirectGeoMap;
38  class DtCellIndirectGeo;
39  class DtCellGeoTypicalIndirectGeo;
40  class DtCellGeoSpecificIndirectGeo;
41  class DtIndirectModelsContainer;
42  class DtIndirectVisitorControlGroupCreator;
43  struct DtNodePlusTraversalInfo;
44 }
45 
46 //Debug/testing option for seeing if rendering the proxy nodes as a GS cell works better vs a GT cell
47 // Currently should be set to 1 since we want to use GT cells
48 #define DTPAGEDTILESINDIRECTMANAGER_PROXIES_USE_GT 1
49 
50 namespace makVrv
51 {
56  {
57 
58  protected:
59 
60  //Constructor, adjustLodStart is used if it is a metaflight terrain.
61  DtPagedTilesIndirectManager(DtDe& de, bool adjustLodStart, bool connectToPagingSignals);
62 
65 
66  public:
68  virtual ~DtPagedTilesIndirectManager();
69 
70 
71  private:
78 
79  public:
80 
81  typedef std::vector< DtNodePlusTraversalInfo > ProxyNodesArray;
82 
84  virtual void setName(const std::string& name);
85 
90  virtual void nodePagedIn(const osg::Node* node, const std::string& fileName, osg::NodePath& parentalNodePath);
91 
95  virtual void nodePagingOut(const osg::Node* node);
96 
100  virtual void addTextureLoaderToSceneGraph(osg::Group& myTerrainGroup);
101 
102  protected:
103 
108  virtual void slot_childLoaded(const osg::Node* child, const std::string& fileName, osg::Node*& returnedNode);
109 
114  virtual void slot_childPagedIn(const osg::Group* page, const osg::Node* child);
115 
118  virtual void indirectChildFromPageIn(const osg::Group* page, const osg::Node* child, const std::string& fileName, osg::NodePath& parentalNodePath);
119 
121  virtual void keyNodeGettingDeleted(const osg::Group* child, DtCellToGeoTypicalIndirectGeoMap* cellMap);
122 
124  virtual void keyNodeGettingDeleted(const osg::Group* child, DtCellToGeoSpecificIndirectGeoMap* cellMap);
125 
130  virtual void slot_childAboutToPageOut(const osg::Group* page, const osg::Node* child);
131 
135  virtual bool processProxyNodes(osg::Group *indirectGroup, const osg::Group* child, std::set<osg::Node*>& foundProxyNodes,
136  osg::NodePath& parentalNodePath);
137 
139  virtual void processGeodes(osg::Group* indirectGroup, osg::Group* child, const std::string& fileName,
140  const std::set<osg::Node*>& foundProxyNodes, bool backgroundThread, osg::NodePath& parentalNodePath);
141 
143  virtual void replaceChildWithGroup(const osg::Group* child, const osg::Group* childReplacement);
144 
146  virtual void indirectThisChild(osg::Group* intersectionGroup, osg::Group* child, const std::string& fileName,
147  bool backgroundThread, osg::NodePath& parentalNodePath);
148 
150  virtual void disconnectSignalsAndWait();
151 
153  virtual void printHierarchy(const osg::Node* node) const;
154 
156  virtual bool removeNodesWithDofParents(ProxyNodesArray& nodesArray) const;
157 
159  virtual void removeBillboards(ProxyNodesArray& nodesArray) const;
160 
162  virtual void removeNestedProxyNodes(ProxyNodesArray& proxyNodesArray) const;
163 
165  virtual DtIndirectModelsContainer* GTModelsContainer();
166 
167  protected:
169 
170 #if DTPAGEDTILESINDIRECTMANAGER_PROXIES_USE_GT
173 #else
174  DtCellToGeoSpecificIndirectGeoMap* myCellToGSIndirectGeoMap;
175 #endif
176 
178 
180  typedef std::vector<boost::signals2::connection> Connections;
181 
184 
186 
187  boost::mutex mySignalMutex;
188  boost::condition mySignalConditional;
192  };
193 
197  {
198  public:
201 
204 
206  virtual DtPagedTilesIndirectManager* create(bool adjustSkinLodStart, bool connectToPagingSignals) const;
207 
210  static DtPagedTilesIndirectManagerCreator& instance(DtDe& de);
211 
213  static const std::string& theClassName();
214  protected:
216  };
217 }
Virtual base class.
Definition: DtVirtualBaseClass.h:22
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoSpecificIndirectGeo DtCellG...
Definition: DtCellToGeoSpecificIndirectGeoMap.h:36
DtCellToGeoSpecificIndirectGeoMap * myCellToGSIndirectGeoMapTerrainSkin
Definition: DtPagedTilesIndirectManager.h:177
handles the management of paged tiles and terrain patches being added to the indirect rendering syste...
Definition: DtPagedTilesIndirectManager.h:55
DtIndirectVisitorControlGroupCreator & myIndirectGeoIntersectionGroupCreator
Definition: DtPagedTilesIndirectManager.h:191
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Definition: featureContext.h:37
boost::mutex mySignalMutex
Definition: DtPagedTilesIndirectManager.h:187
std::vector< DtNodePlusTraversalInfo > ProxyNodesArray
Definition: DtPagedTilesIndirectManager.h:81
DtIndirectModelsContainer * myGTModelsContainer
Definition: DtPagedTilesIndirectManager.h:172
Connections myConnections
The connected signals.
Definition: DtPagedTilesIndirectManager.h:183
bool myAdjustLodStart
Definition: DtPagedTilesIndirectManager.h:190
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoTypicalIndirectGeo DtCellGe...
Definition: DtCellToGeoTypicalIndirectGeoMap.h:31
creator for DtIndirectVisitorControlGroup
Definition: DtIndirectVisitorControlGroup.h:56
class for holding an indirect geometry registrar (which holds the information about how to draw model...
Definition: DtIndirectModelsContainer.h:47
std::vector< boost::signals2::connection > Connections
A collection of signals.
Definition: DtPagedTilesIndirectManager.h:180
Contains makVrv::DtVirtualBaseClass class.
DtDe & myDe
Definition: DtPagedTilesIndirectManager.h:215
DtDe & myDe
Definition: DtPagedTilesIndirectManager.h:168
osg::ref_ptr< DtIndirectTextureLoaderNode > myTextureLoaderNode
Definition: DtPagedTilesIndirectManager.h:185
boost::condition mySignalConditional
Definition: DtPagedTilesIndirectManager.h:188
int mySignalWaitCount
Definition: DtPagedTilesIndirectManager.h:189
Contains makVrv::DtIndirectTextureLoaderNode class.
Base class to provide boost signal/slot management.
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Creator for the DtPagedTilesIndirectManager class.
Definition: DtPagedTilesIndirectManager.h:196
DtCellToGeoTypicalIndirectGeoMap * myCellToGTIndirectGeoMap
Definition: DtPagedTilesIndirectManager.h:171

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)