VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtDeployableObjectsSimLogic Class Reference

#include <deployableObjectsSimLogic.h>

Inheritance diagram for makVre::DtDeployableObjectsSimLogic:
[legend]

Classes

struct  ChannelViewport
 
struct  DeployableObject
 

Public Types

using DeployableObjectStateMap = std::map<std::string, DeployableObject>
 

Public Member Functions

 DtDeployableObjectsSimLogic ()
 
virtual ~DtDeployableObjectsSimLogic () override
 
virtual bool initialize (DtPlayerStation *player, DtInitTable &config) override
 
virtual bool postInitialize () override
 
virtual void tick (double dt) override
 
virtual void shutdown () override
 
virtual const char * type () const override
 
virtual void fireMissile (const std::string &rangeId="")
 
virtual void toggleMissileLauncher ()
 
virtual void useLauncher (const DtEntityIdentifier &id)
 
virtual void useDrone (const DtEntityIdentifier &id=DtEntityIdentifier::nullId(), const std::string &marking="")
 
virtual void exitLauncher ()
 
virtual void stopUsingDrone ()
 
virtual void setDroneAutopilotMode (const std::string &mode)
 
virtual void toggleDroneAutopilotMode ()
 
virtual void setIndirectFireCoordinate (const std::string &coordinate)
 
virtual void clearIndirectTarget ()
 
virtual void deployEmbeddedEntity (const std::string &embeddedEntityName)
 
virtual void recoverEmbeddedEntity (const std::string &embeddedEntityName)
 
virtual void toggleRemoteViewViewport (double val)
 
virtual void setRemoteViewZoomLevel (double val)
 
virtual std::string scopeChannelName () const
 
virtual bool operatingDrone ()
 
virtual void setFocusOnEntity (bool val)
 
virtual void toggleFocusOnEntity ()
 
virtual void setForwardControls (bool val)
 
virtual void toggleForwardControls ()
 
virtual void landDrone ()
 
virtual void returnToHome ()
 
virtual void toggleDroneChannelVisibility (bool visible)
 
virtual void firstStageTrigger (double val)
 
virtual void toggleMissileAttackMode (double val)
 
virtual void sendJoystickCommand (const DtEntityIdentifier &id, const std::string &functionGroup, const std::string &function, double val, bool repeat=false)
 
virtual void onDamageStateChanged (DtDamageState val)
 
virtual DtEntityIdentifier launcherId ()
 
virtual void openRemoteSensorView (const DtEntityIdentifier &viewEntity)
 
virtual void closeRemoteSensorView ()
 
- Public Member Functions inherited from makVre::DtEntityControlLogic
 DtEntityControlLogic ()
 
virtual ~DtEntityControlLogic () override
 
virtual void setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId())
 
virtual void setMouseControlEnabled (bool enabled)
 
virtual bool isMouseControlEnabled ()
 
virtual bool isMouseControlSupportAllowed () const
 
virtual void setMouseControlSupportAllowed (bool enable)
 
virtual const std::vector< std::string > & joystickGroups () const
 
virtual makVre::DtVreMessageResult handleStateMessages (makVre::DtVreMessage *message)
 
virtual makVre::DtVreMessageResult handleReset (makVre::DtVreMessage *message)
 
virtual void reset (float val)
 
virtual void resetInPlace (float val)
 
virtual void toggleMouseControl (float val)
 
virtual void enableMouseControl (float val)
 
virtual makVre::DtVreMessageResult handleFocusMessage (makVre::DtVreMessage *message)
 
- Public Member Functions inherited from makVre::DtPlayerComponent
 DtPlayerComponent ()
 
virtual ~DtPlayerComponent ()
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStationplayer ()
 
virtual DtAttributeHandleplayerAttributeStore ()
 
virtual const DtAttributeHandleplayerAttributeStore () const
 

Protected Member Functions

