15 #include <boost/signals2.hpp>
16 #include <matrix/vlVector.h>
19 #include <vlpi/appearance.h>
20 #include <vlpi/disEnums.h>
21 #include <matrix/vlDcm.h>
22 #include <matrix/vlTaitBryan.h>
25 #include <tbb/spin_rw_mutex.h>
31 class DtIffStateComponent;
32 class DtLaserDesignatorStateComponent;
33 class DtExternalCurrentFrameState;
34 class DtStatePropertiesStateComponent;
36 class DtStateDataManager;
37 class DtVrfObjectGeometry;
38 class DtRwVrfKinematicState;
77 const DtUUID& uuid()
const;
80 DtEntityType entityType()
const;
81 DtEntityType
objectType()
const {
return entityType(); };
82 unsigned long long userData()
const;
84 std::map<DtString, DtString> extendedDataMap()
const;
85 std::map<std::string, std::string> extendedDataStdStringMap()
const;
86 bool hasExtendedData(
const DtString& key)
const;
88 DtAppearance appearance()
const;
89 int capabilities()
const;
90 DtEntityType guise()
const;
94 bool isClutterEntity()
const;
98 virtual Dt3dBoundingVolume boundingVolume()
const;
102 std::vector<const DtLaserDesignatorStateComponent*> laserDesignatorStateComponents()
const;
110 bool isSpotReport()
const;
111 bool isTDLReport()
const;
114 bool awaitingTransfer()
const;
118 if (myExternalCurrentFrameState)
127 template <
typename T_Component>
130 if (myExternalCurrentFrameState)
132 return myExternalCurrentFrameState->getStateComponent<T_Component>();
138 template <
typename T_Component>
141 if (myExternalCurrentFrameState)
143 return myExternalCurrentFrameState->getStateComponentList<T_Component>();
146 return std::vector<const T_Component*>();
149 template <
typename T_Component>
152 if (myExternalCurrentFrameState)
154 return myExternalCurrentFrameState->hasStateComponent<T_Component>();
167 const DtVector& worldPosition()
const;
168 const DtVector& localPosition()
const;
169 const DtVector& parentPosition()
const;
170 double distSquaredTo(
const DtVector&)
const;
173 bool hasLocationChanged()
const;
177 bool objectVerticesChanged()
const;
181 bool worldVerticesChanged()
const;
184 bool haveVerticesChanged()
const;
186 virtual void frameAdvanced();
187 virtual void firstFrameAdvance();
194 DtUUID hostGlobalId()
const;
198 const DtTaitBryan& topographicOrientation()
const;
199 const DtTaitBryan& worldOrientation()
const;
200 const DtTaitBryan& localOrientation()
const;
201 const DtTaitBryan& parentOrientation()
const;
202 const DtTaitBryan& localOrientationWrtDatabase()
const;
203 const DtDcm& localOrientationMatrix()
const;
204 const DtDcm& parentOrientationMatrix()
const;
205 const DtDcm& worldOrientationMatrix()
const;
206 double heading()
const;
207 double pitch()
const;
212 DtForceType forceType()
const;
215 const DtEntityIdentifier& entityId()
const;
221 DtSimulationAddress simEngineAddress()
const;
224 bool isDestroyed()
const;
225 int damageState()
const;
236 bool isEntityOrUnit()
const;
240 bool isEntity()
const;
244 bool isEmbarked()
const;
247 DtUUID embarkedOn()
const;
248 bool isEmbarkedOn(
const DtUUID&)
const;
253 bool isValid()
const;
255 int sessionId()
const;
256 bool isVrfSimulatedObject()
const;
257 bool isCurrentlyTasked()
const;
258 bool isExecutingPlan()
const;
259 bool hasPlan()
const;
260 bool independentlyTasked()
const;
261 bool underFire()
const;
267 bool isDeleted()
const;
270 virtual void makeInvalid();
273 std::vector<DtVector> localVertexList()
const;
276 std::vector<DtVector> worldVertexList()
const;
279 std::vector<DtVector> relativeVertexList()
const;
282 unsigned long long legionGlobalId()
const;
287 return myAdvancedFrame;
290 DtUUID superiorUUID()
const;
293 bool isTopLevel()
const;
297 return myExternalCurrentFrameState;
314 mutable boost::signals2::signal<void (const DtUUID& oldUUID, const DtUUID& newUUID)>
signal_uuidChanged;
343 if (myCurrentFrameSimulatedObjectStateComponent)
345 return myCurrentFrameSimulatedObjectStateComponent;
347 else if (!myCachedComponents && hasStateComponent<DtSimulatedObjectStateComponent>())
349 return getStateComponent<DtSimulatedObjectStateComponent>();
359 if (myCurrentFrameLocationStateComponent)
361 return myCurrentFrameLocationStateComponent;
363 else if (!myCachedComponents && hasStateComponent<DtLocationStateComponent>())
365 return getStateComponent<DtLocationStateComponent>();
375 if (myCurrentFrameStatePropertiesStateComponent)
377 return myCurrentFrameStatePropertiesStateComponent;
379 else if (!myCachedComponents && hasStateComponent<DtStatePropertiesStateComponent>())
381 return getStateComponent<DtStatePropertiesStateComponent>();
391 if (myCurrentFrameVrfGeometryStateComponent)
393 return myCurrentFrameVrfGeometryStateComponent;
395 else if (!myCachedComponents && hasStateComponent<DtVrfGeometryStateComponent>())
397 return getStateComponent<DtVrfGeometryStateComponent>();
407 return myCurrentFrameEntityStateComponent;
412 if (myCurrentFrameVrfStateComponent)
414 return myCurrentFrameVrfStateComponent;
416 else if (!myCachedComponents && hasStateComponent<DtVrfStateComponent>())
418 return getStateComponent<DtVrfStateComponent>();
426 std::set<int> currentFrameModifiedStateComponentTypes()
const;
427 std::set<int> nextFrameModifiedStateComponentTypes()
const;
431 virtual void cacheComponents();
432 virtual void clearCachedComponents();
435 virtual void setUUID(
const DtUUID&);
436 bool checkAndConnectForVrfStateComponent();
439 virtual void objectNameChanged(
const DtString& oldText,
const DtString& newText);
441 virtual void completeSetup();
442 virtual void extendedDataUpdated();
443 virtual void superiorChanged();
444 virtual void isClutterChanged();
447 virtual void externalFrameStateToBeDestroyed();
450 virtual void simEngineAddressChanged(
const DtSimulationAddress& oldAddress,
const DtSimulationAddress& newAddress);
const DtSimulatedObjectStateComponent * currentFrameSimulatedObjectStateComponent() const
Definition: stateDataWrapper.h:341
UUID is a unique ID wrapper class.
Definition: uuid.h:59
boost::signals2::scoped_connection mySuperiorChangedConnection
Definition: stateDataWrapper.h:463
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: statePropertiesStateComponent.h:93
DtUUID myEmbarkedOn
Definition: stateDataWrapper.h:487
boost::signals2::scoped_connection myExtendedDataUpdatedConnection
Definition: stateDataWrapper.h:461
DtUUID mySuperiorUUID
Definition: stateDataWrapper.h:482
const DtUUID & uuid() const
@ Convenience accessors for various pieces of state Data
DtStateDataWrapper & operator=(const DtStateDataWrapper &rhs)
Definition: stateDataWrapper.h:68
The DtLocationStateComponent interface contains the interface that all DtLocationStateComponents can ...
Definition: locationStateComponent.h:25
bool operator!=(const DtUUID &rhs) const
Definition: stateDataWrapper.h:73
1) Define the interface class that will be used to represent the next and current frames...
Definition: entityStateComponent.h:91
const DtStatePropertiesStateComponent * myCurrentFrameStatePropertiesStateComponent
Definition: stateDataWrapper.h:494
DtUUID myUUID
Once assigned, the UUID of this object. This will be valid even after the object is deleted...
Definition: stateDataWrapper.h:473
The DtSimulatedObjectStateComponent is an interface that all main components (those that are consider...
Definition: simulatedObjectStateComponent.h:21
DT_DLL_VRFGUICORE bool operator==(const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &lhs, const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &rhs)
boost::signals2::scoped_connection myAddedConnection
Definition: stateDataWrapper.h:458
bool isSimulatedObject() const
Definition: stateDataWrapper.h:237
const DtLocationStateComponent * myCurrentFrameLocationStateComponent
Definition: stateDataWrapper.h:492
const DtLocationStateComponent * currentFrameLocationStateComponent() const
Definition: stateDataWrapper.h:357
boost::signals2::signal< void()> signal_extendedDataUpdated
Signal sent out (during advance frame) when the extended data has been updated.
Definition: stateDataWrapper.h:306
Contains the DtUUID class declaration.
boost::signals2::scoped_connection myObjectNameChangedConnection
Definition: stateDataWrapper.h:460
const T_Component * getStateComponent() const
General call to get any component that does not have a method.
Definition: stateDataWrapper.h:128
const DtExternalFrameStateInterface * externalCurrentFrameState() const
Definition: stateDataWrapper.h:295
const DtVrfStateComponent * currentFrameVrfStateComponent() const
Definition: stateDataWrapper.h:410
boost::signals2::signal< void()> signal_firstFrameAdvance
Signal when the frame is advanced for the first time.
Definition: stateDataWrapper.h:338
boost::signals2::signal< void(DtStateComponent *)> signal_stateComponentRemoved
Definition: stateDataWrapper.h:329
const DtSimulatedObjectStateComponent * myCurrentFrameSimulatedObjectStateComponent
Definition: stateDataWrapper.h:489
bool operator!=(const DtStateDataWrapper &rhs) const
Definition: stateDataWrapper.h:74
boost::signals2::signal< void()> signal_isClutterChanged
Signal sent out (during advance frame) when the is-clutter flag has been updated. ...
Definition: stateDataWrapper.h:326
boost::signals2::scoped_connection myStateComponentRemovedConnection
Definition: stateDataWrapper.h:456
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: vrfGeometryStateComponent.h:54
const DtEntityIdentifier & objectIdentifier() const
Definition: stateDataWrapper.h:216
bool advancedFrame() const
Will be true if this object has advanced at least one frame.
Definition: stateDataWrapper.h:285
boost::signals2::signal< void(DtStateComponent *)> signal_stateComponentAdded
Definition: stateDataWrapper.h:328
boost::signals2::signal< void()> signal_objectVerticesChanged
Signal sent when the user changes the vertices via a set command. If this is a remote object...
Definition: stateDataWrapper.h:303
boost::signals2::signal< void(const DtString &)> signal_discoveredReference
Signal sent if this was awaiting for the base data to show up, and, it has.
Definition: stateDataWrapper.h:311
boost::signals2::scoped_connection myIsClutterChangedConnection
Definition: stateDataWrapper.h:465
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: vrfStateComponent.h:62
const DtStateDataManager * myStateDataManager
Definition: stateDataWrapper.h:501
boost::signals2::scoped_connection myAdvancedFrameConnection
Definition: stateDataWrapper.h:464
boost::signals2::signal< void(const DtSimulationAddress &oldAddr, const DtSimulationAddress &newAddr)> signal_simEngineAddressChanged
Signal sent when the backend hosting this object has changed. Sent during a frame advance...
Definition: stateDataWrapper.h:317
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
boost::signals2::scoped_connection myDeletedConnection
Definition: stateDataWrapper.h:457
DtString awaiting() const
If awaiting, who awaiting for.
Definition: stateDataWrapper.h:105
bool hasStateComponent() const
Definition: stateDataWrapper.h:150
const DtStateData * stateData() const
Overall kinematic state.
Definition: stateDataWrapper.h:189
class DtVertexList:
Definition: vertexList.h:22
DtEntityType myEntityType
Definition: stateDataWrapper.h:480
boost::signals2::signal< void()> signal_simObjectDeleted
Definition: stateDataWrapper.h:308
bool isModified() const
Definition: stateDataWrapper.h:116
const DtEntityStateComponent * myCurrentFrameEntityStateComponent
Definition: stateDataWrapper.h:491
Definition: stateData.h:301
This class maintains a rectangular bounding volume and an ordered list of vertices describing the phy...
Definition: vrfObjectGeometry.h:39
boost::signals2::scoped_connection myUUIDChangedConnection
Definition: stateDataWrapper.h:459
Definition: echelonId.h:13
bool operator==(const DtStateDataWrapper &rhs) const
Definition: stateDataWrapper.h:71
const DtVrfGeometryStateComponent * currentFrameVrfGeometryStateComponent() const
Definition: stateDataWrapper.h:389
Definition: stateComponent.h:52
boost::signals2::signal< void(const DtString &oldName, const DtString &newName)> signal_objectRenamed
Signal sent when the uuid of this object has changed. Sent during a frame advance.
Definition: stateDataWrapper.h:320
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: stateDataWrapper.h:49
const DtEntityStateComponent * currentFrameEntityStateComponent() const
Definition: stateDataWrapper.h:405
DtEntityType objectType() const
Definition: stateDataWrapper.h:81
DtString myObjectName
This is for debug purposes only. It will get set when the bounding volume is checked (and locked) and...
Definition: stateDataWrapper.h:479
unsigned long long myLegionGlobalId
Definition: stateDataWrapper.h:474
boost::signals2::scoped_connection myFirstFrameAdvancedConnection
Definition: stateDataWrapper.h:462
boost::signals2::scoped_connection mySimEngineAddressChangedConnection
Definition: stateDataWrapper.h:466
bool myAdvancedFrame
Definition: stateDataWrapper.h:483
Contains the declaration of the DtExtent class.
boost::signals2::signal< void(const DtUUID &oldSuperior, const DtUUID &newSuperior)> signal_superiorChanged
Signal sent when superior has changed.
Definition: stateDataWrapper.h:323
const DtVrfStateComponent * myCurrentFrameVrfStateComponent
Definition: stateDataWrapper.h:490
boost::signals2::scoped_connection myStateComponentAddedConnection
Definition: stateDataWrapper.h:455
const DtExternalFrameStateInterface * myExternalCurrentFrameState
Definition: stateDataWrapper.h:453
Definition: stateData.h:73
Definition: rwVrfKinematicState.h:26
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:122
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: iffStateComponent.h:83
bool myCachedComponents
Definition: stateDataWrapper.h:496
bool myIsDeleted
Definition: stateDataWrapper.h:476
const DtVrfGeometryStateComponent * myCurrentFrameVrfGeometryStateComponent
Definition: stateDataWrapper.h:493
class DtLocalVertexList:
Definition: localVertexList.h:20
boost::signals2::signal< void()> signal_advancedFrame
Signal sent when the state data signals that the frame has been advanced WARNING: This signal will be...
Definition: stateDataWrapper.h:335
tbb::spin_rw_mutex myExternalCurrentFrameStateMutex
Definition: stateDataWrapper.h:485
std::vector< const T_Component * > getStateComponentList() const
Definition: stateDataWrapper.h:139
DtString myAwaiting
If this object is awaiting for its reference to show up, this will be either a UUID or an entity id s...
Definition: stateDataWrapper.h:470
boost::signals2::signal< void(const DtUUID &oldUUID, const DtUUID &newUUID)> signal_uuidChanged
Signal sent when the uuid of this object has changed. Sent during a frame advance.
Definition: stateDataWrapper.h:314
const DtStatePropertiesStateComponent * currentFrameStatePropertiesStateComponent() const
Definition: stateDataWrapper.h:373
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:73