18 #include <matrix/vlVector.h>
19 #include <matrix/coordTransform.h>
22 #include <tbb/spin_mutex.h>
23 #include <tbb/task_arena.h>
24 #include <tbb/task_group.h>
40 class DtTerrainAttachedTo;
44 class DtGenericTerrainRecord;
61 static void tickCallback(
void* args);
74 return myTerrainInterface;
81 static void genericRecordLoadedCallback(
83 virtual void processGenericRecordLoaded(
90 void loadObjectNavData(
const DtSimObject* simObject);
91 void removeObjectNavData(
const DtSimObject* simObject);
96 virtual void unloadAllNavData();
99 virtual void revertNavData();
102 virtual void pauseNavDataRegeneration();
105 virtual void resumeNavDataRegeneration();
136 virtual std::vector<DtNavArea*> findNavAreasForLocation(
const DtVector& localPosition,
138 virtual std::vector<DtNavArea*> findNavAreasForArea(
const DtLocalVertexList* boundingArea,
144 virtual std::vector<DtNavArea*> findNavAreasForLocation(
const DtVector& localPosition)
const;
148 virtual void addNavAreaAboutToBeRemovedCallback(
153 virtual void removeNavAreaAboutToBeRemovedCallback(
158 virtual void setBlockingNavDataLoad(
bool b);
162 static void requestNavAreaStatusCallback(
DtSimMessage*,
void* usr);
163 virtual void processRequestNavAreaStatus();
168 static void requestSimObjectDebugPortsCallback(
DtSimMessage* msg,
void* usr);
169 virtual void processRequestSimObjectDebugPortsCallback(
DtUUID uuid);
173 virtual void sendNavDataStatus();
176 virtual void processNavQueues();
180 static void setGamewareWorkingMemorySize(
int sizeInMb);
181 static void setRegenerateNavigationDataAtRuntime(
bool regen);
182 static void setMaxRegenerationThreads(
int threads);
183 static void setNumberOfNavQueueProcessingThreads(
int threads);
184 static void setRegenerationDelay(
double delay);
185 static void setQueryTimeBudget(
double ms);
186 static void setRegenerationFileDirectory(
const DtFilename& dir);
198 virtual void processSimObjectDeleted(
const DtSimObject* simObject);
201 virtual void invokeAreaAboutToBeDeletedCallbacks(
DtNavArea*);
205 static void navigationRegenUpdateCallback(
void* usr);
206 virtual void processNavigationRegenUpdate();
209 void processUnloadTerrain();
211 virtual void updateSimOperationStatus();
222 boost::shared_ptr<DtCoordTransform>
Matrix;
271 bool myNavRegenerating =
false;
272 bool myNavOperations =
false;
UUID is a unique ID wrapper class.
Definition: uuid.h:59
This class is just used to count the nav generation threads to ensure we do not start too many thread...
Definition: navArea.h:161
static int theGamewareWorkingMemorySize
Definition: vrfNavAreaManager.h:189
static int theMaxRegenerationThreads
Definition: vrfNavAreaManager.h:191
Coordinate_System * myObjectCoordSys
Coord system used for nav datas on embarked objects.
Definition: vrfNavAreaManager.h:246
bool myRegenInTempDirectory
Definition: vrfNavAreaManager.h:270
Definition: attachedTerrain.h:46
DtTerrainInterface * myTerrainInterface
Definition: vrfNavAreaManager.h:214
static int theNumberOfNavQueueProcessingThreads
Definition: vrfNavAreaManager.h:192
std::map< DtNavArea::NavAreaId, navAreaExtentData > myNavAreaExtents
Definition: vrfNavAreaManager.h:233
DtDcm LocalCorrectionMatrix
Definition: vrfNavAreaManager.h:223
DtGenericTerrainRecords allow the VR-Forces terrainInterface library to instantiate and configure the...
Definition: DtGenericTerrainRecord.h:34
std::atomic< bool > myProcessingStopped
Definition: vrfNavAreaManager.h:264
bool myNavigationInitialized
Definition: vrfNavAreaManager.h:243
Definition: vrfNavAreaManager.h:217
boost::shared_ptr< DtCoordTransform > Matrix
Definition: vrfNavAreaManager.h:222
DtPoint ReferencePoint
Definition: vrfNavAreaManager.h:221
std::atomic< bool > myContinueProcessing
Definition: vrfNavAreaManager.h:263
DtSimulationServices * mySimulationServices
Definition: vrfNavAreaManager.h:244
Simple asynchronous callback queue.
Definition: vrfCallbackQueue.h:32
DtNavArea::NavAreaId myNextNavAreaId
Definition: vrfNavAreaManager.h:250
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
tbb::spin_rw_mutex myObjectNavAreaMutex
Definition: vrfNavAreaManager.h:260
tbb::spin_rw_mutex myNavAreaMutex
Definition: vrfNavAreaManager.h:259
tbb::spin_mutex myNavAreaExtentsMutex
Definition: vrfNavAreaManager.h:258
DtCallbackList< DtNavArea * > NavAreaAboutToBeRemovedList
Definition: vrfNavAreaManager.h:256
std::vector< DtNavArea * > DtNavAreas
Definition: vrfNavAreaManager.h:238
std::set< DtString > Profiles
Definition: vrfNavAreaManager.h:226
DtDcm InvLocalCorrectionMatrix
Definition: vrfNavAreaManager.h:224
bool myBlockingNavLoad
Definition: vrfNavAreaManager.h:248
tbb::task_group myNavAreaTaskGroup
Definition: vrfNavAreaManager.h:267
bool IsLoading
Definition: vrfNavAreaManager.h:227
Definition: coordSystem.h:54
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
The DtVrfNavAreaManager manages all of the nav areas currently created in the sim.
Definition: vrfNavAreaManager.h:52
This class contains all the data and logic for navigation within a specific area. Nav Data may be loa...
Definition: navArea.h:206
File: simMsg.h.
Definition: simMessage.h:35
boost::signals2::connection DynamicTerrainConnection
Definition: vrfNavAreaManager.h:230
DtTerrainInterface allows access to common terrain calls without having to know the terrain implement...
Definition: terrainInterface.h:100
DtFilename filename
Definition: vrfNavAreaManager.h:219
DtVrfCallbackQueue * myNavQueryProcessingParallelQueue
Definition: vrfNavAreaManager.h:262
virtual DtTerrainInterface * terrainInterface()
The terrain interface used by this nav area manager.
Definition: vrfNavAreaManager.h:72
DtNavAreas myNavAreas
Definition: vrfNavAreaManager.h:239
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
static double theQueryTimeBudget
Definition: vrfNavAreaManager.h:194
DtDynamicTerrainQueryHandle DynamicTerrainQuery
Definition: vrfNavAreaManager.h:229
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
Contains the declaration of the DtExtent class.
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtCoordTransform InvMatrix
Definition: vrfNavAreaManager.h:225
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:123
Resource handle for a query which has been added to the system. Returned from DtTerrainImplementation...
Definition: terrainImplementation.h:108
DtExtent * Extent
Definition: vrfNavAreaManager.h:228
DtNavGenerationThreadCounter * myNavGenThreadCounter
Definition: vrfNavAreaManager.h:253
NavAreaAboutToBeRemovedList myNavAreaAboutToRemRemovedList
Definition: vrfNavAreaManager.h:257
static bool theRegenerateNavDataAtRuntime
Definition: vrfNavAreaManager.h:190
std::map< DtUUID, DtNavArea * > DtObjectNavAreaMap
Definition: vrfNavAreaManager.h:241
static double theRegenerationDelay
Definition: vrfNavAreaManager.h:193
static DtFilename theRegenerationFileDirectory
Definition: vrfNavAreaManager.h:195
class DtLocalVertexList:
Definition: localVertexList.h:20
boost::signals2::connection myUnloadTerrainConnection
Definition: vrfNavAreaManager.h:268
DtObjectNavAreaMap myObjectNavAreas
Definition: vrfNavAreaManager.h:242
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
tbb::task_arena myNavAreaArena
Definition: vrfNavAreaManager.h:266
void(* DtNavAreaRemovalCallbackFcn)(DtNavArea *area, void *usr)
Callback function definition for nav area removals.
Definition: vrfNavAreaManager.h:48