VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtPlayerComponent Class Referenceabstract

Detailed Description

DtPlayerComponent serves as the foundation for all components that can be added to player roles. Components encapsulate specific functionality, such as movement control, weapons systems, sensor management, and user interface elements.

Components are instantiated by the player station during initialization based on the role definition. They have access to the player attribute store for sharing data with other components, and they receive tick calls for regular updates.

Components that require deferred initialization should set myComponentReady to false in their constructor and override finalizeInitTick(). The LOADING_PLAYER_STATE will call finalizeInitTick() each frame until the component reports Ready or Failed. Components that complete all initialization in initialize()/postInitialize() leave myComponentReady at its default value of true and do not override finalizeInitTick().

#include <playerComponent.h>

Inheritance diagram for makVre::DtPlayerComponent:
[legend]

Public Member Functions

 DtPlayerComponent ()
 
virtual ~DtPlayerComponent ()
 
virtual bool initialize (DtPlayerStation *player, DtInitTable &config)
 
virtual bool postInitialize ()
 
virtual void tick (double dt)=0
 
virtual void shutdown ()
 
bool componentReady () const
 
void setComponentReady (bool ready)
 
virtual DtInitTickStatus finalizeInitTick (double dt)
 
virtual const char * type () const =0
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStation & player ()
 
virtual DtAttributeHandle & playerAttributeStore ()
 
virtual const DtAttributeHandle & playerAttributeStore () const
 
virtual const DtAttributeHandle & ownshipState () const
 
virtual void setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId())
 

Protected Member Functions

virtual void initializeStateAttributes ()
 

Protected Attributes

bool myComponentReady = true
 
std::string myName
 
DtInitTable myConfig
 
DtPlayerStation * myPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolver * myResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 
DtVreMessageHandlerGroup myMessageHandlers
 

Constructor & Destructor Documentation

◆ DtPlayerComponent()

makVre::DtPlayerComponent::DtPlayerComponent ( )

Constructor.

Creates a component Called from DtPlayerStation::initializeComponents during player station initialization. Each component has a unique type that identifies its functionality.

◆ ~DtPlayerComponent()

virtual makVre::DtPlayerComponent::~DtPlayerComponent ( )
virtual

Virtual destructor.

Ensures proper cleanup of derived component classes.

Member Function Documentation

◆ initialize()

virtual bool makVre::DtPlayerComponent::initialize ( DtPlayerStation * player,
DtInitTable & config )
virtual

Initializes the component.

Parameters
playerPointer to the player station that owns this component
configConfiguration table with component settings
Returns
True if initialization was successful, false otherwise

Called when the component is first created during player station initialization. This method performs initial setup and calls initializeStateAttributes(). Components should override this method to perform type-specific initialization, but must call the base class implementation first.

