VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simTerrainRequestManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 #include <vrfmsgs/ifComputeRoute.h>
20 #include <tbb/spin_mutex.h>
21 
22 #include <list>
23 
24 class DtSimManager;
25 class DtIfComputeRoute;
26 class DtSimulationAddress;
27 class DtSimMessage;
31 
33 {
34 protected:
35  struct PendingIntersection;
36  class PendingDynamicTerrainInformation;
37 
38 public:
40 
42 
43  virtual ~DtSimTerrainRequestManager();
44 
45  virtual void init();
46 
47  virtual void tick();
48 
49  virtual void process(const DtIfComputeRoute& msg, const DtSimulationAddress& from);
50 
52  virtual void setIntersectionRecheckPeriod(double);
53  double intersectionRecheckPeriod() const
54  {
55  return myIntersectionRecheckPeriod;
56  }
57 
59  virtual void setVectorFeatureLookup(const DtString&);
60  const DtString& vectorFeatureLookup() const
61  {
62  return myVectorFeatureLookup;
63  }
64 
66  virtual void terrainClosed();
67 
68 protected:
69  static void intersectionRequestCallback(DtSimMessage*, void* usr);
70  virtual void processIntersectionRequest(DtIfRequestIntersectionInformation*);
71 
73  virtual bool processPendingIntersection(PendingIntersection&);
74 
76  static void osgEarthCacheRequestCallback(DtSimMessage*, void* usr);
77  virtual void processOsgEarthCacheRequest(DtIfOsgEarthCacheRequest*);
78 
80  static void osgEarthCacheInformationRequestCallback(DtSimMessage*, void* usr);
81  virtual void processOsgEarthCacheInformationRequest(DtIfOsgEarthCacheInformationRequest*);
82 
84  static void osgEarthCacheCancelRequestCallback(DtSimMessage*, void* usr);
85  virtual void processOsgEarthCacheCancelRequest(DtIfOsgEarthCacheCancelRequest*);
86 
88  static void cacheProgressCallback(int reqeustId, int current, bool completed, const DtString& layer, double elapsedTime, void*);
89  virtual void processCacheProgress(int reqeustId, int current, bool completed, const DtString& layer, double elapsedTime);
90 
91 protected:
93 
94  typedef boost::shared_ptr<DtAsyncJobMapEntry> EntryPtr;
95 
96  struct Record
97  {
98  Record(const EntryPtr& entry, const DtSimulationAddress& addr, const DtIfComputeRoute& msg)
99  : entry(entry), address(addr), message(msg) { }
100 
102  DtSimulationAddress address;
104  };
105 
106  bool processRecord(const Record&);
107 
108  typedef std::list<Record> Records;
110 
114  {
115  std::vector<bool> awaiting;
119  };
120 
121  typedef std::vector<PendingIntersection> PendingIntersectionRequest;
122 
124 
127 
129  typedef std::map<int, DtIfOsgEarthCacheProgress> OsgEarthProgressReports;
131 };

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)