17 #include <boost/signals2.hpp>
18 #include <matrix/vlVector.h>
21 #include <vlpi/appearance.h>
22 #include <vlpi/disEnums.h>
23 #include <matrix/vlDcm.h>
24 #include <matrix/vlTaitBryan.h>
27 #include <tbb/spin_rw_mutex.h>
34 class DtIffStateComponent;
35 class DtLaserDesignatorStateComponent;
36 class DtExternalCurrentFrameState;
38 class DtVrfObjectGeometry;
39 class DtRwVrfKinematicState;
41 namespace MAKVRinTerra
43 class DtFeatureGeometry;
66 class Dt3dBoundingVolume;
67 class DtEntityIdentifier;
115 const DtUUID& uuid()
const;
118 DtEntityType entityType()
const;
122 bool isClutterEntity()
const;
126 Dt3dBoundingVolume boundingVolume()
const;
127 DtVector localBoundingVolumeCenterPosition()
const;
132 void expandExtent(
DtExtent& extent)
const;
136 std::vector<const makVrf::DtLaserDesignatorStateComponent*> laserDesignatorStateComponents()
const;
139 template <
typename T_Component>
142 return myExternalCurrentFrameState->getStateComponent<T_Component>();
145 template <
typename T_Component>
148 return myExternalCurrentFrameState->getStateComponentList<T_Component>();
151 template <
typename T_Component>
154 return myExternalCurrentFrameState->hasStateComponent<T_Component>();
164 const DtVector& worldPosition()
const;
165 const DtVector&localPosition()
const;
166 const DtVector&parentPosition()
const;
167 double distSquaredTo(
const DtVector&)
const;
170 bool hasLocationChanged()
const;
174 bool objectVerticesChanged()
const;
178 bool worldVerticesChanged()
const;
181 bool haveVerticesChanged()
const;
183 virtual void frameAdvanced();
184 virtual void firstFrameAdvance();
187 const DtTaitBryan& topographicOrientation()
const;
188 const DtTaitBryan& worldOrientation()
const;
189 const DtTaitBryan& localOrientation()
const;
190 const DtTaitBryan& parentOrientation()
const;
191 const DtTaitBryan& localOrientationWrtDatabase()
const;
192 const DtDcm& localOrientationMatrix()
const;
193 const DtDcm& parentOrientationMatrix()
const;
194 const DtDcm& worldOrientationMatrix()
const;
195 double heading()
const;
196 double pitch()
const;
201 virtual bool isLocal()
const;
204 DtForceType forceType()
const;
207 const DtEntityIdentifier& entityId()
const;
214 bool isDestroyed()
const;
215 int damageState()
const;
232 bool isEntityOrUnit()
const;
236 bool isEntity()
const;
240 bool isEmbarked()
const;
242 bool embarkedOnHighFidelityObject()
const;
245 DtUUID embarkedOn()
const;
247 bool isEmbarkedOn(
const DtUUID&)
const;
252 bool isValid()
const;
254 int sessionId()
const;
255 bool isVrfSimulatedObject()
const;
260 bool isOnTopOf(
const DtSimObject* o,
double d)
const;
265 bool isDeleted()
const;
271 virtual void makeInvalid();
275 return mySimulationServices;
290 double totalMass()
const;
312 DtTaitBryan orientationRelativeTo(
const DtTaitBryan&,
const DtSimObject* relativeTo)
const;
319 double distanceToLocalVector(
const DtVector&)
const;
325 unsigned long long legionGlobalId()
const;
336 return myAdvancedFrame;
340 DtUUID superiorUUID()
const;
345 bool isTopLevel()
const;
366 mutable boost::signals2::signal<void (const DtUUID& oldUUID, const DtUUID& newUUID)>
signal_uuidChanged;
369 mutable boost::signals2::signal<void (const DtSimObject*, const DtString& oldName, const DtString& newName)>
signal_objectRenamed;
372 mutable boost::signals2::signal<void (const DtSimObject*, const DtUUID& oldSuperior, const DtUUID& newSuperior)>
signal_superiorChanged;
390 virtual void clearDecorators();
399 if (myCurrentFrameSimulatedObjectStateComponent)
401 return myCurrentFrameSimulatedObjectStateComponent;
403 else if (!myCachedComponents && hasStateComponent<makVrf::DtSimulatedObjectStateComponent>())
405 return getStateComponent<makVrf::DtSimulatedObjectStateComponent>();
415 if (myCurrentFrameLocationStateComponent)
417 return myCurrentFrameLocationStateComponent;
419 else if (!myCachedComponents && hasStateComponent<makVrf::DtLocationStateComponent>())
421 return getStateComponent<makVrf::DtLocationStateComponent>();
431 if (myCurrentFrameVrfGeometryStateComponent)
433 return myCurrentFrameVrfGeometryStateComponent;
435 else if (!myCachedComponents && hasStateComponent<makVrf::DtVrfGeometryStateComponent>())
437 return getStateComponent<makVrf::DtVrfGeometryStateComponent>();
447 return myCurrentFrameEntityStateComponent;
452 if (myCurrentFrameVrfStateComponent)
454 return myCurrentFrameVrfStateComponent;
456 else if (!myCachedComponents && hasStateComponent<makVrf::DtVrfStateComponent>())
458 return getStateComponent<makVrf::DtVrfStateComponent>();
467 void tickDecorators();
468 void cacheComponents();
469 void clearCachedComponents();
471 virtual void createNavigationDecorator();
474 virtual void setupVrfObjectParameters();
475 virtual void setUUID(
const DtUUID&);
476 bool checkAndConnectForVrfStateComponent();
481 void attachmentsChanged();
482 virtual void completeSetup();
483 void extendedDataUpdated();
484 void superiorChanged();
485 virtual void isClutterChanged();
487 virtual void hostChanged(
const DtUUID& oldHost,
const DtUUID& newHost);
490 virtual void usingParameterSource(
const DtString&);
491 virtual void externalFrameStateToBeDestroyed();
497 void resetUUID(
const DtUUID&);
633 #include "simObject.inl"
const makVrf::DtSimulatedObjectStateComponent * myCurrentFrameSimulatedObjectStateComponent
Definition: simObject.h:572
UUID is a unique ID wrapper class.
Definition: uuid.h:59
bool hasStateComponent() const
Definition: simObject.h:152
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:63
const makVrf::DtVrfStateComponent * currentFrameVrfStateComponent() const
Definition: simObject.h:450
const DtEntityIdentifier & objectIdentifier() const
Definition: simObject.h:208
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
const makVrf::DtVrfStateComponent * myCurrentFrameVrfStateComponent
Definition: simObject.h:573
Definition: attachedTerrain.h:46
Objects may contain a collection of other objects, such as overlays or pseudo-aggregate entities...
Definition: subordinateManager.h:43
std::map< std::string, DtSimObjectDecorator * > SimObjectDecorators
Decorator members.
Definition: simObject.h:505
DtSimObjectReference mySuperior
Superior.
Definition: simObject.h:558
DtString myObjectName
This is for debug purposes only. It will get set when the bounding volume is checked (and locked) and...
Definition: simObject.h:550
std::vector< const T_Component * > getStateComponentList() const
Definition: simObject.h:146
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
const DtSimulationServices * mySimulationServices
Definition: simObject.h:500
DtVrfSimulatedSimObjectFacade * myVrfSimulatedSimObjectFacade
Definition: simObject.h:581
If you use a list of object names to archive which objects are part of a controller (or any object) u...
Definition: simObjectReferenceList.h:118
The DtLocationStateComponent interface contains the interface that all DtLocationStateComponents can ...
Definition: locationStateComponent.h:25
DtUUID myUUID
Once assigned, the UUID of this object. This will be valid even after the object is deleted...
Definition: simObject.h:539
1) Define the interface class that will be used to represent the next and current frames...
Definition: entityStateComponent.h:70
bool myIsDeleted
Definition: simObject.h:547
DtSimObjectReference mySimObjectReference
Back pointer to this objects reference.
Definition: simObject.h:562
The DtSimulatedObjectStateComponent is an interface that all main components (those that are consider...
Definition: simulatedObjectStateComponent.h:21
const makVrf::DtExternalCurrentFrameState * myExternalCurrentFrameState
Definition: simObject.h:501
tbb::spin_rw_mutex myExternalCurrentFrameStateMutex
Definition: simObject.h:568
tbb::spin_rw_mutex mySimObjectReferenceMutex
Definition: simObject.h:563
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
VRF4API_METHOD bool operator==(const DtSimObject *rhs) const
This is the deprecated API that can be used as a reference to migrate 4.X code to 5...
Definition: simObject.h:592
Contains the DtUUID class declaration.
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
unsigned long long myLegionGlobalId
Definition: simObject.h:540
Definition: navigationDecorator.h:17
boost::signals2::signal< void(const DtSimObject *, const DtString &)> signal_discoveredReference
Signal sent if this was awaiting for the base data to show up, and, it has.
Definition: simObject.h:363
boost::signals2::signal< void()> signal_firstFrameAdvance
Signal when the frame is advanced for the first time.
Definition: simObject.h:384
Description: This repository is an internal repository accessible only by local objects. It holds all information that is common to all the forms of all entity/aggregate/control objects within VR-Forces.
Definition: vrfObjectStateRepository.h:91
ExtentInformation myExtentInformation
Definition: simObject.h:531
bool advancedFrame() const
Will be true if this object has advanced at least one frame.
Definition: simObject.h:334
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
boost::signals2::scoped_connection myIsClutterChangedConnection
Definition: simObject.h:518
bool myCachedComponents
Definition: simObject.h:578
Definition: objectType.h:27
const DtSimulationServices * simulationServices() const
Definition: simObject.h:273
DtAggregateSimObjectFacade * myAggregateSimObjectFacade
Definition: simObject.h:579
boost::signals2::signal< void(const DtSimObject *, const DtString &oldName, const DtString &newName)> signal_objectRenamed
Signal sent when the uuid of this object has changed. Sent during a frame advance.
Definition: simObject.h:369
const DtVrfObjectParameters * parameters() const
VR-Forces parameters.
Definition: simObject.h:279
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
This class represents the console for an individual object. It owns a set of streams for various noti...
Definition: objectConsole.h:49
The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the s...
Definition: physicalWorld.h:102
Definition: coordSystem.h:54
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: simObject.h:366
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
boost::signals2::signal< void(const DtSimObject *)> signal_isClutterChanged
Signal sent out (during advance frame) when the is-clutter flag has been updated. ...
Definition: simObject.h:375
const makVrf::DtEntityStateComponent * currentFrameEntityStateComponent() const
Definition: simObject.h:445
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtVrfObjectParameters * myDuplicateParameters
Definition: simObject.h:545
class DtVertexList:
Definition: vertexList.h:22
const DtVrfObjectParameters * myParameters
Referenced from the simulation services object database based on entity type.
Definition: simObject.h:543
DtObjectType myEntityType
Definition: simObject.h:551
boost::signals2::scoped_connection myDeletedConnection
Definition: simObject.h:510
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: simObject.h:536
bool operator!=(const DtUUID &rhs) const
Definition: simObject.h:111
boost::signals2::signal< void(const DtSimObject *)> signal_simObjectDeleted
Definition: simObject.h:360
boost::signals2::signal< void(const DtSimObject *)> signal_extendedDataUpdated
Signal sent out (during advance frame) when the extended data has been updated.
Definition: simObject.h:358
Definition: stateData.h:263
Definition: rangeItem.h:206
const DtUUID & uuid() const
@ Convenience accessors for various pieces of state Data
DtUUID myEmbarkedOn
Definition: simObject.h:570
This class maintains a rectangular bounding volume and an ordered list of vertices describing the phy...
Definition: vrfObjectGeometry.h:39
DtString awaiting() const
If awaiting, who awaiting for.
Definition: simObject.h:328
SimObjectDecorators mySimObjectDecorators
Decorator members.
Definition: simObject.h:506
const makVrf::DtLocationStateComponent * myCurrentFrameLocationStateComponent
Definition: simObject.h:575
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
const makVrf::DtEntityStateComponent * myCurrentFrameEntityStateComponent
Definition: simObject.h:574
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects ...
Definition: simObjectReferenceList.h:23
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
This class is the central access point for all current-frame state of all objects in the simulation i...
Definition: simObjectManager.h:42
const makVrf::DtVrfGeometryStateComponent * currentFrameVrfGeometryStateComponent() const
Definition: simObject.h:429
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.
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: simObject.h:355
DtSimObjectReferenceList * myAttachments
Attachments.
Definition: simObject.h:554
bool operator==(const DtSimObject &rhs) const
Definition: simObject.h:109
Definition: decoratorBase.h:30
DtPlatformSimObjectFacade * myPlatformSimObjectFacade
Definition: simObject.h:580
boost::signals2::scoped_connection myAttachmentsChangedConnection
Definition: simObject.h:555
boost::signals2::scoped_connection myExtendedDataUpdatedConnection
Definition: simObject.h:514
boost::signals2::scoped_connection myAddedConnection
Definition: simObject.h:511
boost::signals2::signal< void(const DtSimObject *, const DtUUID &oldSuperior, const DtUUID &newSuperior)> signal_superiorChanged
Signal sent when superior has changed.
Definition: simObject.h:372
Definition: rwVrfKinematicState.h:25
Contains the DtSimObjectReference class declaration.
tbb::spin_rw_mutex mySimObjectDecoratorMutex
Decorator members.
Definition: simObject.h:507
bool isSimulatedObject() const
Definition: simObject.h:233
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:126
const makVrf::DtLocationStateComponent * currentFrameLocationStateComponent() const
Definition: simObject.h:413
boost::signals2::scoped_connection myObjectNameChangedConnection
Definition: simObject.h:513
VRF4API_METHOD DtSimObjectReference sharedReference() const
This is the deprecated API that can be used as a reference to migrate 4.X code to 5...
Definition: simObject.h:597
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
boost::signals2::scoped_connection myUUIDChangedConnection
Definition: simObject.h:512
boost::signals2::scoped_connection mySuperiorChangedConnection
Definition: simObject.h:516
const makVrf::DtSimulatedObjectStateComponent * currentFrameSimulatedObjectStateComponent() const
Definition: simObject.h:397
class DtLocalVertexList:
Definition: localVertexList.h:20
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:22
boost::signals2::scoped_connection myAdvancedFrameConnection
Definition: simObject.h:517
bool myAdvancedFrame
Definition: simObject.h:559
bool operator!=(const DtSimObject &rhs) const
Definition: simObject.h:112
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: simObject.h:381
boost::signals2::scoped_connection myHostChangedConnection
Definition: simObject.h:566
Represents a feature geometry.
Definition: featureGeometry.h:39
DtAttachedTerrain * myTerrainAttachedTo
Definition: simObject.h:565
DtSimObject & operator=(const DtSimObject &rhs)
Definition: simObject.h:106
This DtVrfSimulatedSimObjectFacadeInterface class will provide accessors for data that is available t...
Definition: vrfSimulatedSimObjectFacade.h:27
This DtAggregateSimObjectFacadeInterface class will provide API functionality for aggregate level cal...
Definition: aggregateSimObjectFacade.h:25
const T_Component * getStateComponent() const
General call to get any component that does not have a method.
Definition: simObject.h:140
boost::signals2::scoped_connection myFirstFrameAdvancedConnection
Definition: simObject.h:515
const makVrf::DtVrfGeometryStateComponent * myCurrentFrameVrfGeometryStateComponent
Definition: simObject.h:576