Reimplemented in DtDriverQmlHudComponent, DtEntityDetectionControlLogic, DtEntityHealthBarOverlay, DtHumanAudioUpdater, DtHumanWeaponPoseLogic, DtLightsSirensControlLogic, DtPilotObserverUpdater, DtPlayerStateAttributeSampleComponent, DtStreamingVideoUpdater, DtVehicleBlinkerControlLogic, DtVrObserverUpdater, makVre::DtActionMenuLogic, makVre::DtActionMenuUpdater, makVre::DtAppLauncherComponent, makVre::DtArtPartParamToStateAttrMap, makVre::DtArtPartUpdater, makVre::DtAudioListenerOverrideUpdater, makVre::DtAudioUpdater, makVre::DtBinocularsLasingOverlay, makVre::DtBinocularsOverlay, makVre::DtBinocularsSimLogic, makVre::DtBinocularsZoomOverlay, makVre::DtCigiHostControl, makVre::DtCommanderControlLogic, makVre::DtCommanderHatchControlLogic, makVre::DtCommanderHatchViewUpdater, makVre::DtCommanderObserverUpdater, makVre::DtCommentLogic, makVre::DtDeadReckonOverrider, makVre::DtDisembarkControlLogic, makVre::DtDriverControlLogic, makVre::DtDriverMenuLogic, makVre::DtDroneControlLogic, makVre::DtDroneHudUpdater, makVre::DtDroneTaskLogic, makVre::DtEchelonLogic, makVre::DtEmbeddedEntityLogic, makVre::DtEngineAudioUpdater, makVre::DtEntityControlLogic, makVre::DtEntityOverlayComponent, makVre::DtExtendedStateLogic, makVre::DtFriendlyUnitsLogic, makVre::DtGlStudioHudMapperLogic, makVre::DtGunnerControlLogic, makVre::DtGunnerObserverUpdater, makVre::DtGunnerRangeSimLogic, makVre::DtHudUpdater, makVre::DtHumanControlLogic, makVre::DtHumanHudUpdater, makVre::DtHumanMenuLogic, makVre::DtHumanObserverUpdater, makVre::DtHumanRenderUpdater, makVre::DtHumanVirtualRealityLogic, makVre::DtHumanVrHudUpdater, makVre::DtLaserTargetDesignatorSimLogic, makVre::DtLauncherControlLogic, makVre::DtLookAroundObserverUpdater, makVre::DtMetaRoleControlLogic, makVre::DtMinimapUpdater, makVre::DtMixedRealityUpdater, makVre::DtObserverUpdater, makVre::DtOverlayComponent, makVre::DtPilotMenuLogic, makVre::DtPilotRenderUpdater, makVre::DtPilotSimLogic, makVre::DtQtQuickOverlay, makVre::DtRadioLogic, makVre::DtRemoteSensorViewLogic, makVre::DtRoleSelectionControl, makVre::DtSavedViewUpdater, makVre::DtScopeSimLogic, makVre::DtScriptComponent, makVre::DtSettingsOverrideComponent, makVre::DtSlewToCueControl, makVre::DtSpectatorAudioUpdater, makVre::DtSpectatorHudUpdater, makVre::DtSpectatorObserverUpdater, makVre::DtSpectatorOverlay, makVre::DtSpectatorSimLogic, makVre::DtTowingControlLogic, makVre::DtVehicleOccupantUpdater, makVre::DtVirtualRealityLogic, makVre::DtVrvSensorOverlayUpdater, makVre::DtWeaponPoseUpdater, makVre::DtWeaponResourceLogic, makVre::DtWindowLayoutComponent, and makVre::DtZoomControl.

References player().

◆ postInitialize()

virtual bool makVre::DtPlayerComponent::postInitialize ( )
virtual

Performs post-initialization setup.

Returns
True if post-initialization was successful, false otherwise

Called after all components have been created and initialized. This is when required but not owned state attributes can be looked up in the state, or dependent components can be located. Components can use this phase to establish connections with other components in the player station.

Reimplemented in DtDriverQmlHudComponent, DtNotifyLogic, DtPlayerStateAttributeSampleComponent, makVre::DtActionMenuLogic, makVre::DtActionMenuUpdater, makVre::DtBinocularsLasingOverlay, makVre::DtBinocularsOverlay, makVre::DtBinocularsSimLogic, makVre::DtBinocularsZoomOverlay, makVre::DtCommanderControlLogic, makVre::DtCommanderHatchControlLogic, makVre::DtDeadReckonOverrider, makVre::DtDriverMenuLogic, makVre::DtDroneControlLogic, makVre::DtEntityControlLogic, makVre::DtEntityOverlayComponent, makVre::DtFriendlyUnitsLogic, makVre::DtGunnerControlLogic, makVre::DtHudUpdater, makVre::DtHumanControlLogic, makVre::DtHumanHudUpdater, makVre::DtHumanMenuLogic, makVre::DtHumanObserverUpdater, makVre::DtHumanVirtualRealityLogic, makVre::DtHumanVrHudUpdater, makVre::DtLookAroundObserverUpdater, makVre::DtMetaRoleControlLogic, makVre::DtMinimapUpdater, makVre::DtMixedRealityUpdater, makVre::DtObserverUpdater, makVre::DtOverlayComponent, makVre::DtPilotMenuLogic, makVre::DtPilotRenderUpdater, makVre::DtPilotSimLogic, makVre::DtQtQuickOverlay, makVre::DtRadioLogic, makVre::DtRemoteSensorViewLogic, makVre::DtRoleSelectionControl, makVre::DtScopeSimLogic, makVre::DtScriptComponent, makVre::DtSlewToCueControl, and makVre::DtWeaponResourceLogic.

◆ tick()

virtual void makVre::DtPlayerComponent::tick ( double dt)
pure virtual

Updates the component.

Parameters
dtTime in seconds since the last tick

Called once per frame to update the component's state. All concrete component classes must implement this method.

