17 #include <tbb/spin_mutex.h>
18 #include <vlpi/deadReckoner.h>
19 #include <tbb/mutex.h>
30 class DtDynamicTerrainStateComponent;
33 namespace MAKVRinTerra
35 class DtFeatureGeometry;
66 virtual const char*
type()
const;
78 unsigned priority,
const DtString& soilType,
double distanceTraveled = 0.0,
double delay = 0.0);
92 static void addPersistentTracksCommandCallBack(
const DtSimCommand& cmd,
void *usr);
93 static void removePersistentTracksCommandCallBack(
const DtSimCommand& cmd,
void *usr);
104 virtual void processTrackFromCommand(
DtKeyValuePairList& trackParams,
const std::vector<DtVector>& points);
106 static void displayDebugForCurrentTracksCallback(
DtSimMessage* msg,
void* usrData);
107 virtual void processDisplayDebugForCurrentTracks(
DtSimMessage*);
109 static void clearDebugForCurrentTracksCallback(
DtSimMessage* msg,
void* usrData);
110 virtual void processClearDebugForCurrentTracks(
DtSimMessage*);
122 virtual void tickQueuedVehicleTrackData();
126 virtual void tickVehicleTrackData();
129 virtual void updatePublishedTrackChange(std::vector<makVrf::DtDynamicTerrainStateComponent*>& publishers,
147 virtual void discoverNewObjectsInArea();
153 std::vector<MAKVRinTerra::DtFeatureGeometry>& resultingGeom);
167 virtual void resetAllQueuedTracks();
170 virtual bool atMaximumNumberOfIndividualTracks()
const;
173 virtual void dumpPublishedTracksToLog()
const;
175 virtual void dumpQueuedTracksToLog()
const;
207 : trackParams(params), points(pts) {};
static void resetAllDynamicTerrainChangesCallback(const DtSimCommand &cmd, void *usr)
Processes commands to reset all changes to dynamic terrain.
Definition: dynamicTerrainVehicleTrackController.h:204
UUID is a unique ID wrapper class.
Definition: uuid.h:59
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
Static creator function for factory registration.
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Definition: keyValuePairList.h:18
virtual void tick() override
This component's simulation tick.
DtRwQueuedDynamicTerrainVehicleTrackItem holds the information needed to make a dynamic change to the...
Definition: rwQueuedDynamicTerrainVehicleTrackItem.h:17
double myMaximumTraverseDistBetweenTrackPointsSquared
Definition: dynamicTerrainVehicleTrackController.h:187
DtDeadReckoner myDeadReckoner
Definition: dynamicTerrainVehicleTrackController.h:202
virtual void registerTaskMsgCallbacks()
virtual bool isCommandValidForArea(const DtDynamicTerrainCommand &cmd)
Returns true if the geometry for the command is within our area of control.
Definition: rwDynamicTerrainVehicleTrackItem.h:24
DtDynamicTerrainVehicleTrackController is a controller that calculates and publishes terrain changes ...
Definition: dynamicTerrainVehicleTrackController.h:42
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
std::set< DtUUID > myObjectsInArea
Definition: dynamicTerrainVehicleTrackController.h:197
unsigned myMaxNumPtsPerTrack
Definition: dynamicTerrainVehicleTrackController.h:193
boost::signals2::scoped_connection mySimObjectDeletedConnection
Definition: dynamicTerrainVehicleTrackController.h:216
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
tbb::mutex myRemovalMutex
Definition: dynamicTerrainVehicleTrackController.h:217
bool myShowingDebugTracks
Definition: dynamicTerrainVehicleTrackController.h:199
Definition: readerWriterRegistry.h:39
virtual bool taskVisualizationsActive() const override
Returns true if task visualizations are currently active for this component. Default behavior for tas...
bool myUpdateTrackTaskVis
Definition: dynamicTerrainVehicleTrackController.h:200
DtSimCommand which causes a specific list of dynamic terrain changes to take place at the specified g...
Definition: persistentTracksCommand.h:71
Definition: dynamicTerrainVehicleTrackControllerDescriptor.h:29
virtual void updateTaskVisualizations() override
Called to update task visualizations after every tick. Implemented by subclasses. ...
DtDynamicTerrainMunitionDamageController is a controller that calculates and publishes terrain change...
Definition: dynamicTerrainController.h:53
DtSimCommand which causes a specific list of dynamic terrain changes to take place at the specified g...
Definition: persistentTracksCommand.h:151
QueuedTrackCommand(const DtKeyValuePairList ¶ms, const std::vector< DtVector > &pts)
Definition: dynamicTerrainVehicleTrackController.h:206
File: simMsg.h.
Definition: simMessage.h:35
double myLastTimePublishedDebugPrint
Definition: dynamicTerrainVehicleTrackController.h:190
std::vector< DtVector > points
Definition: dynamicTerrainVehicleTrackController.h:210
DtDynamicTerrainVehicleTrackControllerDescriptor * myDynamicTerrainVehicleTrackDescriptor
Definition: dynamicTerrainVehicleTrackController.h:183
double myTrackPositionalThresholdSquared
Definition: dynamicTerrainVehicleTrackController.h:185
boost::signals2::scoped_connection mySimObjectAddedConnection
Definition: dynamicTerrainVehicleTrackController.h:215
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
virtual void deregisterCallbacks()
Called by destructor to deregister any callbacks.
Base class for any DtSimCommand which persistent changes to be added or removed. Must be subclassed f...
Definition: persistentTracksCommand.h:21
double myNextObjectDiscoveryTime
Definition: dynamicTerrainVehicleTrackController.h:196
double myMinimumTraverseDistToPublishTracksSquared
Definition: dynamicTerrainVehicleTrackController.h:188
virtual void preFirstTickInit() override
Publishes any dynamic terrain changes saved in PSR.
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
virtual void processResetAllDynamicTerrainChangesCommand(const DtResetAllDynamicTerrainChangesCommand &cmd)
Processes commands to reset all changes to dynamic terrain.
std::vector< QueuedTrackCommand > myQueuedTrackCommands
Definition: dynamicTerrainVehicleTrackController.h:213
double myTrackRotationalTraceThresh
Definition: dynamicTerrainVehicleTrackController.h:186
double myLastTimeQueuedDebugPrint
Definition: dynamicTerrainVehicleTrackController.h:189
virtual const char * type() const override
DtDynamicTerrainController & operator=(const DtDynamicTerrainController &orig)
Not Implemented.
DtSimCommand which causes all dynamic terrain changes to be reset to their original state at the spec...
Definition: dynamicTerrainCommand.h:170
virtual void registerCallbacks()
Called by init to register any callbacks.
Represents a feature geometry.
Definition: featureGeometry.h:39
Definition: terrainGeometry.h:33
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
double myTrackSamplingDistanceSquared
Definition: dynamicTerrainVehicleTrackController.h:184