39 class DtDynamicTerrainStateComponent;
44 class DtDynamicTerrainFeature;
45 class DtDynamicTerrainChanges;
46 class DtDynamicTerrainGeometry;
72 virtual bool init()
override;
75 virtual void registerCallbacks();
78 virtual void deregisterCallbacks();
84 virtual const char*
type()
const override;
87 virtual void tick()
override;
93 unsigned priority,
double delay = 0.0,
bool shouldQueue =
true);
99 unsigned priority,
double delay = 0.0);
102 unsigned priority,
double delay = 0.0);
108 double tolerance,
const DtString& key,
unsigned* index =
nullptr);
116 virtual void processQueuedTerrainChanges(
double dt);
120 virtual void setDynamicTerrainInformationRecheckPeriod(
double);
123 return myDynamicTerrainRecheckPeriod;
130 virtual std::list<DtVector> findDynamicTerrainElements(
const DtVector& localLocation,
double radius,
131 const DtString& filterKey = DtString::nullString(),
132 std::list<DtRwDynamicTerrainInformation>* fullInfo = 0,
133 bool* dataAvailable = 0);
138 virtual std::list<DtVector> findDynamicTerrainElements(
const DtVector& localStartLocation,
139 const DtVector& localEndLocation,
const DtString& filterKey = DtString::nullString(),
140 std::list<DtRwDynamicTerrainInformation>* fullInfo = 0,
141 bool* dataAvailable = 0);
155 static void addDynamicTerrainChangesCallback(
const DtSimCommand& cmd,
void* usr);
161 static void switchDynamicTerrainCallback(
const DtSimCommand& cmd,
void* usr);
169 static void resetDynamicTerrainChangesCallback(
const DtSimCommand& cmd,
void* usr);
175 static void resetAllDynamicTerrainChangesCallback(
const DtSimCommand& cmd,
void* usr);
200 static void dynamicTerrainInformationRequestCallback(
DtSimMessage*,
void* usr);
222 static void drawDynamicTerrainCallback(
DtSimMessage * msg,
void * usr);
223 virtual void processDrawDynamicTerrainTask(
DtSimMessage * msg);
264 : geometry(g.clone()), change(c), priority(p), delay(d) {};
double myLastTickRealTime
Definition: dynamicTerrainController.h:256
std::list< QueuedTerrainSwitch > myTerrainSwitchQueue
Definition: dynamicTerrainController.h:276
Definition: dynamicTerrainController.h:261
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Base class for any DtSimCommand which causes dynamic terrain changes to be added or removed...
Definition: dynamicTerrainCommand.h:20
Definition: worldLocationStructArray.h:19
Definition: terrainGeometryAndData.h:24
Definition: keyValuePairList.h:18
DtSimCommand which causes a specific list of dynamic terrain changes to take place at the specified g...
Definition: dynamicTerrainCommand.h:114
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
~QueuedTerrainSwitch()
Definition: dynamicTerrainController.h:266
DtDynamicTerrainControllerPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: dynamicTerrainController.h:239
tbb::spin_mutex Mutex
Definition: dynamicTerrainController.h:258
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
Sim command that causes the dynamic terrain state at a specific point to be switched to the next stat...
Definition: switchDynamicTerrainAtPointCommand.h:21
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
bool myEnabled
Definition: dynamicTerrainController.h:278
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
unsigned priority
Definition: dynamicTerrainController.h:273
const DtDynamicTerrainControllerDescriptor * myDynamicTerrainDescriptor
Definition: dynamicTerrainController.h:235
std::vector< makVrf::DtDynamicTerrainStateComponent * > myCraterPublishers
Publishes the dynamic terrain changes for a whole area to the network.
Definition: dynamicTerrainController.h:248
Definition: keyValuePair.h:18
Mutex myTerrainFeatureMutex
Definition: dynamicTerrainController.h:259
PendingDynamicTerrainRequests myPendingDynamicTerrainRequests
Definition: dynamicTerrainController.h:253
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:437
virtual bool init() override
Calls setRadio()
DtKeyValuePair change
Definition: dynamicTerrainController.h:272
DtDynamicTerrainMunitionDamageController is a controller that calculates and publishes terrain change...
Definition: dynamicTerrainController.h:53
Instances of DtDynamicTerrainControllerDescriptor are used to specify the parameters for a DtDynamicT...
Definition: dynamicTerrainControllerDescriptor.h:19
DtDynamicTerrainControllerPSR is a process state repository which holds state variables for the DtDyn...
Definition: dynamicTerrainControllerPSR.h:25
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtBoost::shared_ptr< PendingDynamicTerrainInformation > PendingDynamicTerrainInformationPtr
Definition: dynamicTerrainController.h:213
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
std::vector< PendingDynamicTerrainInformationPtr > PendingDynamicTerrainRequests
Definition: dynamicTerrainController.h:214
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
std::vector< makVrf::DtDynamicTerrainStateComponent * > myIndividualSwitchPublishers
Publishes the dynamic terrain changes for individual switches to the network.
Definition: dynamicTerrainController.h:242
virtual double dynamicTerrainInformationRecheckPeriod() const
The recheck period for checking dynamic terrain info requests. Default is 0.5 seconds.
Definition: dynamicTerrainController.h:121
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtRwDynamicTerrainItem holds a the information needed to make a dynamic change to the terrain...
Definition: rwDynamicTerrainItem.h:23
std::vector< makVrf::DtDynamicTerrainStateComponent * > myAreaPublishers
Publishes the dynamic terrain changes for a whole area to the network.
Definition: dynamicTerrainController.h:245
DtTerrainGeometry * geometry
Definition: dynamicTerrainController.h:271
DtSimCommand which causes a specific list of dynamic terrain changes to be reset to their original st...
Definition: dynamicTerrainCommand.h:139
double delay
Definition: dynamicTerrainController.h:274
DT_DLL_vrfmodel void addChangeToStateComponents(std::vector< makVrf::DtDynamicTerrainStateComponent * > &stateComps, const DtTerrainGeometryAndData &change, int maxChangesPerPublisher, DtLocalObject *localObject)
Adds a new change geometry to the state component list. Creates a new state component if necessary...
double myDynamicTerrainRecheckPeriod
Definition: dynamicTerrainController.h:254
QueuedTerrainSwitch(const DtTerrainGeometry &g, const DtKeyValuePair &c, unsigned p, double d)
Definition: dynamicTerrainController.h:263
DtSimCommand which causes all dynamic terrain changes to be reset to their original state at the spec...
Definition: dynamicTerrainCommand.h:170
class DtRwVectorList:
Definition: rwVectorList.h:22
std::vector< makVrf::DtDynamicTerrainStateComponent * > myVehicleTrackPublishers
Publishes the persistent vehicle track changes to the the network.
Definition: dynamicTerrainController.h:251
Definition: terrainGeometry.h:33
std::list< DtSwitchDynamicTerrainAtPointCommand > myTerrainSwitchAtPointQueue
Definition: dynamicTerrainController.h:277
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