Implemented in DtDriverQmlHudComponent, DtEntityDetectionControlLogic, DtHumanAudioUpdater, DtHumanWeaponPoseLogic, DtLightsSirensControlLogic, DtNotifyLogic, DtPilotObserverUpdater, DtPlayerStateAttributeSampleComponent, DtStreamingVideoUpdater, DtVrObserverUpdater, makVre::DtActionMenuLogic, makVre::DtActionMenuUpdater, makVre::DtAppLauncherComponent, makVre::DtArtPartParamToStateAttrMap, makVre::DtArtPartUpdater, makVre::DtAudioListenerOverrideUpdater, makVre::DtAudioUpdater, makVre::DtBinocularsLasingOverlay, makVre::DtBinocularsOverlay, makVre::DtBinocularsSimLogic, makVre::DtBinocularsZoomOverlay, makVre::DtCigiHostControl, makVre::DtCommanderControlLogic, makVre::DtCommanderHatchControlLogic, makVre::DtCommanderHatchViewUpdater, makVre::DtCommanderObserverUpdater, makVre::DtCommentLogic, makVre::DtDeadReckonOverrider, makVre::DtDisembarkControlLogic, makVre::DtDriverControlLogic, makVre::DtDriverMenuLogic, makVre::DtDroneControlLogic, makVre::DtDroneHudUpdater, makVre::DtDroneTaskLogic, makVre::DtEchelonLogic, makVre::DtEmbeddedEntityLogic, makVre::DtEngineAudioUpdater, makVre::DtEntityControlLogic, makVre::DtEntityOverlayComponent, makVre::DtExtendedStateLogic, makVre::DtFriendlyUnitsLogic, makVre::DtGlStudioHudMapperLogic, makVre::DtGunnerControlLogic, makVre::DtGunnerObserverUpdater, makVre::DtGunnerRangeSimLogic, makVre::DtHudUpdater, makVre::DtHumanControlLogic, makVre::DtHumanHudUpdater, makVre::DtHumanMenuLogic, makVre::DtHumanObserverUpdater, makVre::DtHumanRenderUpdater, makVre::DtHumanVirtualRealityLogic, makVre::DtHumanVrHudUpdater, makVre::DtLaserTargetDesignatorSimLogic, makVre::DtLauncherControlLogic, makVre::DtLookAroundObserverUpdater, makVre::DtMetaRoleControlLogic, makVre::DtMinimapUpdater, makVre::DtMixedRealityUpdater, makVre::DtObserverUpdater, makVre::DtOverlayComponent, makVre::DtPilotMenuLogic, makVre::DtPilotRenderUpdater, makVre::DtPilotSimLogic, makVre::DtQtQuickOverlay, makVre::DtRadioLogic, makVre::DtRemoteSensorViewLogic, makVre::DtRoleSelectionControl, makVre::DtSavedViewUpdater, makVre::DtScopeSimLogic, makVre::DtScriptComponent, makVre::DtSettingsOverrideComponent, makVre::DtSlewToCueControl, makVre::DtSpectatorAudioUpdater, makVre::DtSpectatorHudUpdater, makVre::DtSpectatorObserverUpdater, makVre::DtSpectatorOverlay, makVre::DtSpectatorSimLogic, makVre::DtTowingControlLogic, makVre::DtVehicleOccupantUpdater, makVre::DtVirtualRealityLogic, makVre::DtVrvSensorOverlayUpdater, makVre::DtWeaponPoseUpdater, makVre::DtWeaponResourceLogic, and makVre::DtWindowLayoutComponent.

◆ shutdown()

virtual void makVre::DtPlayerComponent::shutdown ( )
virtual

Shuts down the component.

Called when the player station is shutting down. Components should override this method to release resources and perform cleanup operations.

