DtWeaponFireConnector processes weapon fire interactions from VR-Link and translates them to VREngage fire messages. It also handles caching of fire interactions when necessary entity information is not yet available.
#include <weaponFireConnector.h>
◆ PendingFireInteractions
Type alias for pending fire interactions.
Each pair contains the timestamp when the interaction was received and a pointer to the fire interaction
◆ DtWeaponFireConnector()
| makVre::DtWeaponFireConnector::DtWeaponFireConnector |
( |
| ) |
|
Default constructor.
Initializes the connector with name "WeaponFire"
◆ ~DtWeaponFireConnector()
| virtual makVre::DtWeaponFireConnector::~DtWeaponFireConnector |
( |
| ) |
|
|
overridevirtual |
◆ install()
| virtual void makVre::DtWeaponFireConnector::install |
( |
DtPlayerStationApp * | app, |
|
|
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * | connection ) |
|
overridevirtual |
Installs the weapon fire connector with the application and connection.
- Parameters
-
| app | Pointer to the player station application |
| connection | Pointer to the protocol-specific VR-Link connection |
Calls the base class implementation, registers the fire callback, and retrieves the reflected entity list from the application
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
◆ tick()
| virtual void makVre::DtWeaponFireConnector::tick |
( |
| ) |
|
|
overridevirtual |
◆ shutdown()
| virtual void makVre::DtWeaponFireConnector::shutdown |
( |
| ) |
|
|
overridevirtual |
◆ handleFireMessage()
| void makVre::DtWeaponFireConnector::handleFireMessage |
( |
DtFireInteraction * | fire | ) |
|
Handles an incoming fire interaction.
- Parameters
-
| fire | Pointer to the fire interaction to process |
Either sends the fire message immediately if all necessary entity information is available, or caches it for later processing
◆ findEntityId()
| DtEntityIdentifier makVre::DtWeaponFireConnector::findEntityId |
( |
const DtGlobalObjectDesignator & | globalId | ) |
|
|
protected |
Finds the entity identifier for a global object designator.
- Parameters
-
| globalId | The global object designator to look up |
- Returns
- The entity identifier if found, or nullId if not found
Looks up an entity in the reflected entity list by its global object designator
◆ fireMessageReadyToSend()
| bool makVre::DtWeaponFireConnector::fireMessageReadyToSend |
( |
DtFireInteraction * | fire | ) |
|
|
protected |
Determines if a fire interaction is ready to be sent.
- Parameters
-
| fire | Pointer to the fire interaction to check |
- Returns
- True if the interaction is ready to send, false otherwise
Makes sure that the firing entity and munition entity (if specified) have been discovered in the simulation
◆ sendFireMessage()
| void makVre::DtWeaponFireConnector::sendFireMessage |
( |
DtFireInteraction * | fire | ) |
|
|
protected |
Sends a fire message for a fire interaction.
- Parameters
-
| fire | Pointer to the fire interaction to send |
Creates and queues a fire message with the information from the fire interaction
◆ myReflectedEntityList
| DtReflectedEntityList* makVre::DtWeaponFireConnector::myReflectedEntityList |
|
protected |
Pointer to the reflected entity list.
Used to look up entities by their global object designators
◆ myPendingFireInteractions
Cached fire interactions.
These interactions are delayed until the firing entity and munition entity have been discovered in the simulation
The documentation for this class was generated from the following file: