VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtEmbeddedEntityLogic Class Reference

Detailed Description

Listens to SimulationStateMessage to keep "deployable-objects" in the player attribute store up to date. Deploy/recover operations are forwarded to VRF via scripted-entity tasks. Inter-component cleanup (stop using drone, exit launcher) is driven through MenuActionMessage.

#include <embeddedEntityLogic.h>

Inheritance diagram for makVre::DtEmbeddedEntityLogic:
[legend]

Public Member Functions

 DtEmbeddedEntityLogic ()
 
virtual ~DtEmbeddedEntityLogic () override
 
virtual bool initialize (DtPlayerStation *player, DtInitTable &config) override
 
virtual void tick (double dt) override
 
virtual void shutdown () override
 
virtual const char * type () const override
 
virtual void deployEmbeddedEntity (const std::string &embeddedEntityName)
 
virtual void recoverEmbeddedEntity (const std::string &embeddedEntityName)
 
- Public Member Functions inherited from makVre::DtPlayerComponent
 DtPlayerComponent ()
 
virtual ~DtPlayerComponent ()
 
virtual bool postInitialize ()
 
bool componentReady () const
 
void setComponentReady (bool ready)
 
virtual DtInitTickStatus finalizeInitTick (double dt)
 
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 makVre::DtVreMessageResult handleSimState (makVre::DtVreMessage *msg)
 
void updateOwnshipFromSimState (SimulationStateMessage *smsg)
 
void updateEmbeddedEntityFromSimState (SimulationStateMessage *smsg)
 
- Protected Member Functions inherited from makVre::DtPlayerComponent
virtual void initializeStateAttributes ()
 

Protected Attributes

double myStatusUpdateDisplayTime
 
DtAttributeHandleType< DeployableObjectStateMap > myDeployableObjectsAttr
 
DtAttributeHandleType< bool > myHasEmbeddedEntitiesAttr
 
DtAttributeHandleType< bool > myUsingDroneAttr
 
DtAttributeHandleType< bool > myUsingLauncherAttr
 
DtAttributeHandleType< DtEntityIdentifier > myDroneEntityIdAttr
 
DtAttributeHandleType< bool > myDroneSignalLostAttr
 
DtAttributeHandleType< bool > myDroneSignalLostDismissedAttr
 
DtAttributeHandleType< std::string > myMenuDeployableNameAttr
 
DtAttributeHandleType< bool > myMenuDeployableDeployedAttr
 
DtAttributeHandleType< bool > myMenuDeployableDestroyedAttr
 
DtAttributeHandleType< bool > myMenuDeployableUsingAttr
 
DtAttributeHandleType< bool > myMenuDeployableIsDroneAttr
 
DtAttributeHandleType< bool > myMenuDeployableIsLauncherAttr
 
DtAttributeHandleType< bool > myRoleHasDeployablesAttr
 
- Protected Attributes inherited from makVre::DtPlayerComponent
bool myComponentReady = true
 
std::string myName
 
DtInitTable myConfig
 
DtPlayerStation * myPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolver * myResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 
DtVreMessageHandlerGroup myMessageHandlers
 

Constructor & Destructor Documentation

◆ DtEmbeddedEntityLogic()

makVre::DtEmbeddedEntityLogic::DtEmbeddedEntityLogic ( )

◆ ~DtEmbeddedEntityLogic()

virtual makVre::DtEmbeddedEntityLogic::~DtEmbeddedEntityLogic ( )
overridevirtual

Member Function Documentation

◆ initialize()

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

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 from makVre::DtPlayerComponent.

References makVre::DtPlayerComponent::player().

◆ tick()

virtual void makVre::DtEmbeddedEntityLogic::tick ( double dt)
overridevirtual

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.

Implements makVre::DtPlayerComponent.

◆ shutdown()

virtual void makVre::DtEmbeddedEntityLogic::shutdown ( )
overridevirtual

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 from makVre::DtPlayerComponent.

◆ type()

virtual const char * makVre::DtEmbeddedEntityLogic::type ( ) const
overridevirtual

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.

Implements makVre::DtPlayerComponent.

◆ deployEmbeddedEntity()

virtual void makVre::DtEmbeddedEntityLogic::deployEmbeddedEntity ( const std::string & embeddedEntityName)
virtual

◆ recoverEmbeddedEntity()

virtual void makVre::DtEmbeddedEntityLogic::recoverEmbeddedEntity ( const std::string & embeddedEntityName)
virtual

◆ handleSimState()

virtual makVre::DtVreMessageResult makVre::DtEmbeddedEntityLogic::handleSimState ( makVre::DtVreMessage * msg)
protectedvirtual

◆ updateOwnshipFromSimState()

void makVre::DtEmbeddedEntityLogic::updateOwnshipFromSimState ( SimulationStateMessage * smsg)
protected

◆ updateEmbeddedEntityFromSimState()

void makVre::DtEmbeddedEntityLogic::updateEmbeddedEntityFromSimState ( SimulationStateMessage * smsg)
protected

Member Data Documentation

◆ myStatusUpdateDisplayTime

double makVre::DtEmbeddedEntityLogic::myStatusUpdateDisplayTime
protected

◆ myDeployableObjectsAttr

DtAttributeHandleType<DeployableObjectStateMap> makVre::DtEmbeddedEntityLogic::myDeployableObjectsAttr
protected

◆ myHasEmbeddedEntitiesAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myHasEmbeddedEntitiesAttr
protected

◆ myUsingDroneAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myUsingDroneAttr
protected

◆ myUsingLauncherAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myUsingLauncherAttr
protected

◆ myDroneEntityIdAttr

DtAttributeHandleType<DtEntityIdentifier> makVre::DtEmbeddedEntityLogic::myDroneEntityIdAttr
protected

◆ myDroneSignalLostAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myDroneSignalLostAttr
protected

◆ myDroneSignalLostDismissedAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myDroneSignalLostDismissedAttr
protected

◆ myMenuDeployableNameAttr

DtAttributeHandleType<std::string> makVre::DtEmbeddedEntityLogic::myMenuDeployableNameAttr
protected

◆ myMenuDeployableDeployedAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myMenuDeployableDeployedAttr
protected

◆ myMenuDeployableDestroyedAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myMenuDeployableDestroyedAttr
protected

◆ myMenuDeployableUsingAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myMenuDeployableUsingAttr
protected

◆ myMenuDeployableIsDroneAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myMenuDeployableIsDroneAttr
protected

◆ myMenuDeployableIsLauncherAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myMenuDeployableIsLauncherAttr
protected

◆ myRoleHasDeployablesAttr

DtAttributeHandleType<bool> makVre::DtEmbeddedEntityLogic::myRoleHasDeployablesAttr
protected

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