Reimplemented in DtDriverQmlHudComponent, DtEntityDetectionControlLogic, DtHumanAudioUpdater, DtHumanWeaponPoseLogic, DtLightsSirensControlLogic, DtNotifyLogic, DtPilotObserverUpdater, DtPlayerStateAttributeSampleComponent, DtStreamingVideoUpdater, DtVrObserverUpdater, makVre::DtActionMenuLogic, makVre::DtActionMenuUpdater, makVre::DtAppLauncherComponent, makVre::DtArtPartParamToStateAttrMap, makVre::DtArtPartUpdater, makVre::DtAudioListenerOverrideUpdater, makVre::DtAudioUpdater, makVre::DtBinocularsLasingOverlay, makVre::DtBinocularsOverlay, makVre::DtBinocularsSimLogic, makVre::DtCigiHostControl, makVre::DtCommanderControlLogic, makVre::DtCommanderHatchControlLogic, makVre::DtCommanderHatchViewUpdater, makVre::DtCommanderObserverUpdater, makVre::DtCommentLogic, makVre::DtDeadReckonOverrider, makVre::DtDisembarkControlLogic, makVre::DtDriverControlLogic, makVre::DtDriverMenuLogic, makVre::DtDroneControlLogic, makVre::DtEchelonLogic, makVre::DtEmbeddedEntityLogic, makVre::DtEngineAudioUpdater, makVre::DtEntityControlLogic, makVre::DtEntityOverlayComponent, makVre::DtExtendedStateLogic, makVre::DtFriendlyUnitsLogic, makVre::DtGlStudioHudMapperLogic, makVre::DtGunnerControlLogic, makVre::DtGunnerObserverUpdater, makVre::DtGunnerRangeSimLogic, makVre::DtHudUpdater, makVre::DtHumanControlLogic, makVre::DtHumanMenuLogic, makVre::DtHumanObserverUpdater, makVre::DtHumanRenderUpdater, makVre::DtHumanVirtualRealityLogic, makVre::DtHumanVrHudUpdater, makVre::DtLaserTargetDesignatorSimLogic, makVre::DtLauncherControlLogic, makVre::DtLookAroundObserverUpdater, makVre::DtMetaRoleControlLogic, makVre::DtMinimapUpdater, makVre::DtMixedRealityUpdater, makVre::DtObserverUpdater, makVre::DtOverlayComponent, makVre::DtPilotMenuLogic, makVre::DtPilotRenderUpdater, makVre::DtPilotSimLogic, makVre::DtQtQuickOverlay, makVre::DtRadioLogic, makVre::DtRemoteSensorViewLogic, makVre::DtRoleSelectionControl, makVre::DtSavedViewUpdater, makVre::DtScopeSimLogic, makVre::DtScriptComponent, makVre::DtSettingsOverrideComponent, makVre::DtSlewToCueControl, makVre::DtSpectatorAudioUpdater, makVre::DtSpectatorHudUpdater, makVre::DtSpectatorObserverUpdater, makVre::DtSpectatorOverlay, makVre::DtSpectatorSimLogic, makVre::DtTowingControlLogic, makVre::DtVehicleOccupantUpdater, makVre::DtVirtualRealityLogic, makVre::DtVrvSensorOverlayUpdater, makVre::DtWeaponPoseUpdater, makVre::DtWeaponResourceLogic, makVre::DtWindowLayoutComponent, and makVre::DtZoomControl.

◆ componentReady()

bool makVre::DtPlayerComponent::componentReady ( ) const
inline

Returns whether this component has completed deferred initialization.

Components that need asynchronous initialization (e.g., waiting for VR-Vantage agents or terrain realization) set myComponentReady to false in their constructor. The LOADING_PLAYER_STATE polls this to determine when all components are ready.

Returns
True if the component is fully initialized, false if finalizeInitTick() still needs to be called.

References myComponentReady.

◆ setComponentReady()

void makVre::DtPlayerComponent::setComponentReady ( bool ready)
inline

Sets the component readiness state.

Parameters
readyTrue if the component is fully initialized.

Called by DtPlayerStation::tickUnreadyComponents() when finalizeInitTick() returns Ready. Components should not need to call this directly.

References myComponentReady.

◆ finalizeInitTick()

virtual DtInitTickStatus makVre::DtPlayerComponent::finalizeInitTick ( double dt)
virtual

Performs one frame of deferred initialization work.

Parameters
dtTime in seconds since the last tick
Returns
Ready when initialization is complete, Pending if more frames are needed, or Failed if initialization cannot succeed.

Called by LOADING_PLAYER_STATE every tick for components where componentReady() returns false. When this method returns Ready, tickUnreadyComponents() will set myComponentReady to true automatically. The state will not transition to ENGAGED_STATE until all components report ready.

Override this in components that set myComponentReady = false in their constructor. The default implementation returns Ready.

See also
componentReady
setComponentReady
DtInitTickStatus

