![]() |
VR-Forces Developer's Guide
|
This class is the central access point for all current-frame state of all objects in the simulation in a read-only form. This includes all simulation objects for the sim engine, including locally simulated objects, and remote objects received from the network, both VRF simulated and non-VRF simulated. This gives access to the external state of all of these objects and their current-frame state in a manner that is thread-safe during the simulation frame.

Classes | |
| struct | Connections |
| struct | DeletedObjects |
| struct | StateDataManagerInformation |
Public Types | |
| using | SimObjects = std::map< unsigned long long, DtSimObjectReferenceTemplate< T_BaseClass >> |
| typedef std::set< const DtFrameStateInterface * > | CurrentFrameStates |
| typedef boost::signals2::signal< void(DtStateComponent *)> | StateComponentAddedSignal |
| typedef boost::signals2::signal< void(DtStateComponent *)> | StateComponentRemovedSignal |
Public Attributes | |
| boost::signals2::signal< void()> | signal_advancedFrame |
| boost::signals2::signal< void(DtSimObjectReferenceTemplate < T_BaseClass >)> | signal_simObjectAdded |
| boost::signals2::signal< void(DtSimObjectReferenceTemplate < T_BaseClass >)> | signal_simObjectDeleted |
| boost::signals2::signal< void(const DtUUID &oldUUID, const DtUUID &newUUID)> | signal_uuidChanged |
| boost::signals2::signal< void(const DtUUID &oldUUID, const DtUUID &newUUID)> | signal_uuidUpgradedTo |
| boost::signals2::signal< void(DtSimObjectReferenceTemplate < T_BaseClass >, const DtString &oldText, const DtString &newText)> | signal_simObjectRenamed |
Protected Types | |
| typedef std::map< DtString, DtSimObjectReferenceTemplate < T_BaseClass > > | AwaitingMap |
| typedef std::map< unsigned long long, Connections > | SimObjectConnections |
Protected Member Functions | |
| virtual void | simObjectDeleted (const DtStateDataWrapper *) |
| virtual void | stateDataDeleted (const DtStateData *) |
| virtual DtSimObjectReferenceTemplate < T_BaseClass > | getOrCreateSimObjectReference (DtStateData *, bool createOnlyIfNotPresent=false) const |
| virtual void | uuidChanged (unsigned long long, const DtUUID &oldUUID, const DtUUID &newUUID) |
| virtual void | objectRenamed (const DtStateDataWrapper *, const DtString &oldName, const DtString &newName) |
| virtual void | simObjectAdded (DtStateData *) |
| virtual void | discoveredObjectReference (const DtString &awaiting) |
| bool | isDeleted (const DtUUID &) const |
| virtual void | slot_uuidUpgradedTo (const DtUUID &oldUUID, const DtUUID &newUUID) |
Protected Attributes | |
| DtStateDataManager * | myStateDataManager |
| tbb::spin_rw_mutex | myMutex |
| boost::signals2::scoped_connection | myUUIDUpgradedConnection |
| std::vector< DtStateDataManager * > | myStateDataManagerOrder |
| std::map< DtStateDataManager *, StateDataManagerInformation > | myStateDataManagers |
| SimObjects | mySimObjects |
| AwaitingMap | myAwaitingMap |
| SimObjects | myAdded |
| DeletedObjects | myDeleted |
| SimObjectConnections | mySimObjectConnections |
Private Member Functions | |
| DtSimObjectManagerTemplate () | |
| DtSimObjectManagerTemplate (const DtSimObjectManagerTemplate &) | |
| DtSimObjectManagerTemplate & | operator= (const DtSimObjectManagerTemplate &) |
| using makVrf::DtSimObjectManagerTemplate< T_BaseClass >::SimObjects = std::map<unsigned long long, DtSimObjectReferenceTemplate<T_BaseClass>> |
| typedef std::set<const DtFrameStateInterface*> makVrf::DtSimObjectManagerTemplate< T_BaseClass >::CurrentFrameStates |
Type alias for a set of current-frame state interfaces.
| typedef boost::signals2::signal<void (DtStateComponent*)> makVrf::DtSimObjectManagerTemplate< T_BaseClass >::StateComponentAddedSignal |
Signal type fired when a DtStateComponent is added to a sim object.
| typedef boost::signals2::signal<void (DtStateComponent*)> makVrf::DtSimObjectManagerTemplate< T_BaseClass >::StateComponentRemovedSignal |
Signal type fired when a DtStateComponent is removed from a sim object.
|
protected |
Map type for objects awaiting UUID resolution, keyed by awaiting identifier string.
|
protected |
Map type from legion global ID to per-object signal connections.
|
private |
|
private |
| makVrf::DtSimObjectManagerTemplate< T_BaseClass >::DtSimObjectManagerTemplate | ( | DtStateDataManager * | m | ) |
CTOR – Takes the state data manager so this can be made aware of the comings and goings of state data.
|
virtual |
DTOR.
|
private |
|
virtual |
Ticks this manager and performs any operations it needs to.
|
virtual |
Any initialization that wants to be done.
|
virtual |
Send out an added signal for all objects added and advanced since the last frame began.
|
virtual |
Find a DtSimObject by DtUUID.
|
virtual |
Find a DtSimObject by DtEntityIdentifier.
|
virtual |
Returns the simObjectReference (if it exists) by the legionGlobalId.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
inline |
|
inline |
| void makVrf::DtSimObjectManagerTemplate< T_BaseClass >::attachStateDataManager | ( | DtStateDataManager * | ) |
Attach an additional state data manager that might keep track of a separate set of objects, however, still want to manager the read only objects here.
| void makVrf::DtSimObjectManagerTemplate< T_BaseClass >::detachStateDataManager | ( | DtStateDataManager * | ) |
Detach a previously attached state data manager.
|
pure virtual |
Factory method: create a sim object wrapper from an existing DtStateData instance.
| sd | The state data to wrap. |
Implemented in DtSimObjectManager, and makVrf::DtVrfGuiSimObjectManager::GuiSimObjectManager.
|
pure virtual |
Factory method: create a sim object wrapper for the given UUID.
| uuid | The UUID of the object to create. |
Implemented in DtSimObjectManager, and makVrf::DtVrfGuiSimObjectManager::GuiSimObjectManager.
|
pure virtual |
Factory method: create a sim object wrapper for the given entity identifier.
| entid | The entity identifier of the object to create. |
Implemented in DtSimObjectManager, and makVrf::DtVrfGuiSimObjectManager::GuiSimObjectManager.
|
virtual |
Clears sim objects and awaiting map.
|
virtual |
Returns true if this manager has the UUID in the mySimObjects list.
|
virtual |
|
inline |
|
virtual |
Called when a new sim object reference is added to this manager.
| ref | The newly added sim object reference. |
Reimplemented in DtSimObjectManager.
|
inline |
|
inline |
|
virtual |
|
protectedvirtual |
Called when a sim object is deleted; removes it from internal tracking.
| wrapper | The wrapper of the deleted sim object. |
|
protectedvirtual |
Called when underlying state data is deleted.
| sd | The deleted state data. |
|
protectedvirtual |
If createOnlyIfNotPresent is true, will create and return, but not add to the mySimObjects list.
|
protectedvirtual |
Called when a sim object's UUID changes; updates internal maps accordingly.
| legionGlobalId | The legion global ID of the object whose UUID changed. |
| oldUUID | The previous UUID. |
| newUUID | The new UUID. |
|
protectedvirtual |
Called when a sim object is renamed; fires the rename signal.
| wrapper | The wrapper of the renamed sim object. |
| oldName | The previous name. |
| newName | The new name. |
|
protectedvirtual |
Called when new state data is added; creates and registers a sim object reference.
| sd | The newly added state data. |
|
protectedvirtual |
Called when a previously awaited object reference becomes discoverable.
| awaiting | The identifier string of the awaited object. |
|
protected |
If this is in the list but is marked as deleted, returns true.
|
protectedvirtual |
Called, when as part of an import process, a UUID is upgraded from an old to a new version. Some items might need to know this to remap items that hap not yet been discovered.
|
mutable |
Signal sent when frame is advanced.
|
mutable |
Signal sent when a new DtSimObjectReferenceTemplate<T_BaseClass> has been added.
|
mutable |
Signal sent when a new DtSimObjectReferenceTemplate<T_BaseClass> has been deleted.
|
mutable |
Signal when UUID is changed. Called before the map is updated with the new uuid.
|
mutable |
Signal when a UUID is remapped. Called after awaiting list has been changed.
|
mutable |
Signal sent when an objects name has changed.
|
protected |
The primary state data manager providing state data for sim objects.
Referenced by makVrf::DtSimObjectManagerTemplate< DtSimObject >::signalWhenStateComponentAdded(), makVrf::DtSimObjectManagerTemplate< DtSimObject >::signalWhenStateComponentRemoved(), and makVrf::DtSimObjectManagerTemplate< DtSimObject >::stateComponents().
|
mutableprotected |
Mutex protecting access to internal maps during concurrent frame reads.
|
protected |
Connection tracking the UUID-upgraded signal from the primary state data manager.
|
protected |
Ordered list of all attached state data managers.
|
protected |
Map from each attached state data manager to its signal connections.
Referenced by makVrf::DtSimObjectManagerTemplate< DtSimObject >::stateComponents().
|
mutableprotected |
The current set of all live sim object references, keyed by legion global ID.
Referenced by makVrf::DtSimObjectManagerTemplate< DtSimObject >::simObjects().
|
mutableprotected |
Objects that have been created but are awaiting UUID resolution.
|
protected |
Sim objects added since the last frame advance, pending signal notification.
|
protected |
The set of objects deleted during the current frame.
|
mutableprotected |
Signal connections for each tracked sim object, keyed by legion global ID.