![]() |
VR-Forces Developer's Guide
|
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.

Public Attributes | |
| boost::signals2::signal< void()> | signal_objectVerticesChanged |
| boost::signals2::signal< void()> | signal_extendedDataUpdated |
| boost::signals2::signal< void()> | signal_simObjectDeleted |
| boost::signals2::signal< void(const DtString &)> | signal_discoveredReference |
| boost::signals2::signal< void(const DtUUID &oldUUID, const DtUUID &newUUID)> | signal_uuidChanged |
| boost::signals2::signal< void(const DtSimulationAddress &oldAddr, const DtSimulationAddress &newAddr)> | signal_simEngineAddressChanged |
| boost::signals2::signal< void(const DtString &oldName, const DtString &newName)> | signal_objectRenamed |
| boost::signals2::signal< void(const DtUUID &oldSuperior, const DtUUID &newSuperior)> | signal_superiorChanged |
| boost::signals2::signal< void()> | signal_isClutterChanged |
| boost::signals2::signal< void(DtStateComponent *)> | signal_stateComponentAdded |
| boost::signals2::signal< void(DtStateComponent *)> | signal_stateComponentRemoved |
| boost::signals2::signal< void()> | signal_advancedFrame |
| boost::signals2::signal< void()> | signal_firstFrameAdvance |
Protected Member Functions | |
| virtual const DtStateData * | stateDataFor (const DtUUID &uuid) const |
| virtual void | cacheComponents () |
| virtual void | clearCachedComponents () |
| virtual void | stateDataAdded (DtStateData *) |
| virtual void | setUUID (const DtUUID &) |
| bool | checkAndConnectForVrfStateComponent () |
| void | uuidChanged (const DtUUID &, const DtUUID &) |
| virtual void | objectNameChanged (const DtString &oldText, const DtString &newText) |
| virtual void | completeSetup () |
| virtual void | extendedDataUpdated () |
| virtual void | superiorChanged () |
| virtual void | isClutterChanged () |
| virtual void | externalFrameStateToBeDestroyed () |
| virtual void | slot_stateComponentAdded (DtStateComponent *) |
| virtual void | slot_stateComponentRemoved (DtStateComponent *) |
| virtual void | simEngineAddressChanged (const DtSimulationAddress &oldAddress, const DtSimulationAddress &newAddress) |
Private Member Functions | |
| DtStateDataWrapper (const DtStateDataWrapper &) | |
|
private |
Creates an empty (invalid) object.
| makVrf::DtStateDataWrapper::DtStateDataWrapper | ( | ) |
CTOR – Even though this takes a state data it will not keep a reference to that state data. It is only used to keep the pointer to the current frame state.
|
explicit |
Constructs a wrapper for the simulation object identified by the given UUID.
| simManager | The state data manager used to resolve object state. |
| uuid | The UUID of the simulation object to wrap. |
|
explicit |
Constructs a wrapper for the simulation object identified by the given DIS entity identifier.
| simManager | The state data manager used to resolve object state. |
| id | The DIS entity identifier of the simulation object to wrap. |
|
explicit |
Constructs a wrapper directly from an existing external frame state.
| simManager | The state data manager associated with the frame state. |
|
explicit |
Constructs a wrapper from an existing DtStateData instance.
| sd | The underlying state data object to wrap. |
|
virtual |
DTOR.
| DtStateDataWrapper& makVrf::DtStateDataWrapper::operator= | ( | const DtUUID & | ) |
Reassigns this wrapper to refer to the simulation object with the given UUID.
|
inline |
Reassigns this wrapper to refer to the same simulation object as rhs.
References operator=(), and uuid().
Referenced by operator=().
Returns true if this wrapper refers to the simulation object with the given UUID.
|
inline |
Returns true if this wrapper refers to the same simulation object as rhs.
References uuid().
Returns true if this wrapper does not refer to the simulation object with the given UUID.
|
inline |
Returns true if this wrapper does not refer to the same simulation object as rhs.
| const DtUUID& makVrf::DtStateDataWrapper::uuid | ( | ) | const |
Convenience accessors for various pieces of state data.
Referenced by operator=(), operator==(), and DtSimObject::operator==().
| const DtString& makVrf::DtStateDataWrapper::objectName | ( | ) | const |
| DtString makVrf::DtStateDataWrapper::label | ( | ) | const |
| DtEntityType makVrf::DtStateDataWrapper::entityType | ( | ) | const |
|
inline |
Returns the value of a named extended data field attached to this object.
| key | The name of the extended data field. |
| std::map<std::string, std::string> makVrf::DtStateDataWrapper::extendedDataStdStringMap | ( | ) | const |
Returns true if this object has an extended data field with the given key.
| key | The name of the extended data field to check. |
| DtString makVrf::DtStateDataWrapper::overlay | ( | ) | const |
| DtAppearance makVrf::DtStateDataWrapper::appearance | ( | ) | const |
| int makVrf::DtStateDataWrapper::capabilities | ( | ) | const |
| DtEntityType makVrf::DtStateDataWrapper::guise | ( | ) | const |
| const DtRwProperties& makVrf::DtStateDataWrapper::stateProperties | ( | ) | const |
| const DtRwProperties& makVrf::DtStateDataWrapper::parameterProperties | ( | ) | const |
| const DtString& makVrf::DtStateDataWrapper::sidc | ( | ) | const |
| bool makVrf::DtStateDataWrapper::isClutterEntity | ( | ) | const |
Appearance attribute information.
| DtVrfObjectGeometry makVrf::DtStateDataWrapper::objectGeometry | ( | ) | const |
Geometry.
|
virtual |
Reimplemented in DtSimObject.
| const DtIffStateComponent* makVrf::DtStateDataWrapper::iffStateComponent | ( | ) | const |
Associated components.
| std::vector<const DtLaserDesignatorStateComponent*> makVrf::DtStateDataWrapper::laserDesignatorStateComponents | ( | ) | const |
|
inline |
If awaiting, who awaiting for.
| bool makVrf::DtStateDataWrapper::isSpotReport | ( | ) | const |
| bool makVrf::DtStateDataWrapper::awaitingTransfer | ( | ) | const |
Returns true if this object is in the process of converting from remote to local.
|
inline |
Returns true if the underlying state data was modified during the current simulation frame.
|
inline |
Returns the single state component of the given type, if present. Use this for components that do not have a dedicated accessor method.
|
inline |
Returns all state components of the given type attached to this object.
|
inline |
Returns true if this object currently has a state component of the given type.
Referenced by makVrf::makVrfGuiObjectInformationQt::DtEntityStateDIGuyAppearance::shouldBeHidden(), makVrf::makVrfGuiObjectInformationQt::DtEntityStateDIGuyCharacter::shouldBeHidden(), makVrf::makVrfGuiObjectInformationQt::DtEntityStateDIGuyAnimation::shouldBeHidden(), makVrf::makVrfGuiObjectInformationQt::DtEntityStateDIGuyHandItem::shouldBeHidden(), makVrf::makVrfGuiObjectInformationQt::DtEntityStateDIGuyHead::shouldBeHidden(), makVrf::makVrfGuiObjectInformationQt::DtEntityStateFrozen::shouldBeHidden(), and makVrf::makVrfGuiObjectInformationQt::DtEntityStateDRAlgorithm::shouldBeHidden().
| DtRwVrfKinematicState makVrf::DtStateDataWrapper::kinematicState | ( | ) | const |
Overall kinematic state.
| const DtVector& makVrf::DtStateDataWrapper::worldPosition | ( | ) | const |
TSP information Position.
| const DtVector& makVrf::DtStateDataWrapper::localPosition | ( | ) | const |
| const DtVector& makVrf::DtStateDataWrapper::parentPosition | ( | ) | const |
| double makVrf::DtStateDataWrapper::distSquaredTo | ( | const DtVector & | ) | const |
Returns the squared Euclidean distance from this object to the given world position.
| v | The target world position in meters. |
| bool makVrf::DtStateDataWrapper::hasLocationChanged | ( | ) | const |
In the last frame update, did the location of this object change.
| bool makVrf::DtStateDataWrapper::objectVerticesChanged | ( | ) | const |
Whether or not (if this is a multi point object) the body (object) vertices have changed (meaning has the user edited the vertices)
| bool makVrf::DtStateDataWrapper::worldVerticesChanged | ( | ) | const |
Whether or not the vertices of the object have changed from their last frame world positions. This can happen if the object is embarked and the host object has moved, or, if the user has edited the vertices.
| bool makVrf::DtStateDataWrapper::haveVerticesChanged | ( | ) | const |
Returns true if object or world vertices have changed.
|
virtual |
Called each time the simulation frame advances; updates cached component state.
Reimplemented in DtSimObject.
|
virtual |
Called the first time the simulation frame advances for this object; completes initial setup.
|
inline |
| DtUUID makVrf::DtStateDataWrapper::hostGlobalId | ( | ) | const |
| DtString makVrf::DtStateDataWrapper::parentGlobalId | ( | ) | const |
| const DtTaitBryan& makVrf::DtStateDataWrapper::topographicOrientation | ( | ) | const |
Orientation.
| const DtTaitBryan& makVrf::DtStateDataWrapper::worldOrientation | ( | ) | const |
| const DtTaitBryan& makVrf::DtStateDataWrapper::localOrientation | ( | ) | const |
| const DtTaitBryan& makVrf::DtStateDataWrapper::parentOrientation | ( | ) | const |
| const DtTaitBryan& makVrf::DtStateDataWrapper::localOrientationWrtDatabase | ( | ) | const |
| const DtDcm& makVrf::DtStateDataWrapper::localOrientationMatrix | ( | ) | const |
| const DtDcm& makVrf::DtStateDataWrapper::parentOrientationMatrix | ( | ) | const |
| const DtDcm& makVrf::DtStateDataWrapper::worldOrientationMatrix | ( | ) | const |
| double makVrf::DtStateDataWrapper::heading | ( | ) | const |
| double makVrf::DtStateDataWrapper::pitch | ( | ) | const |
| double makVrf::DtStateDataWrapper::roll | ( | ) | const |
| DtForceType makVrf::DtStateDataWrapper::forceType | ( | ) | const |
The force type of this object.
| const DtEntityIdentifier& makVrf::DtStateDataWrapper::entityId | ( | ) | const |
DIS object identifier.
|
inline |
| DtSimulationAddress makVrf::DtStateDataWrapper::simEngineAddress | ( | ) | const |
| bool makVrf::DtStateDataWrapper::isDestroyed | ( | ) | const |
Convenience method to see if this object is destroyed. Is not applicable to all object types (e.g. tactical graphics)
| int makVrf::DtStateDataWrapper::damageState | ( | ) | const |
| const DtString& makVrf::DtStateDataWrapper::globalId | ( | ) | const |
| bool makVrf::DtStateDataWrapper::isUnit | ( | ) | const |
Unit specific information Returns true if this object has a DtAggregateStateComponent.
| bool makVrf::DtStateDataWrapper::isEntityOrUnit | ( | ) | const |
Returns true if this object does not have the environmental state component.
|
inline |
Returns true if this object is an entity or aggregate unit (not environmental); synonym for isEntityOrUnit().
| bool makVrf::DtStateDataWrapper::isEntity | ( | ) | const |
Returns true if this object does not have the environmental state or aggregate state component.
| bool makVrf::DtStateDataWrapper::isEmbarked | ( | ) | const |
Embarkation status.
| DtUUID makVrf::DtStateDataWrapper::embarkedOn | ( | ) | const |
If embarked, the parent this object is embarked on.
Returns true if this object is embarked on the entity with the given UUID.
| uuid | UUID of the potential host entity to check against. |
|
virtual |
Returns true if myExternalCurrentFrameState is not nullptr. Not virtual on purpose as even though local object subclasses from this, this only wants to check if the read portion is valid.
Reimplemented in DtLocalObject.
Referenced by DtLocalObject::addStateComponent().
| int makVrf::DtStateDataWrapper::sessionId | ( | ) | const |
| bool makVrf::DtStateDataWrapper::isVrfSimulatedObject | ( | ) | const |
| bool makVrf::DtStateDataWrapper::isCurrentlyTasked | ( | ) | const |
| bool makVrf::DtStateDataWrapper::isExecutingPlan | ( | ) | const |
| bool makVrf::DtStateDataWrapper::hasPlan | ( | ) | const |
| bool makVrf::DtStateDataWrapper::independentlyTasked | ( | ) | const |
| bool makVrf::DtStateDataWrapper::underFire | ( | ) | const |
| DtString makVrf::DtStateDataWrapper::rulesOfEngagement | ( | ) | const |
| DtEchelonId makVrf::DtStateDataWrapper::echelonId | ( | ) | const |
| bool makVrf::DtStateDataWrapper::isDeleted | ( | ) | const |
Returns true if this object was valid and has since been deleted.
|
virtual |
Make this invalid by clearing the myExternalCurrentFrameState. This will also set the myIsDeleted flag to true.
Reimplemented in DtLocalObject, and DtSimObject.
| const DtLocalVertexList& makVrf::DtStateDataWrapper::localVertices | ( | ) | const |
| std::vector<DtVector> makVrf::DtStateDataWrapper::localVertexList | ( | ) | const |
| const DtVertexList& makVrf::DtStateDataWrapper::worldVertices | ( | ) | const |
| std::vector<DtVector> makVrf::DtStateDataWrapper::worldVertexList | ( | ) | const |
| const DtLocalVertexList& makVrf::DtStateDataWrapper::relativeVertices | ( | ) | const |
| std::vector<DtVector> makVrf::DtStateDataWrapper::relativeVertexList | ( | ) | const |
The internal legion global id that this object represents.
|
inline |
Will be true if this object has advanced at least one frame.
| DtUUID makVrf::DtStateDataWrapper::superiorUUID | ( | ) | const |
| bool makVrf::DtStateDataWrapper::isTopLevel | ( | ) | const |
Convenience method to see if this is a top level object. It is if it is local and the entity type is DtTopLevelEntityType.
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by makVrf::DtSetStatePropertyDialog::setupProperties().
|
inline |
|
inline |
|
inline |
| std::set<int> makVrf::DtStateDataWrapper::currentFrameModifiedStateComponentTypes | ( | ) | const |
| std::set<int> makVrf::DtStateDataWrapper::nextFrameModifiedStateComponentTypes | ( | ) | const |
|
protectedvirtual |
Returns the DtStateData for the given UUID via the state data manager.
| uuid | The UUID to look up. |
Reimplemented in makVrf::DtGuiLocalObject.
|
protectedvirtual |
Populates the cached state component pointers from the current frame state.
Reimplemented in makVrf::DtGuiLocalObject, and makVrf::DtGuiSimObject.
|
protectedvirtual |
Clears all cached state component pointers back to nullptr.
Reimplemented in makVrf::DtGuiLocalObject, and makVrf::DtGuiSimObject.
|
protectedvirtual |
Slot called when a new DtStateData is added; resolves a pending awaiting-reference.
| sd | The newly added state data. |
Reimplemented in DtSimObject.
|
protectedvirtual |
Reassigns this wrapper to track the simulation object with the given UUID.
| uuid | The UUID of the object to track. |
Reimplemented in DtLocalObject, makVrf::DtGuiLocalObject, and DtSimObject.
|
protected |
Checks whether a VRF state component is present and registers the necessary signal connections.
Slot called when the UUID of the tracked object changes.
| oldUUID | The previous UUID. |
| newUUID | The replacement UUID. |
|
protectedvirtual |
Slot called when the display name of the tracked object changes.
| oldText | The previous name. |
| newText | The new name. |
|
protectedvirtual |
Completes initialization once the underlying state data has become available.
Reimplemented in DtLocalObject, DtSimObject, and makVrf::DtGuiSimObject.
|
protectedvirtual |
Slot called when the extended data on the tracked object is updated.
|
protectedvirtual |
Slot called when the superior unit of this object changes.
Reimplemented in DtSimObject.
|
protectedvirtual |
Slot called when the is-clutter flag on this object changes.
Reimplemented in DtLocalObject.
|
protectedvirtual |
Called when the parameter is set up, this is the source it is using.
|
protectedvirtual |
Slot called when a state component is added to the underlying state data.
| component | The newly added state component. |
|
protectedvirtual |
Slot called when a state component is removed from the underlying state data.
| component | The removed state component. |
|
protectedvirtual |
Slot called when the simulation engine address hosting this object changes.
| oldAddress | The previous simulation engine address. |
| newAddress | The new simulation engine address. |
| boost::signals2::signal<void ()> makVrf::DtStateDataWrapper::signal_objectVerticesChanged |
Signal sent when the user changes the vertices via a set command. If this is a remote object, this signal may be sent any time the vertices change if the object is embarked on a host. This signal is only send for multiple vertex objects (routes/areas).
|
mutable |
Signal sent out (during advance frame) when the extended data has been updated.
|
mutable |
Signal sent when this simulation object has been deleted from the exercise.
|
mutable |
Signal sent if this was awaiting for the base data to show up, and, it has.
|
mutable |
Signal sent when the uuid of this object has changed. Sent during a frame advance.
|
mutable |
Signal sent when the backend hosting this object has changed. Sent during a frame advance.
|
mutable |
Signal sent when the uuid of this object has changed. Sent during a frame advance.
|
mutable |
Signal sent when superior has changed.
|
mutable |
Signal sent out (during advance frame) when the is-clutter flag has been updated.
|
mutable |
Signal sent when a state component is added to this object.
|
mutable |
Signal sent when a state component is removed from this object.
|
mutable |
Signal sent when the state data signals that the frame has been advanced WARNING: This signal will be called from within the overall AdvanceFrame section while other entities are advancing frames in parallel threads. It is unsafe to inspect any other object's at this time, and unsafe to make changes to this object's public state.
| boost::signals2::signal<void ()> makVrf::DtStateDataWrapper::signal_firstFrameAdvance |
Signal when the frame is advanced for the first time.
|
protected |
Pointer to the current-frame read-only state interface; null if this object is invalid.
|
protected |
Connection to signal_stateComponentAdded on the tracked state data.
|
protected |
Connection to signal_stateComponentRemoved on the tracked state data.
|
protected |
Connection to signal_externalFrameStateToBeDestroyed on the current frame state.
|
protected |
Connection to signal_stateDataAdded on the state data manager (used while awaiting).
|
protected |
Connection to signal_uuidChanged on the tracked state data.
|
protected |
Connection to signal_objectNameChanged on the tracked state data.
|
protected |
Connection to signal_extendedDataUpdated on the tracked state data.
|
protected |
Connection to signal_firstFrameAdvance on the tracked state data.
|
protected |
Connection to signal_superiorChanged on the tracked state data.
|
protected |
Connection to signal_frameAdvanced on the tracked state data.
|
protected |
Connection to signal_isClutterChanged on the tracked state data.
|
protected |
Connection to signal_simEngineAddressChanged on the tracked state data.
|
protected |
If this object is awaiting for its reference to show up, this will be either a UUID or an entity id string.
|
protected |
Once assigned, the UUID of this object. This will be valid even after the object is deleted.
Internal 64-bit legion global handle; initialized to 0xFFFFFFFFFFFFFFFF until resolved.
|
protected |
True if this object has been removed from the exercise.
|
mutableprotected |
This is for debug purposes only. It will get set when the bounding volume is checked (and locked) and this value is empty.
|
mutableprotected |
Cached entity type used for debug and logging; updated when the object is resolved.
|
protected |
UUID of this object's superior unit, or null UUID if it has no superior.
|
protected |
True once this object has advanced at least one simulation frame.
|
mutableprotected |
Reader-writer spin mutex protecting myExternalCurrentFrameState for thread-safe access.
|
protected |
UUID of the host object this object is embarked on, or null UUID if not embarked.
|
protected |
Cached simulated object state component pointer for the current frame; nullptr if absent.
|
protected |
Cached VRF state component pointer for the current frame; nullptr if absent.
|
protected |
Cached entity state component pointer for the current frame; nullptr if absent.
|
protected |
Cached location state component pointer for the current frame; nullptr if absent.
|
protected |
Cached VRF geometry state component pointer for the current frame; nullptr if absent.
|
protected |
Cached state properties component pointer for the current frame; nullptr if absent.
|
protected |
True once component pointers have been populated by cacheComponents().
|
protected |
Optional direct reference to the underlying DtStateData, if available.
|
protected |
The state data manager used to resolve UUID and entity identifier lookups.