Reimplemented in DtPilotObserverUpdater, makVre::DtHumanRenderUpdater, makVre::DtPilotRenderUpdater, and makVre::DtWindowLayoutComponent.

◆ type()

virtual const char * makVre::DtPlayerComponent::type ( ) const
pure virtual

Gets the component type identifier.

Returns
Reference to the component type string

Returns the unique type identifier for this component class. The type string is used by the component system to identify and instantiate components based on role configuration. Each component class should return a consistent, descriptive type name (e.g., "DtDriverControlLogic", "DtObserverUpdater").

Note
This is a pure virtual method that must be implemented by all derived classes.

Implemented in DtDriverQmlHudComponent, DtEntityDetectionControlLogic, DtHumanAudioUpdater, DtHumanWeaponPoseLogic, DtLightsSirensControlLogic, DtNotifyLogic, DtPilotObserverUpdater, DtPlayerStateAttributeSampleComponent, DtStreamingVideoUpdater, DtVehicleBlinkerControlLogic, DtVrObserverUpdater, makVre::DtActionMenuLogic, makVre::DtActionMenuUpdater, makVre::DtAppLauncherComponent, makVre::DtArtPartParamToStateAttrMap, makVre::DtArtPartUpdater, makVre::DtAudioListenerOverrideUpdater, makVre::DtAudioUpdater, makVre::DtBinocularsLasingOverlay, makVre::DtBinocularsOverlay, makVre::DtBinocularsSimLogic, makVre::DtBinocularsZoomOverlay, makVre::DtCigiHostControl, makVre::DtCommanderControlLogic, makVre::DtCommanderHatchControlLogic, makVre::DtCommanderHatchViewUpdater, makVre::DtCommanderObserverUpdater, makVre::DtCommentLogic, makVre::DtDeadReckonOverrider, makVre::DtDisembarkControlLogic, makVre::DtDriverControlLogic, makVre::DtDriverMenuLogic, makVre::DtDroneControlLogic, makVre::DtDroneHudUpdater, makVre::DtDroneTaskLogic, makVre::DtEchelonLogic, makVre::DtEmbeddedEntityLogic, makVre::DtEngineAudioUpdater, makVre::DtEntityControlLogic, makVre::DtEntityOverlayComponent, makVre::DtExtendedStateLogic, makVre::DtFriendlyUnitsLogic, makVre::DtGlStudioHudMapperLogic, makVre::DtGunnerControlLogic, makVre::DtGunnerObserverUpdater, makVre::DtGunnerRangeSimLogic, makVre::DtHudUpdater, makVre::DtHumanControlLogic, makVre::DtHumanHudUpdater, makVre::DtHumanMenuLogic, makVre::DtHumanObserverUpdater, makVre::DtHumanRenderUpdater, makVre::DtHumanVirtualRealityLogic, makVre::DtHumanVrHudUpdater, makVre::DtLaserTargetDesignatorSimLogic, makVre::DtLauncherControlLogic, makVre::DtLookAroundObserverUpdater, makVre::DtMetaRoleControlLogic, makVre::DtMinimapUpdater, makVre::DtMixedRealityUpdater, makVre::DtObserverUpdater, makVre::DtOverlayComponent, makVre::DtPilotMenuLogic, makVre::DtPilotRenderUpdater, makVre::DtPilotSimLogic, makVre::DtQtQuickOverlay, makVre::DtRadioLogic, makVre::DtRemoteSensorViewLogic, makVre::DtRoleSelectionControl, makVre::DtSavedViewUpdater, makVre::DtScopeSimLogic, makVre::DtScriptComponent, makVre::DtSettingsOverrideComponent, makVre::DtSlewToCueControl, makVre::DtSpectatorAudioUpdater, makVre::DtSpectatorHudUpdater, makVre::DtSpectatorObserverUpdater, makVre::DtSpectatorOverlay, makVre::DtSpectatorSimLogic, makVre::DtTowingControlLogic, makVre::DtVehicleOccupantUpdater, makVre::DtVirtualRealityLogic, makVre::DtVrvSensorOverlayUpdater, makVre::DtWeaponPoseUpdater, makVre::DtWeaponResourceLogic, makVre::DtWindowLayoutComponent, and makVre::DtZoomControl.

◆ setName()

virtual void makVre::DtPlayerComponent::setName ( const std::string & name)
virtual

Sets the component name.

Parameters
nameThe name to assign to this component