virtual makVre::DtVreMessageResult handleEnterPlayerState (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleExitPlayerState (makVre::DtVreMessage *msg)
 
bool scopeExists (DtEntityIdentifier &ownshipId, std::string &channelName)
 
bool isAirborne () const
 
bool hasLauncher () const
 
bool isAimingLauncher () const
 
virtual makVre::DtVreMessageResult handleSimState (makVre::DtVreMessage *msg) override
 
virtual makVre::DtVreMessageResult handleEntityRealized (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleEntityRemoved (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleMenuActionMessage (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleResourceUpdate (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleFireInteraction (makVre::DtVreMessage *msg)
 
virtual void updateOwnshipFromSimState (SimulationStateMessage *msg)
 
virtual void updateEmbeddedEntityFromSimState (SimulationStateMessage *msg)
 
virtual void checkForDroneBatteryWarning (float amount)
 
virtual void processLauncherRemoved ()
 
virtual void processMissileRemoved ()
 
virtual void processMissileRealized (const DtEntityIdentifier &munitionId)
 
virtual void updateLauncherFocus (double dt)
 
virtual void enableLauncher (LauncherType launcherType=SHOULDER_MOUNTED)
 
virtual void disableLauncher ()
 
virtual void updateSensor ()
 
virtual void nextSensor (double val)
 
void onForwardControlsChanged (bool)
 
virtual void setDroneDestroyed ()
 
virtual DtEntityIdentifier missileId ()
 
virtual void onSceneClicked (makVrv::DtUniqueID, const DtVector &location, double altAboveGround)
 
- Protected Member Functions inherited from makVre::DtEntityControlLogic
virtual void takeControlOfPlayerEntity ()
 
virtual void releaseControlOfPlayerEntity ()
 
- Protected Member Functions inherited from makVre::DtPlayerComponent
virtual void initializeStateAttributes ()
 

Protected Attributes

DtEntityIdentifier myRemoteViewEntityId
 
std::string myRemoteViewChannelName
 
std::string myRemoteViewSensorMode
 
std::vector< ChannelViewportmyViewportConfigurations
 
bool myRemoteViewAttachToMunition
 
double myRemoteViewResetTime
 
double myRemoteViewZoomLevel
 
bool myThirdPersonOnUseDrone
 
ObserverAttachMode myCachedAttachMode
 
std::string myTargetName
 
std::string myMissileName
 
DtVector myPreviousRemoteViewTarget
 
DtEntityIdentifier myMissileId
 
DtEntityIdentifier myMissileToAttachTo
 
float myMaxPGain
 
float myMaxIGain
 
float myMaxDGain
 
float myMaxFGain
 
float myPGain
 
float myIGain
 
float myDGain
 
float myFGain
 
bool myShowPidMenu
 
std::map< int, bool > myDroneBatteryWarnings
 
double myDroneStatusUpdateDisplayTime
 
std::map< makVrv::DtElementID, double > myPotentialTargetsWeightMap
 
double myTargetHoldWeight
 
double myTargetLockWeight
 
double myTargetWeightFadeRate
 
DtDeployableObjectsInputLogicmyInputLogic
 
DtCreateNewEntityEventProcessormyEventProcessor
 
SensorViews myLastSensorViewMode
 
std::map< enum SensorViews, std::string > mySensorModes
 
bool myLookAtDroneOnUse
 
- Protected Attributes inherited from makVre::DtEntityControlLogic
std::vector< std::string > myJoystickFunctionGroups
 
DtInputLogic myCommonInputLogic
 
std::string myInputConfigFile
 
bool myMouseControlEnabled
 
bool myMouseControlSupportAllowed
 
- Protected Attributes inherited from makVre::DtPlayerComponent
std::string myName
 
DtInitTable myConfig
 
DtPlayerStationmyPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolvermyResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 

Member Typedef Documentation

◆ DeployableObjectStateMap

Constructor & Destructor Documentation

◆ DtDeployableObjectsSimLogic()

makVre::DtDeployableObjectsSimLogic::DtDeployableObjectsSimLogic ( )

◆ ~DtDeployableObjectsSimLogic()

virtual makVre::DtDeployableObjectsSimLogic::~DtDeployableObjectsSimLogic ( )
overridevirtual

Member Function Documentation

◆ initialize()

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

Initializes the entity control logic.

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

Initializes the entity control component with the specified player station and configuration. Registers message handlers and sets up input mappings.

Reimplemented from makVre::DtEntityControlLogic.

References makVre::DtPlayerComponent::player().

◆ postInitialize()

virtual bool makVre::DtDeployableObjectsSimLogic::postInitialize ( )
overridevirtual

Performs post-initialization setup.

Returns
True if post-initialization was successful, false otherwise

Completes initialization tasks that require other components to be already initialized. This typically includes setting up connections to other components and starting entity control.

Reimplemented from makVre::DtEntityControlLogic.

◆ tick()

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

Updates the entity control logic each frame.

Parameters
dtTime in seconds since the last update

Handles per-frame updates for entity control, including processing input and updating entity states. This is called once per frame.

Reimplemented from makVre::DtEntityControlLogic.

◆ shutdown()

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

Shuts down the entity control logic.

Cleans up resources, disconnects from input handlers, and releases control of entities. Called when the player station is shutting down.

Reimplemented from makVre::DtEntityControlLogic.

◆ type()

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

Returns the component type identifier.

Returns
The component type string

Reimplemented from makVre::DtEntityControlLogic.

◆ fireMissile()

virtual void makVre::DtDeployableObjectsSimLogic::fireMissile ( const std::string & rangeId = "")
virtual

◆ toggleMissileLauncher()

virtual void makVre::DtDeployableObjectsSimLogic::toggleMissileLauncher ( )
virtual

◆ useLauncher()

virtual void makVre::DtDeployableObjectsSimLogic::useLauncher ( const DtEntityIdentifier & id)
virtual

◆ useDrone()

virtual void makVre::DtDeployableObjectsSimLogic::useDrone ( const DtEntityIdentifier & id = DtEntityIdentifier::nullId(),
const std::string & marking = "" )
virtual

◆ exitLauncher()

virtual void makVre::DtDeployableObjectsSimLogic::exitLauncher ( )
virtual

◆ stopUsingDrone()

virtual void makVre::DtDeployableObjectsSimLogic::stopUsingDrone ( )
virtual

◆ setDroneAutopilotMode()

virtual void makVre::DtDeployableObjectsSimLogic::setDroneAutopilotMode ( const std::string & mode)
virtual

◆ toggleDroneAutopilotMode()

virtual void makVre::DtDeployableObjectsSimLogic::toggleDroneAutopilotMode ( )
virtual

◆ setIndirectFireCoordinate()

virtual void makVre::DtDeployableObjectsSimLogic::setIndirectFireCoordinate ( const std::string & coordinate)
virtual

◆ clearIndirectTarget()

virtual void makVre::DtDeployableObjectsSimLogic::clearIndirectTarget ( )
virtual

◆ deployEmbeddedEntity()

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

◆ recoverEmbeddedEntity()

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

◆ toggleRemoteViewViewport()

virtual void makVre::DtDeployableObjectsSimLogic::toggleRemoteViewViewport ( double val)
virtual

◆ setRemoteViewZoomLevel()

virtual void makVre::DtDeployableObjectsSimLogic::setRemoteViewZoomLevel ( double val)
virtual

◆ scopeChannelName()

virtual std::string makVre::DtDeployableObjectsSimLogic::scopeChannelName ( ) const
virtual

◆ operatingDrone()

virtual bool makVre::DtDeployableObjectsSimLogic::operatingDrone ( )
virtual

◆ setFocusOnEntity()

virtual void makVre::DtDeployableObjectsSimLogic::setFocusOnEntity ( bool val)
virtual

◆ toggleFocusOnEntity()

virtual void makVre::DtDeployableObjectsSimLogic::toggleFocusOnEntity ( )
virtual

◆ setForwardControls()

virtual void makVre::DtDeployableObjectsSimLogic::setForwardControls ( bool val)
virtual

◆ toggleForwardControls()

virtual void makVre::DtDeployableObjectsSimLogic::toggleForwardControls ( )
virtual

◆ landDrone()

virtual void makVre::DtDeployableObjectsSimLogic::landDrone ( )
virtual

◆ returnToHome()

virtual void makVre::DtDeployableObjectsSimLogic::returnToHome ( )
virtual

◆ toggleDroneChannelVisibility()

virtual void makVre::DtDeployableObjectsSimLogic::toggleDroneChannelVisibility ( bool visible)
virtual

◆ firstStageTrigger()

virtual void makVre::DtDeployableObjectsSimLogic::firstStageTrigger ( double val)
virtual

◆ toggleMissileAttackMode()

virtual void makVre::DtDeployableObjectsSimLogic::toggleMissileAttackMode ( double val)
virtual

◆ sendJoystickCommand()

virtual void makVre::DtDeployableObjectsSimLogic::sendJoystickCommand ( const DtEntityIdentifier & id,
const std::string & functionGroup,
const std::string & function,
double val,
bool repeat = false )
virtual

◆ onDamageStateChanged()

virtual void makVre::DtDeployableObjectsSimLogic::onDamageStateChanged ( DtDamageState val)
virtual

◆ launcherId()

virtual DtEntityIdentifier makVre::DtDeployableObjectsSimLogic::launcherId ( )
virtual

◆ openRemoteSensorView()

virtual void makVre::DtDeployableObjectsSimLogic::openRemoteSensorView ( const DtEntityIdentifier & viewEntity)
virtual

◆ closeRemoteSensorView()

virtual void makVre::DtDeployableObjectsSimLogic::closeRemoteSensorView ( )
virtual

◆ handleEnterPlayerState()

virtual makVre::DtVreMessageResult makVre::DtDeployableObjectsSimLogic::handleEnterPlayerState ( makVre::DtVreMessage * msg)
protectedvirtual

◆ handleExitPlayerState()

virtual makVre::DtVreMessageResult makVre::DtDeployableObjectsSimLogic::handleExitPlayerState ( makVre::DtVreMessage * msg)
protectedvirtual

◆ scopeExists()

bool makVre::DtDeployableObjectsSimLogic::scopeExists ( DtEntityIdentifier & ownshipId,
std::string & channelName )
protected

◆ isAirborne()

bool makVre::DtDeployableObjectsSimLogic::isAirborne ( ) const
protected

◆ hasLauncher()

bool makVre::DtDeployableObjectsSimLogic::hasLauncher ( ) const
protected

◆ isAimingLauncher()

bool makVre::DtDeployableObjectsSimLogic::isAimingLauncher ( ) const
protected

◆ handleSimState()

virtual makVre::DtVreMessageResult makVre::DtDeployableObjectsSimLogic::handleSimState ( makVre::DtVreMessage * msg)
overrideprotectedvirtual

Message handlers.

Handles simulation state update messages

Parameters
msgPointer to the simulation state message
Returns
Message handling result

Processes simulation state messages, updating the component's understanding of the current entity state in the simulation.

Reimplemented from makVre::DtEntityControlLogic.

◆ handleEntityRealized()

virtual makVre::DtVreMessageResult makVre::DtDeployableObjectsSimLogic::handleEntityRealized ( makVre::DtVreMessage * msg)
protectedvirtual

◆ handleEntityRemoved()

virtual makVre::DtVreMessageResult makVre::DtDeployableObjectsSimLogic::handleEntityRemoved ( makVre::DtVreMessage * msg)
protectedvirtual

◆ handleMenuActionMessage()

virtual makVre::DtVreMessageResult makVre::DtDeployableObjectsSimLogic::handleMenuActionMessage ( makVre::DtVreMessage * msg)
protectedvirtual

◆ handleResourceUpdate()

virtual makVre::DtVreMessageResult makVre::DtDeployableObjectsSimLogic::handleResourceUpdate ( makVre::DtVreMessage * msg)
protectedvirtual

◆ handleFireInteraction()

virtual makVre::DtVreMessageResult makVre::DtDeployableObjectsSimLogic::handleFireInteraction ( makVre::DtVreMessage * msg)
protectedvirtual

◆ updateOwnshipFromSimState()

virtual void makVre::DtDeployableObjectsSimLogic::updateOwnshipFromSimState ( SimulationStateMessage * msg)
protectedvirtual

◆ updateEmbeddedEntityFromSimState()

virtual void makVre::DtDeployableObjectsSimLogic::updateEmbeddedEntityFromSimState ( SimulationStateMessage * msg)
protectedvirtual

◆ checkForDroneBatteryWarning()

virtual void makVre::DtDeployableObjectsSimLogic::checkForDroneBatteryWarning ( float amount)
protectedvirtual

◆ processLauncherRemoved()

virtual void makVre::DtDeployableObjectsSimLogic::processLauncherRemoved ( )
protectedvirtual

◆ processMissileRemoved()

virtual void makVre::DtDeployableObjectsSimLogic::processMissileRemoved ( )
protectedvirtual

◆ processMissileRealized()

virtual void makVre::DtDeployableObjectsSimLogic::processMissileRealized ( const DtEntityIdentifier & munitionId)
protectedvirtual

◆ updateLauncherFocus()

virtual void makVre::DtDeployableObjectsSimLogic::updateLauncherFocus ( double dt)
protectedvirtual

◆ enableLauncher()

virtual void makVre::DtDeployableObjectsSimLogic::enableLauncher ( LauncherType launcherType = SHOULDER_MOUNTED)
protectedvirtual

◆ disableLauncher()

virtual void makVre::DtDeployableObjectsSimLogic::disableLauncher ( )
protectedvirtual

◆ updateSensor()

virtual void makVre::DtDeployableObjectsSimLogic::updateSensor ( )
protectedvirtual

◆ nextSensor()

virtual void makVre::DtDeployableObjectsSimLogic::nextSensor ( double val)
protectedvirtual

◆ onForwardControlsChanged()

void makVre::DtDeployableObjectsSimLogic::onForwardControlsChanged ( bool )
protected

◆ setDroneDestroyed()

virtual void makVre::DtDeployableObjectsSimLogic::setDroneDestroyed ( )
protectedvirtual

◆ missileId()

virtual DtEntityIdentifier makVre::DtDeployableObjectsSimLogic::missileId ( )
protectedvirtual

◆ onSceneClicked()

virtual void makVre::DtDeployableObjectsSimLogic::onSceneClicked ( makVrv::DtUniqueID ,
const DtVector & location,
double altAboveGround )
protectedvirtual

Member Data Documentation

◆ myRemoteViewEntityId

DtEntityIdentifier makVre::DtDeployableObjectsSimLogic::myRemoteViewEntityId
protected

◆ myRemoteViewChannelName

std::string makVre::DtDeployableObjectsSimLogic::myRemoteViewChannelName
protected

◆ myRemoteViewSensorMode

std::string makVre::DtDeployableObjectsSimLogic::myRemoteViewSensorMode
protected

◆ myViewportConfigurations

std::vector<ChannelViewport> makVre::DtDeployableObjectsSimLogic::myViewportConfigurations
protected

◆ myRemoteViewAttachToMunition

bool makVre::DtDeployableObjectsSimLogic::myRemoteViewAttachToMunition
protected

◆ myRemoteViewResetTime

double makVre::DtDeployableObjectsSimLogic::myRemoteViewResetTime
protected

◆ myRemoteViewZoomLevel

double makVre::DtDeployableObjectsSimLogic::myRemoteViewZoomLevel
protected

◆ myThirdPersonOnUseDrone

bool makVre::DtDeployableObjectsSimLogic::myThirdPersonOnUseDrone
protected

◆ myCachedAttachMode

ObserverAttachMode makVre::DtDeployableObjectsSimLogic::myCachedAttachMode
protected

◆ myTargetName

std::string makVre::DtDeployableObjectsSimLogic::myTargetName
protected

◆ myMissileName

std::string makVre::DtDeployableObjectsSimLogic::myMissileName
protected

◆ myPreviousRemoteViewTarget

DtVector makVre::DtDeployableObjectsSimLogic::myPreviousRemoteViewTarget
protected

◆ myMissileId

DtEntityIdentifier makVre::DtDeployableObjectsSimLogic::myMissileId
protected

◆ myMissileToAttachTo

DtEntityIdentifier makVre::DtDeployableObjectsSimLogic::myMissileToAttachTo
protected

◆ myMaxPGain

float makVre::DtDeployableObjectsSimLogic::myMaxPGain
protected

◆ myMaxIGain

float makVre::DtDeployableObjectsSimLogic::myMaxIGain
protected

◆ myMaxDGain

float makVre::DtDeployableObjectsSimLogic::myMaxDGain
protected

◆ myMaxFGain

float makVre::DtDeployableObjectsSimLogic::myMaxFGain
protected

◆ myPGain

float makVre::DtDeployableObjectsSimLogic::myPGain
protected

◆ myIGain

float makVre::DtDeployableObjectsSimLogic::myIGain
protected

◆ myDGain

float makVre::DtDeployableObjectsSimLogic::myDGain
protected

◆ myFGain

float makVre::DtDeployableObjectsSimLogic::myFGain
protected

◆ myShowPidMenu

bool makVre::DtDeployableObjectsSimLogic::myShowPidMenu
protected

◆ myDroneBatteryWarnings

std::map<int, bool> makVre::DtDeployableObjectsSimLogic::myDroneBatteryWarnings
protected

◆ myDroneStatusUpdateDisplayTime

double makVre::DtDeployableObjectsSimLogic::myDroneStatusUpdateDisplayTime
protected

◆ myPotentialTargetsWeightMap

std::map<makVrv::DtElementID, double> makVre::DtDeployableObjectsSimLogic::myPotentialTargetsWeightMap
protected

◆ myTargetHoldWeight

double makVre::DtDeployableObjectsSimLogic::myTargetHoldWeight
protected

◆ myTargetLockWeight

double makVre::DtDeployableObjectsSimLogic::myTargetLockWeight
protected

◆ myTargetWeightFadeRate

double makVre::DtDeployableObjectsSimLogic::myTargetWeightFadeRate
protected

◆ myInputLogic

DtDeployableObjectsInputLogic* makVre::DtDeployableObjectsSimLogic::myInputLogic
protected

◆ myEventProcessor

DtCreateNewEntityEventProcessor* makVre::DtDeployableObjectsSimLogic::myEventProcessor
protected

◆ myLastSensorViewMode

SensorViews makVre::DtDeployableObjectsSimLogic::myLastSensorViewMode
protected

◆ mySensorModes

std::map<enum SensorViews, std::string> makVre::DtDeployableObjectsSimLogic::mySensorModes
protected

◆ myLookAtDroneOnUse

bool makVre::DtDeployableObjectsSimLogic::myLookAtDroneOnUse
protected

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