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();
140 virtual std::vector<DtNavArea*> findNavAreasForLocation(
const DtVector& localPosition,
142 virtual std::vector<DtNavArea*> findNavAreasForArea(
const DtLocalVertexList* boundingArea,
148 virtual std::vector<DtNavArea*> findNavAreasForLocation(
const DtVector& localPosition)
const;
152 virtual void addNavAreaAboutToBeRemovedCallback(
157 virtual void removeNavAreaAboutToBeRemovedCallback(
162 virtual void setBlockingNavDataLoad(
bool b);
166 static void requestNavAreaStatusCallback(
DtSimMessage*,
void* usr);
167 virtual void processRequestNavAreaStatus();
172 static void requestSimObjectDebugPortsCallback(
DtSimMessage* msg,
void* usr);
173 virtual void processRequestSimObjectDebugPortsCallback(
DtUUID uuid);
177 virtual void sendNavDataStatus();
180 virtual void processNavQueues();
184 static void setGamewareWorkingMemorySize(
int sizeInMb);
185 static void setRegenerateNavigationDataAtRuntime(
bool regen);
186 static void setMaxRegenerationThreads(
int threads);
187 static void setNumberOfNavQueueProcessingThreads(
int threads);
188 static void setRegenerationDelay(
double delay);
189 static void setQueryTimeBudget(
double ms);
190 static void setRegenerationFileDirectory(
const DtFilename& dir);
202 virtual void processSimObjectDeleted(
const DtSimObject* simObject);
205 virtual void invokeAreaAboutToBeDeletedCallbacks(
DtNavArea*);
209 static void navigationRegenUpdateCallback(
void* usr);
210 virtual void processNavigationRegenUpdate();
213 void processUnloadTerrain();
215 virtual void updateSimOperationStatus();
226 boost::shared_ptr<DtCoordTransform>
Matrix;
275 bool myNavRegenerating =
false;
276 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:193
static int theMaxRegenerationThreads
Definition: vrfNavAreaManager.h:195
Coordinate_System * myObjectCoordSys
Coord system used for nav datas on embarked objects.
Definition: vrfNavAreaManager.h:250
bool myRegenInTempDirectory
Definition: vrfNavAreaManager.h:274
Definition: attachedTerrain.h:46
DtTerrainInterface * myTerrainInterface
Definition: vrfNavAreaManager.h:218
static int theNumberOfNavQueueProcessingThreads
Definition: vrfNavAreaManager.h:196
std::map< DtNavArea::NavAreaId, navAreaExtentData > myNavAreaExtents
Definition: vrfNavAreaManager.h:237
DtDcm LocalCorrectionMatrix
Definition: vrfNavAreaManager.h:227
DtGenericTerrainRecords allow the VR-Forces terrainInterface library to instantiate and configure the...
Definition: DtGenericTerrainRecord.h:34
std::atomic< bool > myProcessingStopped
Definition: vrfNavAreaManager.h:268
bool myNavigationInitialized
Definition: vrfNavAreaManager.h:247
Definition: vrfNavAreaManager.h:221
boost::shared_ptr< DtCoordTransform > Matrix
Definition: vrfNavAreaManager.h:226
DtPoint ReferencePoint
Definition: vrfNavAreaManager.h:225
std::atomic< bool > myContinueProcessing
Definition: vrfNavAreaManager.h:267
DtSimulationServices * mySimulationServices
Definition: vrfNavAreaManager.h:248
Simple asynchronous callback queue.
Definition: vrfCallbackQueue.h:32
DtNavArea::NavAreaId myNextNavAreaId
Definition: vrfNavAreaManager.h:254
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
tbb::spin_rw_mutex myObjectNavAreaMutex
Definition: vrfNavAreaManager.h:264
tbb::spin_rw_mutex myNavAreaMutex
Definition: vrfNavAreaManager.h:263
tbb::spin_mutex myNavAreaExtentsMutex
Definition: vrfNavAreaManager.h:262
DtCallbackList< DtNavArea * > NavAreaAboutToBeRemovedList
Definition: vrfNavAreaManager.h:260
std::vector< DtNavArea * > DtNavAreas
Definition: vrfNavAreaManager.h:242
std::set< DtString > Profiles
Definition: vrfNavAreaManager.h:230
DtDcm InvLocalCorrectionMatrix
Definition: vrfNavAreaManager.h:228
bool myBlockingNavLoad
Definition: vrfNavAreaManager.h:252
tbb::task_group myNavAreaTaskGroup
Definition: vrfNavAreaManager.h:271
bool IsLoading
Definition: vrfNavAreaManager.h:231
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:234
DtTerrainInterface allows access to common terrain calls without having to know the terrain implement...
Definition: terrainInterface.h:100
DtFilename filename
Definition: vrfNavAreaManager.h:223
DtVrfCallbackQueue * myNavQueryProcessingParallelQueue
Definition: vrfNavAreaManager.h:266
virtual DtTerrainInterface * terrainInterface()
The terrain interface used by this nav area manager.
Definition: vrfNavAreaManager.h:72
DtNavAreas myNavAreas
Definition: vrfNavAreaManager.h:243
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
static double theQueryTimeBudget
Definition: vrfNavAreaManager.h:198
DtDynamicTerrainQueryHandle DynamicTerrainQuery
Definition: vrfNavAreaManager.h:233
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:229
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:124
Resource handle for a query which has been added to the system. Returned from DtTerrainImplementation...
Definition: terrainImplementation.h:108
DtExtent * Extent
Definition: vrfNavAreaManager.h:232
DtNavGenerationThreadCounter * myNavGenThreadCounter
Definition: vrfNavAreaManager.h:257
NavAreaAboutToBeRemovedList myNavAreaAboutToRemRemovedList
Definition: vrfNavAreaManager.h:261
static bool theRegenerateNavDataAtRuntime
Definition: vrfNavAreaManager.h:194
std::map< DtUUID, DtNavArea * > DtObjectNavAreaMap
Definition: vrfNavAreaManager.h:245
static double theRegenerationDelay
Definition: vrfNavAreaManager.h:197
static DtFilename theRegenerationFileDirectory
Definition: vrfNavAreaManager.h:199
class DtLocalVertexList:
Definition: localVertexList.h:20
boost::signals2::connection myUnloadTerrainConnection
Definition: vrfNavAreaManager.h:272
DtObjectNavAreaMap myObjectNavAreas
Definition: vrfNavAreaManager.h:246
virtual void loadAllNavData(bool *dataAvailable=0)
Loads all nav data (if any). Typically only called internally.
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:270
void(* DtNavAreaRemovalCallbackFcn)(DtNavArea *area, void *usr)
Callback function definition for nav area removals.
Definition: vrfNavAreaManager.h:48