Sets a name for this component instance, which can be used to distinguish between multiple components of the same type in a player station.

References name().

◆ name()

virtual const std::string & makVre::DtPlayerComponent::name ( )
virtual

Gets the component name.

Returns
Reference to the component name string

Returns the name of this component instance, which may be empty if no name was explicitly assigned.

Referenced by makVre::DtOverlayComponent::findTextByName(), makVre::DtActionMenuLogic::hideMenu(), makVre::DtTowingControlLogic::queueTowTargetStateProperty(), setName(), makVre::DtOverlayComponent::setTextVisible(), makVre::DtActionMenuLogic::showMenu(), and makVre::DtHumanControlLogic::showQmlOverlay().

◆ player()

virtual DtPlayerStation & makVre::DtPlayerComponent::player ( )
virtual

Gets the player station.

Returns
Reference to the player station that owns this component

Provides access to the player station that this component belongs to.

Referenced by DtDriverQmlHudComponent::initialize(), DtEntityDetectionControlLogic::initialize(), DtEntityHealthBarOverlay::initialize(), DtHumanAudioUpdater::initialize(), DtHumanWeaponPoseLogic::initialize(), DtLightsSirensControlLogic::initialize(), DtPilotObserverUpdater::initialize(), DtPlayerStateAttributeSampleComponent::initialize(), DtStreamingVideoUpdater::initialize(), DtVehicleBlinkerControlLogic::initialize(), DtVrObserverUpdater::initialize(), makVre::DtActionMenuLogic::initialize(), makVre::DtActionMenuUpdater::initialize(), makVre::DtArtPartParamToStateAttrMap::initialize(), makVre::DtArtPartUpdater::initialize(), makVre::DtAudioListenerOverrideUpdater::initialize(), makVre::DtAudioUpdater::initialize(), makVre::DtBinocularsLasingOverlay::initialize(), makVre::DtBinocularsOverlay::initialize(), makVre::DtBinocularsSimLogic::initialize(), makVre::DtBinocularsZoomOverlay::initialize(), makVre::DtCigiHostControl::initialize(), makVre::DtCommanderControlLogic::initialize(), makVre::DtCommanderHatchControlLogic::initialize(), makVre::DtCommanderHatchViewUpdater::initialize(), makVre::DtCommanderObserverUpdater::initialize(), makVre::DtCommentLogic::initialize(), makVre::DtDeadReckonOverrider::initialize(), makVre::DtDisembarkControlLogic::initialize(), makVre::DtDriverControlLogic::initialize(), makVre::DtDriverMenuLogic::initialize(), makVre::DtDroneControlLogic::initialize(), makVre::DtDroneHudUpdater::initialize(), makVre::DtDroneTaskLogic::initialize(), makVre::DtEchelonLogic::initialize(), makVre::DtEmbeddedEntityLogic::initialize(), makVre::DtEngineAudioUpdater::initialize(), makVre::DtEntityControlLogic::initialize(), makVre::DtEntityOverlayComponent::initialize(), makVre::DtExtendedStateLogic::initialize(), makVre::DtFriendlyUnitsLogic::initialize(), makVre::DtGlStudioHudMapperLogic::initialize(), makVre::DtGunnerControlLogic::initialize(), makVre::DtGunnerObserverUpdater::initialize(), makVre::DtGunnerRangeSimLogic::initialize(), makVre::DtHudUpdater::initialize(), makVre::DtHumanControlLogic::initialize(), makVre::DtHumanHudUpdater::initialize(), makVre::DtHumanMenuLogic::initialize(), makVre::DtHumanObserverUpdater::initialize(), makVre::DtHumanRenderUpdater::initialize(), makVre::DtHumanVirtualRealityLogic::initialize(), makVre::DtHumanVrHudUpdater::initialize(), makVre::DtLaserTargetDesignatorSimLogic::initialize(), makVre::DtLauncherControlLogic::initialize(), makVre::DtLookAroundObserverUpdater::initialize(), makVre::DtMetaRoleControlLogic::initialize(), makVre::DtMinimapUpdater::initialize(), makVre::DtMixedRealityUpdater::initialize(), makVre::DtOverlayComponent::initialize(), makVre::DtPilotMenuLogic::initialize(), makVre::DtPilotRenderUpdater::initialize(), makVre::DtPilotSimLogic::initialize(), initialize(), makVre::DtQtQuickOverlay::initialize(), makVre::DtRadioLogic::initialize(), makVre::DtRemoteSensorViewLogic::initialize(), makVre::DtRoleSelectionControl::initialize(), makVre::DtSavedViewUpdater::initialize(), makVre::DtScopeSimLogic::initialize(), makVre::DtScriptComponent::initialize(), makVre::DtSettingsOverrideComponent::initialize(), makVre::DtSlewToCueControl::initialize(), makVre::DtSpectatorAudioUpdater::initialize(), makVre::DtSpectatorHudUpdater::initialize(), makVre::DtSpectatorObserverUpdater::initialize(), makVre::DtSpectatorOverlay::initialize(), makVre::DtSpectatorSimLogic::initialize(), makVre::DtTowingControlLogic::initialize(), makVre::DtVehicleOccupantUpdater::initialize(), makVre::DtVirtualRealityLogic::initialize(), makVre::DtVrvSensorOverlayUpdater::initialize(), makVre::DtWeaponPoseUpdater::initialize(), makVre::DtWeaponResourceLogic::initialize(), and makVre::DtZoomControl::initialize().

