|
VR-Engage
2.2
|
DtUpdateVisualsConnector responds to visual model definition changes by recreating and updating DtVrlinkElement objects to reflect the new visual definitions. It handles entities, aggregates, and tactical graphics, ensuring they use the latest visual model definitions from the current simulation model set (SMS).
#include <updateVisualsConnector.h>
Public Member Functions | |
| DtUpdateVisualsConnector () | |
| virtual | ~DtUpdateVisualsConnector () override |
| virtual void | install (DtPlayerStationApp *app, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection) override |
| virtual void | tick () override |
| virtual void | shutdown () override |
Public Member Functions inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector | |
| DtSimEventConnector () | |
| virtual | ~DtSimEventConnector () override |
Public Member Functions inherited from makVre::DtConnector | |
| DtConnector () | |
| virtual | ~DtConnector () |
| virtual DtConnectorType | type () |
| virtual std::string | name () |
Protected Member Functions | |
| virtual makVre::DtVreMessageResult | handleVisualModelDefinitionsLoaded (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleSmsLoadComplete (makVre::DtVreMessage *msg) |
Protected Attributes | |
| std::map< DtGlobalObjectDesignator, DtGlobalObjectDesignator > | myEntitiesToReparent |
| int | myTicksToReparent |
Protected Attributes inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector | |
| DtPlayerStationApp * | myApp |
| makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * | myConnection |
Protected Attributes inherited from makVre::DtConnector | |
| std::string | myName |
| DtConnectorType | myType |
Additional Inherited Members | |
Public Types inherited from makVre::DtConnector | |
| enum | DtConnectorType { DIS , HLA13 , HLA1516 , HLA1516E , HLA4 } |
Static Public Member Functions inherited from makVre::DtConnector | |
| static std::string | extension (DtConnectorType type) |
| makVre::DtUpdateVisualsConnector::DtUpdateVisualsConnector | ( | ) |
Default constructor.
Initializes the connector with name "UpdateVisuals"
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Installs the visual update connector with the application and connection.
| app | Pointer to the player station application |
| connection | Pointer to the protocol-specific VR-Link connection |
Registers message handlers for VisualModelDefinitionsLoadedMessage messages
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
overridevirtual |
Performs periodic processing of entity reparenting.
Handles re-parenting of embarked entities that were discovered during SMS reload by attempting to re-establish parent-child relationships over several ticks
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
overridevirtual |
Shuts down the visual update connector.
Removes message handlers for visual model definition updates
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
protectedvirtual |
Handles visual model definition loaded messages.
| msg | Pointer to the visual model definitions loaded message |
Updates all visual DtVrlinkElements (entities, aggregates, tactical graphics) with the latest visual model definitions/mappings. For each element, it disables and re-enables the model sets, updates the element definition, and then re-visualizes the element using the new definitions.
|
protectedvirtual |
Handles SMS load complete messages.
| msg | Pointer to the SMS load complete message |
Sets up the reparenting process after SMS reload by initializing the myTicksToReparent counter and removing the handler since it's only needed once per reload
|
protected |
Map of entities that need to be reparented.
Map of entity global designators to their parent entity global designators Used to track entities that need to be reparented after SMS reload
|
protected |
Counter for reparenting attempts.
Number of ticks remaining to attempt reparenting of entities When this reaches zero, any remaining entities will have warning messages logged