◆ playerAttributeStore() [1/2]

virtual DtAttributeHandle & makVre::DtPlayerComponent::playerAttributeStore ( )
virtual

Gets the player attribute store.

Returns
Reference to the attribute store

Provides access to the attribute store of the player station, which contains shared data that can be accessed by all components.

◆ playerAttributeStore() [2/2]

virtual const DtAttributeHandle & makVre::DtPlayerComponent::playerAttributeStore ( ) const
virtual

Gets the player attribute store (const version)

Returns
Const reference to the attribute store

◆ ownshipState()

virtual const DtAttributeHandle & makVre::DtPlayerComponent::ownshipState ( ) const
virtual

Gets the ownship state attribute handle.

Convenience wrapper for player().ownshipState()

◆ setExtendedData()

virtual void makVre::DtPlayerComponent::setExtendedData ( const std::string & key,
const std::string & value,
DtEntityIdentifier entity = DtEntityIdentifier::nullId() )
virtual

Sets scripted extended data on an entity.

Parameters
keyExtended-data key.
valueExtended-data value.
entityTarget entity id; defaults to ownship when null.

◆ initializeStateAttributes()

virtual void makVre::DtPlayerComponent::initializeStateAttributes ( )
protectedvirtual

Initializes component state attributes.

Creates and initializes any player state attributes required by this component. Derived component classes should override this method if they need to add custom state attributes to the player attribute store.

Reimplemented in makVre::DtActionMenuUpdater, makVre::DtCigiHostControl, makVre::DtEchelonLogic, makVre::DtFriendlyUnitsLogic, makVre::DtObserverUpdater, and makVre::DtRadioLogic.

Member Data Documentation

◆ myComponentReady

bool makVre::DtPlayerComponent::myComponentReady = true
protected

Whether this component has completed deferred initialization.

Defaults to true. Components that require asynchronous initialization (e.g., waiting for VR-Vantage agents or terrain realization) should set this to false in their constructor and override finalizeInitTick().

See also
finalizeInitTick
componentReady

Referenced by componentReady(), and setComponentReady().

◆ myName

std::string makVre::DtPlayerComponent::myName
protected

Component instance name.

◆ myConfig

DtInitTable makVre::DtPlayerComponent::myConfig
protected

Component configuration table.

◆ myPlayer

DtPlayerStation* makVre::DtPlayerComponent::myPlayer
protected

Pointer to the owning player station.

◆ myDe

makVrv::DtDe* makVre::DtPlayerComponent::myDe
protected

Pointer to the display engine (common to all components)

◆ myResolver

DtEntityResolver* makVre::DtPlayerComponent::myResolver
protected

Pointer to the entity resolver (common to all components)

◆ myAttributeCallbacks

DtAttributeCallbackManager makVre::DtPlayerComponent::myAttributeCallbacks
protected

Member-scope instance of Attribute callback manager.

Used to manage Attribute change callback connections and ensure that all callbacks are unregistered when this class instance is destroyed.

◆ myMessageHandlers

DtVreMessageHandlerGroup makVre::DtPlayerComponent::myMessageHandlers
protected

Member-scope instance of message handler group.

Used to manage message handler connections for this component. Handlers connected through this group will be automatically disconnected when this component is destroyed.


The documentation for this class was generated from the following file: