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

Detailed Description

DtHumanControlLogic manages user inputs and control actions for the human entity, including movement, posture changes, weapon handling, and special actions like using equipment or interacting with the environment. It translates input commands into entity state changes and simulation actions.

#include <humanControlLogic.h>

Inheritance diagram for makVre::DtHumanControlLogic:
[legend]

Classes

struct  PostureRestrictions
 

Public Types

using DtPostureTransition
 
using DtCompassUnits
 

Public Member Functions

 DtHumanControlLogic ()
 
virtual ~DtHumanControlLogic () 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 aim (double val)
 
void setMoveLockTime (double seconds)
 
void addMoveLockTime (double seconds)
 
virtual void move (double val)
 
virtual void strafe (double val)
 
virtual void pitch (double val, bool mouseInput=false)
 
virtual void yaw (double val, bool mouseInput=false)
 
virtual void setPitch (double pitch)
 
virtual void setYaw (double yaw)
 
virtual void simulateYaw (double dt)
 
virtual void simulatePitch (double dt)
 
virtual void setCurrentPitch (double pitch)
 
virtual void setCurrentHeading (double yaw)
 
virtual void gazePitch ()
 
virtual void gazeYaw ()
 
virtual HumanPosture desiredPosture () const
 
virtual void setPosture (double val, HumanPosture posture, DtPostureTransition postureTransition)
 
virtual void postureSelect (double val)
 
virtual void postureUp (double val)
 
virtual void postureDown (double val)
 
virtual void standUp (double val)
 
virtual void goProne (double val)
 
virtual void kneel (double val)
 
virtual void toggleBinoculars (double val)
 
virtual void reload (double val)
 
virtual void fire (double val)
 
virtual void freeLook (double val)
 
virtual void toggleObserverAttachMode (double val)
 
virtual void setObserverAttachMode (ObserverAttachMode mode)
 
virtual void sprint (double val)
 
virtual void walk (double val)
 
virtual void toggleFlashlight (double val)
 
virtual void flashlightPitchUp (double val)
 
virtual void flashlightPitchDown (double val)
 
virtual void flashlightYawLeft (double val)
 
virtual void flashlightYawRight (double val)
 
virtual void firstStageTrigger (double val)
 
virtual void toggleCompass (double val)
 
virtual void toggleCompassUnits (double val)
 
virtual void setCompassUnits (enum DtCompassUnits units)
 
virtual void toggleNorthReference (double val)
 
virtual void toggleNVG (double val)
 
virtual void zoomInToggleBinoculars (double val)
 
virtual void zoomOutToggleBinoculars (double val)
 
virtual void toggleWeaponStowed (double val)
 
virtual void toggleWeaponDown (double val)
 
virtual void toggleHUD (double val)
 
virtual void weaponDown ()
 
virtual void weaponStow (bool stow)
 
virtual void weaponUp ()
 
virtual void cycleWeaponState (double val)
 
virtual void toggleMissileAttackMode (double val)
 
virtual void weaponCycleOrDown (bool press)
 
virtual void nextWeapon (double val)
 
virtual void selectWeapon (int index)
 
virtual void manipulateTerrainElement (TerrainElement element, TerrainAction action)
 
virtual void parachuteLeftToggle (double val)
 
virtual void parachuteRightToggle (double val)
 
virtual void parachuteDeploy (double val)
 
virtual void setLaserCode (int val)
 
virtual void playDiguyAction (const std::string &diguyAction, double duration=0)
 
virtual void playDiguyGesture (const std::string diguyGesture)
 
virtual void sendJoystickCommand (const DtEntityIdentifier &id, const std::string &functionGroup, const std::string &function, double val, bool repeat=false)
 
virtual void sendJoystickCommand (const std::string &functionGroup, const std::string &function, double val, bool repeat=false)
 
virtual void reset (float value) override
 
virtual void resetInPlace (float value) override
 
virtual void updateDiGuyHandItem ()
 
void zoomInScope (double val)
 
void zoomOutScope (double val)
 
virtual HumanPosture postureFromString (const std::string &posture) const
 
virtual std::string stringForPosture (const HumanPosture posture) const
 
- 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 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 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

bool isDead ()
 
bool playerCanControl ()
 
bool isAirborne ()
 
bool isAimingLauncher () const
 
virtual void setMouseControlEnabled (bool enabled) override
 
virtual makVre::DtVreMessageResult handleSimState (makVre::DtVreMessage *msg) override
 
virtual makVre::DtVreMessageResult handleViewModeMessage (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleAppFocusUpdate (makVre::DtVreMessage *msg)
 
virtual makVre::DtVreMessageResult handleSessionPlayState (makVre::DtVreMessage *msg)
 
virtual void onCurrentStateChanged (std::string state)
 
virtual void onLauncherIdChanged (makVrv::DtElementID launcherId)
 
virtual HumanPosture getPostureFromAppearance (const DtEntityType &entityType, unsigned int appearanceBits)
 
virtual Equipment getCurrentEquipment ()
 
virtual double getHealthFromAppearance ()
 
virtual void initPostureStringMaps ()
 
virtual void mapPostureToString (const HumanPosture posture, const std::string &postureString)
 
virtual void fireGun ()
 
virtual void fireLauncher ()
 
virtual void throwGrenade ()
 
virtual void setupExternalLauncher ()
 
virtual void teardownExternalLauncher ()
 
virtual void startLasing ()
 
virtual void updateLasingState ()
 
virtual void stopLasing ()
 
virtual void disableFeaturesWhileParachuting ()
 
virtual void updateWeaponReady ()
 
virtual void computeAimingError ()
 
virtual void addRandomAimingError (DtTaitBryan &aimingOrientation)
 
virtual bool shouldAllowMovement ()
 
DtVector32 walkingVelocity ()
 
void updateMoveLock ()
 
bool isMoving ()
 
void initWeaponIndex ()
 
void setWeaponStowed (bool stowed)
 
void setWeaponDown (bool down)
 
void setWeaponState (int state)
 
double getCurrentAmmo ()
 
void setGazePitch (double pitch)
 
void setGazeYaw (double yaw)
 
virtual bool thirdPersonAllowed ()
 
void onWeaponListChanged (const DtAttributeHandle &weaponList)
 
void onAmmoCountChanged (const DtAttributeHandle &weaponResourceHandle)
 
void onSprintingChanged (bool sprinting)
 
void onMovingBackwardChanged (bool movingBackward)
 
void onWalkingChanged (bool walking)
 
void onAimingChanged (bool aiming)
 
void onWeaponIndexChanged (int weaponIndex)
 
void onPostureChanged (HumanPosture posture)
 
void onCanMoveChanged (bool canMove)
 
void onHealthChanged (double health)
 
void onEquipmentChanged (Equipment equipment)
 
void onBinocularsChanged (bool usingBinoculars)
 
void onForwardControlsChanged (bool forwardControls)
 
void onWeaponStateChanged (int weaponState)
 
void onDiGuyActionChanged (std::string action)
 
void showQmlOverlay (const std::string &name)
 
bool shouldEnableGaze (bool pitch) const
 
bool handleGazeInput (bool pitch)
 
virtual void firepowerHealthChangeCallback (int newFirepowerHealthValue)
 
virtual void fatigueChangeCallback (float newFatigueValue)
 
virtual void percentOfMaxSpeedChangeCallback (float newPercentOfMaxSpeedValue)
 
- 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

DtAttributeHandle myCurrentResourceHandle
 
DtAttributeChangeCallback myCurrentAmmoResourceAttributeCallback
 
DtWeaponResourceLogicmyWeaponResourceLogic
 
DtAttributeHandleType< std::vector< std::string > > myWeaponList
 
makVrv::DtObserver * myObserver
 
DtHumanInputLogicmyHumanInputLogic
 
bool myInvertPitch
 
double mySprintMultiplier
 
double mySprintBackwardMultiplier
 
double myRunMultiplier
 
double myWalkMultiplier
 
double myAimMultiplier
 
double myLastMoveValue
 
double myLastStrafeValue
 
std::map< HumanPosture, std::string > myPostureToString
 
std::map< std::string, HumanPosturemyStringToPosture
 
std::vector< HumanPosturemyPostureSequence
 
std::map< HumanPosture, int > myPostureSequenceIndex
 
std::map< HumanPosture, PostureRestrictionsmyPostureRestrictions
 
std::map< HumanPosture, std::pair< double, double > > myPostureAnimationWaitTimes
 
DtPostureTransition myLastPostureTransition
 
HumanPosture myExpectedPosture
 
HumanPosture myDesiredPosture
 
HumanPosture myLastPosture
 
double myPostureCommandTimeout
 
double myPostureAnimationWait
 
double myMoveLockTimer = 0.0
 
bool myMoveLockActive
 
int myEventualWeaponState
 
bool myWantThrowGrenade
 
double myDelayedToggleWeaponDownTimer
 
double myJoystickSensitivity
 
float myFatigue
 
int myFirepowerHealth
 
float myPercentOfMaxSpeed
 
double myMaxAimingError
 
double myAimingErrorPercent
 
double myRequiredAimingErrorPercent
 
double myProneAimingImprovementPercent
 
double myAimingImprovementPercent
 
double myCurrentHeading
 
double myCurrentPitch
 
double myYawRate
 
double myPitchingRate
 
double myTurningRate
 
double myYaw
 
double myPitch
 
bool myInitializedHeading
 
bool myForceOrientationUpdate
 
bool mySendGazeAngles
 
bool myTwoStageFire
 
DtVector myLasingLocation
 
double myUsingBinocularsInputMultiplier
 
ObserverAttachMode myCachedObserverAttachMode
 
bool myCachedShowCompass
 
DtQtQuickOverlaymyActiveScopeOverlay
 
- 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
 

Friends

class DtHumanVirtualRealityLogic
 

Member Typedef Documentation

◆ DtPostureTransition

Initial value:
POSTURE_UP,
POSTURE_DOWN
}
enum DtPostureTransition { POSTURE_UP, POSTURE_DOWN } DtPostureTransition
Enumeration of posture transition directions.
Definition humanControlLogic.h:144

Enumeration of posture transition directions.

◆ DtCompassUnits

Initial value:
DEGREES = 0,
NATO_MIL
}
enum DtCompassUnits { DEGREES=0, NATO_MIL } DtCompassUnits
Enumeration of compass unit types.
Definition humanControlLogic.h:150

Enumeration of compass unit types.

Constructor & Destructor Documentation

◆ DtHumanControlLogic()

makVre::DtHumanControlLogic::DtHumanControlLogic ( )

Default constructor.

◆ ~DtHumanControlLogic()

virtual makVre::DtHumanControlLogic::~DtHumanControlLogic ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ initialize()

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

Initializes the human control logic.

Parameters
playerPointer to the player station
configConfiguration settings for initialization
Returns
True if initialization was successful, false otherwise

Reimplemented from makVre::DtEntityControlLogic.

References makVre::DtPlayerComponent::player().

◆ postInitialize()

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

Performs post-initialization setup.

Returns
True if post-initialization was successful, false otherwise

Reimplemented from makVre::DtEntityControlLogic.

◆ tick()

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

Updates control logic for the current frame.

Parameters
dtDelta time since the last frame in seconds

Reimplemented from makVre::DtEntityControlLogic.

◆ shutdown()

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

Cleans up resources when the component is being shut down.

Reimplemented from makVre::DtEntityControlLogic.

◆ type()

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

Returns the component type identifier.

Returns
The component type string

Reimplemented from makVre::DtEntityControlLogic.

◆ aim()

virtual void makVre::DtHumanControlLogic::aim ( double val)
virtual

Handles aim input.

Parameters
valInput value in the range [-1.0, 1.0]

◆ setMoveLockTime()

void makVre::DtHumanControlLogic::setMoveLockTime ( double seconds)

Set a temporary movement lockout.

Set time in seconds during which player cannot move; set 0 to clear.

◆ addMoveLockTime()

void makVre::DtHumanControlLogic::addMoveLockTime ( double seconds)

Add time to a temporary movement lockout.

Add time in seconds during which player cannot move

◆ move()

virtual void makVre::DtHumanControlLogic::move ( double val)
virtual

Handles forward/backward movement input.

Parameters
valInput value in the range [-1.0, 1.0], where positive is forward

◆ strafe()

virtual void makVre::DtHumanControlLogic::strafe ( double val)
virtual

Handles left/right movement input.

Parameters
valInput value in the range [-1.0, 1.0], where positive is right

◆ pitch()

virtual void makVre::DtHumanControlLogic::pitch ( double val,
bool mouseInput = false )
virtual

Handles pitch (up/down looking) input.

Parameters
valInput value in the range [-1.0, 1.0], where positive is down
mouseInputFlag indicating if input is from mouse

Handles pitch input, applies value scaling, and sends pitch joystick command when not gazing.

Referenced by handleGazeInput(), setCurrentPitch(), setGazePitch(), setPitch(), and shouldEnableGaze().

◆ yaw()

virtual void makVre::DtHumanControlLogic::yaw ( double val,
bool mouseInput = false )
virtual

Handles yaw (left/right looking) input.

Parameters
valInput value in the range [-1.0, 1.0], where positive is right
mouseInputFlag indicating if input is from mouse

Handles yaw input, applies value scaling, and sends yaw joystick command when not gazing.

Referenced by setCurrentHeading(), setGazeYaw(), and setYaw().

◆ setPitch()

virtual void makVre::DtHumanControlLogic::setPitch ( double pitch)
virtual

Sets the pitch angle directly.

Parameters
pitchPitch angle in degrees

References pitch().

◆ setYaw()

virtual void makVre::DtHumanControlLogic::setYaw ( double yaw)
virtual

Sets the yaw angle directly.

Parameters
yawYaw angle in degrees

References yaw().

◆ simulateYaw()

virtual void makVre::DtHumanControlLogic::simulateYaw ( double dt)
virtual

Simulates yaw movement over time.

Parameters
dtDelta time since the last frame in seconds

◆ simulatePitch()

virtual void makVre::DtHumanControlLogic::simulatePitch ( double dt)
virtual

Simulates pitch movement over time.

Parameters
dtDelta time since the last frame in seconds

◆ setCurrentPitch()

virtual void makVre::DtHumanControlLogic::setCurrentPitch ( double pitch)
virtual

Sets the current pitch angle for VR input.

Parameters
pitchPitch angle in degrees
Note
VRE-3178 remove once we support proper VR input

References pitch().

◆ setCurrentHeading()

virtual void makVre::DtHumanControlLogic::setCurrentHeading ( double yaw)
virtual

Sets the current heading angle for VR input.

Parameters
yawYaw angle in degrees
Note
VRE-3178 remove once we support proper VR input

References yaw().

◆ gazePitch()

virtual void makVre::DtHumanControlLogic::gazePitch ( )
virtual

Turns the entity's head to look up/down.

Updates the gazePitch attribute according to the processed pitch input (myPitch).

◆ gazeYaw()

virtual void makVre::DtHumanControlLogic::gazeYaw ( )
virtual

Turns the entity's head to look left/right.

Updates the gazeYaw attribute according to the processed yaw input (myYaw).

◆ desiredPosture()

virtual HumanPosture makVre::DtHumanControlLogic::desiredPosture ( ) const
virtual

Gets the desired posture for the human entity.

Returns
The current desired posture

◆ setPosture()

virtual void makVre::DtHumanControlLogic::setPosture ( double val,
HumanPosture posture,
DtPostureTransition postureTransition )
virtual

Sets the entity posture.

Parameters
valInput value, typically 1.0 for activation
postureTarget posture to transition to
postureTransitionDirection of posture transition

◆ postureSelect()

virtual void makVre::DtHumanControlLogic::postureSelect ( double val)
virtual

Selects a posture based on the current state.

Parameters
valInput value, typically 1.0 for activation

◆ postureUp()

virtual void makVre::DtHumanControlLogic::postureUp ( double val)
virtual

Transitions to a more upright posture.

Parameters
valInput value, typically 1.0 for activation

◆ postureDown()

virtual void makVre::DtHumanControlLogic::postureDown ( double val)
virtual

Transitions to a more prone posture.

Parameters
valInput value, typically 1.0 for activation

◆ standUp()

virtual void makVre::DtHumanControlLogic::standUp ( double val)
virtual

Transitions to standing posture.

Parameters
valInput value, typically 1.0 for activation

◆ goProne()

virtual void makVre::DtHumanControlLogic::goProne ( double val)
virtual

Transitions to prone posture.

Parameters
valInput value, typically 1.0 for activation

◆ kneel()

virtual void makVre::DtHumanControlLogic::kneel ( double val)
virtual

Transitions to kneeling posture.

Parameters
valInput value, typically 1.0 for activation

◆ toggleBinoculars()

virtual void makVre::DtHumanControlLogic::toggleBinoculars ( double val)
virtual

Toggles binoculars equipment.

Parameters
valInput value, typically 1.0 for activation

◆ reload()

virtual void makVre::DtHumanControlLogic::reload ( double val)
virtual

Initiates weapon reload.

Parameters
valInput value, typically 1.0 for activation

◆ fire()

virtual void makVre::DtHumanControlLogic::fire ( double val)
virtual

Fires the current weapon.

Parameters
valInput value, typically 1.0 for activation

◆ freeLook()

virtual void makVre::DtHumanControlLogic::freeLook ( double val)
virtual

Toggles free look mode.

Parameters
valInput value, typically 1.0 for activation

◆ toggleObserverAttachMode()

virtual void makVre::DtHumanControlLogic::toggleObserverAttachMode ( double val)
virtual

Toggles the observer attachment mode.

Parameters
valInput value, typically 1.0 for activation

◆ setObserverAttachMode()

virtual void makVre::DtHumanControlLogic::setObserverAttachMode ( ObserverAttachMode mode)
virtual

Sets the observer attachment mode directly.

Parameters
modeThe observer attachment mode to set

◆ sprint()

virtual void makVre::DtHumanControlLogic::sprint ( double val)
virtual

Activates sprint movement.

Parameters
valInput value, typically 1.0 for activation

◆ walk()

virtual void makVre::DtHumanControlLogic::walk ( double val)
virtual

Activates walk movement.

Parameters
valInput value, typically 1.0 for activation

◆ toggleFlashlight()

virtual void makVre::DtHumanControlLogic::toggleFlashlight ( double val)
virtual

Toggles flashlight on/off.

Parameters
valInput value, typically 1.0 for activation

◆ flashlightPitchUp()

virtual void makVre::DtHumanControlLogic::flashlightPitchUp ( double val)
virtual

Adjusts flashlight pitch upward.

Parameters
valInput value, typically 1.0 for activation

◆ flashlightPitchDown()

virtual void makVre::DtHumanControlLogic::flashlightPitchDown ( double val)
virtual

Adjusts flashlight pitch downward.

Parameters
valInput value, typically 1.0 for activation

◆ flashlightYawLeft()

virtual void makVre::DtHumanControlLogic::flashlightYawLeft ( double val)
virtual

Adjusts flashlight yaw leftward.

Parameters
valInput value, typically 1.0 for activation

◆ flashlightYawRight()

virtual void makVre::DtHumanControlLogic::flashlightYawRight ( double val)
virtual

Adjusts flashlight yaw rightward.

Parameters
valInput value, typically 1.0 for activation

◆ firstStageTrigger()

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

Handles first stage trigger input for weapons.

Parameters
valInput value, typically 1.0 for activation

◆ toggleCompass()

virtual void makVre::DtHumanControlLogic::toggleCompass ( double val)
virtual

Toggles the compass display.

Parameters
valInput value, typically 1.0 for activation

Toggles the value of the makVre::DtState attribute "compass".

◆ toggleCompassUnits()

virtual void makVre::DtHumanControlLogic::toggleCompassUnits ( double val)
virtual

Toggles between compass unit types.

Parameters
valInput value, typically 1.0 for activation

◆ setCompassUnits()

virtual void makVre::DtHumanControlLogic::setCompassUnits ( enum DtCompassUnits units)
virtual

Sets the compass units directly.

Parameters
unitsThe compass units to use

◆ toggleNorthReference()

virtual void makVre::DtHumanControlLogic::toggleNorthReference ( double val)
virtual

Toggles between true and magnetic north references.

Parameters
valInput value, typically 1.0 for activation

◆ toggleNVG()

virtual void makVre::DtHumanControlLogic::toggleNVG ( double val)
virtual

Toggles night vision goggles.

Parameters
valInput value, typically 1.0 for activation

◆ zoomInToggleBinoculars()

virtual void makVre::DtHumanControlLogic::zoomInToggleBinoculars ( double val)
virtual

Zooms in binoculars or toggles binoculars if not active.

Parameters
valInput value, typically 1.0 for activation

◆ zoomOutToggleBinoculars()

virtual void makVre::DtHumanControlLogic::zoomOutToggleBinoculars ( double val)
virtual

Zooms out binoculars or toggles binoculars if not active.

Parameters
valInput value, typically 1.0 for activation

◆ toggleWeaponStowed()

virtual void makVre::DtHumanControlLogic::toggleWeaponStowed ( double val)
virtual

Toggles weapon stowed state.

Parameters
valInput value, typically 1.0 for activation

◆ toggleWeaponDown()

virtual void makVre::DtHumanControlLogic::toggleWeaponDown ( double val)
virtual

Toggles weapon down state.

Parameters
valInput value, typically 1.0 for activation

◆ toggleHUD()

virtual void makVre::DtHumanControlLogic::toggleHUD ( double val)
virtual

Toggles HUD visibility.

Parameters
valInput value, typically 1.0 for activation

Toggles value of state attribute "showHUD".

◆ weaponDown()

virtual void makVre::DtHumanControlLogic::weaponDown ( )
virtual

Puts the weapon in down position.

◆ weaponStow()

virtual void makVre::DtHumanControlLogic::weaponStow ( bool stow)
virtual

Stows the current weapon.

Parameters
stowTrue to stow the weapon, false otherwise

◆ weaponUp()

virtual void makVre::DtHumanControlLogic::weaponUp ( )
virtual

Brings the weapon to ready position.

◆ cycleWeaponState()

virtual void makVre::DtHumanControlLogic::cycleWeaponState ( double val)
virtual

Cycles through weapon states (ready, down, stowed)

Parameters
valInput value, typically 1.0 for activation

Toggles current "attackMode" extended state data, representing current attack mode of the launcher, top attack ("top-attack") or direct attack ("direct-attack").

◆ toggleMissileAttackMode()

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

◆ weaponCycleOrDown()

virtual void makVre::DtHumanControlLogic::weaponCycleOrDown ( bool press)
virtual

Cycles through weapons or puts current weapon down.

Parameters
pressTrue if button is pressed, false if released

Cycles through available weapons if weapon is already in ready position, or puts the current weapon down if in ready position and not cycling.

◆ nextWeapon()

virtual void makVre::DtHumanControlLogic::nextWeapon ( double val)
virtual

Selects the next weapon in the inventory.

Parameters
valInput value, typically 1.0 for activation

Cycles to the next available weapon in the entity's inventory.

◆ selectWeapon()

virtual void makVre::DtHumanControlLogic::selectWeapon ( int index)
virtual

Selects a specific weapon by index.

Parameters
indexThe index of the weapon to select

Selects a specific weapon from the entity's inventory based on its index.

◆ manipulateTerrainElement()

virtual void makVre::DtHumanControlLogic::manipulateTerrainElement ( TerrainElement element,
TerrainAction action )
virtual

Manipulates a terrain element.

Parameters
elementThe terrain element to manipulate
actionThe action to perform on the element

Performs an action on a terrain element, such as opening a door, toggling a light switch, or operating other interactive objects.

◆ parachuteLeftToggle()

virtual void makVre::DtHumanControlLogic::parachuteLeftToggle ( double val)
virtual

Toggles the left parachute control line.

Parameters
valInput value, typically 1.0 for activation

Controls the left steering of a parachute when deployed, causing the entity to turn left when in the air.

◆ parachuteRightToggle()

virtual void makVre::DtHumanControlLogic::parachuteRightToggle ( double val)
virtual

Toggles the right parachute control line.

Parameters
valInput value, typically 1.0 for activation

Controls the right steering of a parachute when deployed, causing the entity to turn right when in the air.

◆ parachuteDeploy()

virtual void makVre::DtHumanControlLogic::parachuteDeploy ( double val)
virtual

Deploys the parachute.

Parameters
valInput value, typically 1.0 for activation

Deploys the entity's parachute when falling, allowing for controlled descent and safe landing.

◆ setLaserCode()

virtual void makVre::DtHumanControlLogic::setLaserCode ( int val)
virtual

Sets the laser designation code.

Parameters
valThe four-digit laser code to set

Sets the laser designation code used for guiding laser-guided munitions. This code must match the code set on the munition for proper guidance.

◆ playDiguyAction()

virtual void makVre::DtHumanControlLogic::playDiguyAction ( const std::string & diguyAction,
double duration = 0 )
virtual

Plays a DI-Guy animation action on the entity.

Parameters
diguyActionThe name of the DI-Guy action to play
durationThe duration of the animation in seconds (0 for default duration)

Sends a VrfTaskAnimationMessage to the entity, instructing it to play the specified DI-Guy animation action, such as waving, saluting, or other gestures and movements.

◆ playDiguyGesture()

virtual void makVre::DtHumanControlLogic::playDiguyGesture ( const std::string diguyGesture)
virtual

Plays a DI-Guy gesture on the entity.

Parameters
diguyGestureThe name of the DI-Guy gesture to play

Sends a VrfTaskGestureMessage to the entity, instructing it to play the specified DI-Guy gesture, typically used for facial expressions and minor movements.

◆ sendJoystickCommand() [1/2]

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

Sends a joystick command to a specific entity.

Parameters
idThe entity identifier of the target entity
functionGroupThe function group of the command
functionThe specific function to trigger
valThe input value for the function
repeatWhether the command should be repeated (default: false)

Sends a joystick command message to the specified entity, allowing control of its functions via simulated joystick input.

◆ sendJoystickCommand() [2/2]

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

Sends a joystick command to the controlled entity.

Parameters
functionGroupThe function group of the command
functionThe specific function to trigger
valThe input value for the function
repeatWhether the command should be repeated (default: false)

Sends a joystick command message to the entity controlled by this logic component, allowing control of its functions via simulated joystick input.

◆ reset()

virtual void makVre::DtHumanControlLogic::reset ( float value)
overridevirtual

Forwards a joystick command to controlled drones.

Helper comment for the sendJoystickCommand methods, indicating that they can be used to forward commands to drones being controlled by the entity.

Resets the entity to its initial state

Parameters
valueInput value, typically 1.0 for activation

Resets the entity to its initial state, including position, orientation, and equipment. This overrides the base class implementation to handle human-specific reset behavior.

Reimplemented from makVre::DtEntityControlLogic.

◆ resetInPlace()

virtual void makVre::DtHumanControlLogic::resetInPlace ( float value)
overridevirtual

Resets the entity state without changing position.

Parameters
valueInput value, typically 1.0 for activation

Resets the entity to its initial state but maintains its current position in the world. This is useful for resetting health, equipment, or other attributes without teleporting.

Reimplemented from makVre::DtEntityControlLogic.

◆ updateDiGuyHandItem()

virtual void makVre::DtHumanControlLogic::updateDiGuyHandItem ( )
virtual

Updates the DI-Guy hand item based on current state.

Updates the item held in the entity's hands based on the current weapon or equipment selection. This affects the visual appearance of the entity.

◆ zoomInScope()

void makVre::DtHumanControlLogic::zoomInScope ( double val)

Zooms in the weapon scope or optics.

Parameters
valInput value, typically 1.0 for activation

Increases the zoom level of the currently equipped weapon's scope or optics, providing a closer view of distant targets.

◆ zoomOutScope()

void makVre::DtHumanControlLogic::zoomOutScope ( double val)

Zooms out the weapon scope or optics.

Parameters
valInput value, typically 1.0 for activation

Decreases the zoom level of the currently equipped weapon's scope or optics, providing a wider field of view.

◆ postureFromString()

virtual HumanPosture makVre::DtHumanControlLogic::postureFromString ( const std::string & posture) const
virtual

Converts a posture string to a HumanPosture enum value.

Parameters
postureString representation of the posture
Returns
The corresponding HumanPosture enum value

Converts a string representation of a posture (e.g., "Standing", "Kneeling", "Prone") to the corresponding HumanPosture enumeration value.

◆ stringForPosture()

virtual std::string makVre::DtHumanControlLogic::stringForPosture ( const HumanPosture posture) const
virtual

Converts a HumanPosture enum value to a string.

Parameters
postureThe HumanPosture enum value to convert
Returns
String representation of the posture

Converts a HumanPosture enumeration value to its string representation (e.g., "Standing", "Kneeling", "Prone").

◆ isDead()

bool makVre::DtHumanControlLogic::isDead ( )
protected

Checks if the entity is dead.

Returns
True if the entity is dead, false otherwise

Determines whether the entity is currently dead based on its health value and appearance bits. Used to disable certain controls when the entity is dead.

◆ playerCanControl()

bool makVre::DtHumanControlLogic::playerCanControl ( )
protected

Checks if the player can control the entity.

Returns
True if the player can control the entity, false otherwise

Determines whether player input should be allowed to control the entity based on the current state, such as health, posture, and other conditions.

◆ isAirborne()

bool makVre::DtHumanControlLogic::isAirborne ( )
protected

Checks if the entity is in the air.

Returns
True if the entity is airborne, false otherwise

Determines whether the entity is currently in the air, such as when jumping, falling, or parachuting. Affects available controls and animations.

◆ isAimingLauncher()

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

Checks if the entity is aiming a launcher.

Returns
True if aiming a launcher, false otherwise

Determines whether the entity is currently carrying a shoulder-mounted launcher or using a tripod-mounted launcher. Affects aiming behavior, movement restrictions, and available actions.

◆ setMouseControlEnabled()

virtual void makVre::DtHumanControlLogic::setMouseControlEnabled ( bool enabled)
overrideprotectedvirtual

Sets whether mouse control is enabled.

Parameters
enabledTrue to enable mouse control, false to disable it

Overrides the base class implementation to handle additional setup related to mouse pitch control for human entities.

Reimplemented from makVre::DtEntityControlLogic.

◆ handleSimState()

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

Handles simulation state messages.

Parameters
msgPointer to the simulation state message
Returns
Message result indicating how the message was handled

Processes messages containing updates to the simulation state, such as entity positions, orientations, and other dynamic attributes.

Reimplemented from makVre::DtEntityControlLogic.

◆ handleViewModeMessage()

virtual makVre::DtVreMessageResult makVre::DtHumanControlLogic::handleViewModeMessage ( makVre::DtVreMessage * msg)
protectedvirtual

Handles view mode change messages.

Parameters
msgPointer to the view mode message
Returns
Message result indicating how the message was handled

Processes messages that change the view mode, such as switching between first-person and third-person perspectives.

◆ handleAppFocusUpdate()

virtual makVre::DtVreMessageResult makVre::DtHumanControlLogic::handleAppFocusUpdate ( makVre::DtVreMessage * msg)
protectedvirtual

Handles application focus update messages.

Parameters
msgPointer to the focus update message
Returns
Message result indicating how the message was handled

Processes messages about application focus changes. Used to disable walking when the application loses focus, preventing stuck movement when the ALT key release event is missed.

◆ handleSessionPlayState()

virtual makVre::DtVreMessageResult makVre::DtHumanControlLogic::handleSessionPlayState ( makVre::DtVreMessage * msg)
protectedvirtual

Handles session play state messages.

Parameters
msgPointer to the session play state message
Returns
Message result indicating how the message was handled

Processes messages about changes to the simulation play state (running, paused, or stopped) and updates entity controls accordingly.

◆ onCurrentStateChanged()

virtual void makVre::DtHumanControlLogic::onCurrentStateChanged ( std::string state)
protectedvirtual

Handles changes to the current state.

Parameters
stateThe new state string

Called when the current state changes. Provides faster response than waiting for a message-based notification (see VRE-2775). Updates controls based on the new state.

◆ onLauncherIdChanged()

virtual void makVre::DtHumanControlLogic::onLauncherIdChanged ( makVrv::DtElementID launcherId)
protectedvirtual

Handles changes to the launcher element ID.

Parameters
launcherIdThe new launcher element ID

Called when the "launcherElementId" attribute changes. Calls setupExternalLauncher when a valid launcher ID is set, or teardownExternalLauncher when the ID is cleared. This enables or disables launcher-specific functionality and UI elements.

◆ getPostureFromAppearance()

virtual HumanPosture makVre::DtHumanControlLogic::getPostureFromAppearance ( const DtEntityType & entityType,
unsigned int appearanceBits )
protectedvirtual

Determines posture from appearance bits.

Parameters
entityTypeThe entity type
appearanceBitsThe appearance bits from the entity
Returns
The human posture derived from appearance bits

Extracts the current posture (standing, kneeling, prone) from the entity's appearance bits, which encode visual state information.

◆ getCurrentEquipment()

virtual Equipment makVre::DtHumanControlLogic::getCurrentEquipment ( )
protectedvirtual

Gets the currently equipped item.

Returns
The currently active equipment type

Determines what equipment the entity is currently using, such as binoculars, NVGs, or weapons, based on attribute values.

◆ getHealthFromAppearance()

virtual double makVre::DtHumanControlLogic::getHealthFromAppearance ( )
protectedvirtual

Gets the entity's health from appearance bits.

Returns
Health value between 0.0 (dead) and 1.0 (full health)

Extracts the current health value from the entity's appearance bits, which include damage and injury state information.

◆ initPostureStringMaps()

virtual void makVre::DtHumanControlLogic::initPostureStringMaps ( )
protectedvirtual

Initializes the posture-to-string mapping tables.

Sets up bidirectional mappings between HumanPosture enum values and their string representations. Called during initialization.

◆ mapPostureToString()

virtual void makVre::DtHumanControlLogic::mapPostureToString ( const HumanPosture posture,
const std::string & postureString )
protectedvirtual

Maps a posture enum to a string representation.

Parameters
postureThe HumanPosture enum value to map
postureStringThe string representation to associate with the posture

Adds an entry to the bidirectional mapping tables between posture enum values and their string representations.

◆ fireGun()

virtual void makVre::DtHumanControlLogic::fireGun ( )
protectedvirtual

Fires the currently equipped gun.

Handles the logic for firing a gun-type weapon, including ammunition tracking, recoil effects, and sending the appropriate messages to the simulation to create projectiles and effects.

◆ fireLauncher()

virtual void makVre::DtHumanControlLogic::fireLauncher ( )
protectedvirtual

Fires the currently equipped launcher.

Handles the logic for firing a launcher-type weapon, such as rocket launchers or missile systems, including tracking ammunition and sending the appropriate messages to the simulation.

◆ throwGrenade()

virtual void makVre::DtHumanControlLogic::throwGrenade ( )
protectedvirtual

Throws a grenade.

Handles the logic for throwing a grenade, including tracking inventory, animation timing, and sending the appropriate messages to the simulation to create the grenade entity.

◆ setupExternalLauncher()

virtual void makVre::DtHumanControlLogic::setupExternalLauncher ( )
protectedvirtual

Sets up an external launcher.

Configures the control logic for using an external launcher, such as a tripod-mounted weapon system. Sets up appropriate UI elements, control mappings, and attribute listeners.

◆ teardownExternalLauncher()

virtual void makVre::DtHumanControlLogic::teardownExternalLauncher ( )
protectedvirtual

Tears down an external launcher.

Removes the configuration for an external launcher when the entity stops using it. Cleans up UI elements, control mappings, and attribute listeners.

◆ startLasing()

virtual void makVre::DtHumanControlLogic::startLasing ( )
protectedvirtual

Starts laser designation.

Activates the laser designator for targeting laser-guided munitions. Sets up the necessary attributes and tracking for the laser spot.

◆ updateLasingState()

virtual void makVre::DtHumanControlLogic::updateLasingState ( )
protectedvirtual

Updates the laser designation state.

Updates the position and state of the active laser designation spot. Called periodically when laser designation is active.

◆ stopLasing()

virtual void makVre::DtHumanControlLogic::stopLasing ( )
protectedvirtual

Stops laser designation.

Deactivates the laser designator and cleans up associated resources. Removes the laser spot from the simulation.

◆ disableFeaturesWhileParachuting()

virtual void makVre::DtHumanControlLogic::disableFeaturesWhileParachuting ( )
protectedvirtual

Disables certain features while parachuting.

Disables features and controls that should not be available while the entity is using a parachute, such as weapon handling or posture changes.

◆ updateWeaponReady()

virtual void makVre::DtHumanControlLogic::updateWeaponReady ( )
protectedvirtual

Updates the weapon ready state.

Updates the state of the currently equipped weapon based on entity attributes and conditions. Determines whether the weapon should be ready for use or put away.

◆ computeAimingError()

virtual void makVre::DtHumanControlLogic::computeAimingError ( )
protectedvirtual

Computes the current aiming error.

Calculates the current aiming error based on factors like posture, movement, fatigue, and weapon type. This error affects weapon accuracy and is used to scale the reticle in the human overlay. Must be updated every frame for accurate visual feedback.

◆ addRandomAimingError()

virtual void makVre::DtHumanControlLogic::addRandomAimingError ( DtTaitBryan & aimingOrientation)
protectedvirtual

Adds a random offset to the input aim orientation.

Parameters
aimingOrientationThe aiming orientation to which the error is added

Takes an aim orientation from the player and adds a random degree of offset between myRequiredAimingErrorPercent and the max error determined by computeAimingError().

◆ shouldAllowMovement()

virtual bool makVre::DtHumanControlLogic::shouldAllowMovement ( )
protectedvirtual

Determines if movement should be allowed.

Returns
True if movement should be allowed, false otherwise

Checks various conditions to determine if the entity should be allowed to move, such as health, posture restrictions, and current actions.

◆ walkingVelocity()

DtVector32 makVre::DtHumanControlLogic::walkingVelocity ( )
protected

Returns the velocity of the player ownship entity.

Velocity is relative to the host if embarked, otherwise i

◆ updateMoveLock()

void makVre::DtHumanControlLogic::updateMoveLock ( )
protected

Updates the move lock state.

Updates the move lock state based on current posture and conditions. Move lock prevents the entity from moving in certain situations.

◆ isMoving()

bool makVre::DtHumanControlLogic::isMoving ( )
protected

Checks if the entity is currently moving.

Returns
True if the entity is moving, false otherwise

Determines whether the entity is currently in motion based on movement inputs and velocity.

◆ initWeaponIndex()

void makVre::DtHumanControlLogic::initWeaponIndex ( )
protected

Initializes the weapon index.

Sets up the initial weapon index based on the entity's configuration and available weapons. Called during initialization.

◆ setWeaponStowed()

void makVre::DtHumanControlLogic::setWeaponStowed ( bool stowed)
protected

Sets the weapon stowed state.

Parameters
stowedTrue to stow the weapon, false otherwise

Updates the weapon stowed state and related attributes. A stowed weapon is put away completely (e.g., on the back).

◆ setWeaponDown()

void makVre::DtHumanControlLogic::setWeaponDown ( bool down)
protected

Sets the weapon down state.

Parameters
downTrue to put the weapon down, false to bring it up

Updates the weapon down state and related attributes. A down weapon is lowered but still in hand (e.g., at low ready).

◆ setWeaponState()

void makVre::DtHumanControlLogic::setWeaponState ( int state)
protected

Sets the weapon state directly.

Parameters
stateThe weapon state value to set

Sets the weapon state directly to a specific value, bypassing the individual stowed/down state setters.

◆ getCurrentAmmo()

double makVre::DtHumanControlLogic::getCurrentAmmo ( )
protected

Gets the current ammunition count.

Returns
The current ammunition count for the active weapon

Retrieves the current ammunition count for the active weapon from the appropriate attribute.

◆ setGazePitch()

void makVre::DtHumanControlLogic::setGazePitch ( double pitch)
protected

Sets the gaze pitch attribute.

Parameters
pitchThe pitch angle in degrees

Updates the gazePitch attribute, which controls the up/down orientation of the entity's head for looking.

References pitch().

◆ setGazeYaw()

void makVre::DtHumanControlLogic::setGazeYaw ( double yaw)
protected

Sets the gaze yaw attribute.

Parameters
yawThe yaw angle in degrees

Updates the gazeYaw attribute, which controls the left/right orientation of the entity's head for looking.

References yaw().

◆ thirdPersonAllowed()

virtual bool makVre::DtHumanControlLogic::thirdPersonAllowed ( )
protectedvirtual

Checks if third-person view is allowed.

Returns
True if third-person view is allowed, false otherwise

Determines if the entity is allowed to switch to third-person view based on configuration settings in human.lua.

◆ onWeaponListChanged()

void makVre::DtHumanControlLogic::onWeaponListChanged ( const DtAttributeHandle & weaponList)
protected

Handles changes to the weapon list.

Parameters
weaponListVector of weapon names available to the entity

Called when the list of available weapons changes. Updates the weapon selection UI and related controls.

◆ onAmmoCountChanged()

void makVre::DtHumanControlLogic::onAmmoCountChanged ( const DtAttributeHandle & weaponResourceHandle)
protected

Handles changes to the ammunition count.

Parameters
weaponResourceHandleThe new ammunition count

Called when the ammunition count for the current weapon changes. Updates UI elements and manages weapon state if out of ammunition.

◆ onSprintingChanged()

void makVre::DtHumanControlLogic::onSprintingChanged ( bool sprinting)
protected

Handles changes to the sprinting state.

Parameters
sprintingTrue if the entity is sprinting, false otherwise

Called when the sprinting state changes. Updates movement speed modifiers and related attributes.

◆ onMovingBackwardChanged()

void makVre::DtHumanControlLogic::onMovingBackwardChanged ( bool movingBackward)
protected

Handles changes to the backward movement state.

Parameters
movingBackwardTrue if the entity is moving backward, false otherwise

Called when the backward movement state changes. Updates movement speed modifiers and other movement-related attributes.

◆ onWalkingChanged()

void makVre::DtHumanControlLogic::onWalkingChanged ( bool walking)
protected

Handles changes to the walking state.

Parameters
walkingTrue if the entity is walking (vs running), false otherwise

Called when the walking state changes. Updates movement speed modifiers and related attributes.

◆ onAimingChanged()

void makVre::DtHumanControlLogic::onAimingChanged ( bool aiming)
protected

Handles changes to the aiming state.

Parameters
aimingTrue if the entity is aiming, false otherwise

Called when the aiming state changes. Updates movement restrictions, accuracy modifiers, and weapon handling attributes.

◆ onWeaponIndexChanged()

void makVre::DtHumanControlLogic::onWeaponIndexChanged ( int weaponIndex)
protected

Handles changes to the weapon index.

Parameters
weaponIndexThe new weapon index

Called when the selected weapon changes. Updates UI elements, ammunition tracking, and weapon-related attributes.

◆ onPostureChanged()

void makVre::DtHumanControlLogic::onPostureChanged ( HumanPosture posture)
protected

Handles changes to the posture.

Parameters
postureThe new posture

Called when the entity's posture changes. Updates movement restrictions, accuracy modifiers, and other posture-dependent attributes.

◆ onCanMoveChanged()

void makVre::DtHumanControlLogic::onCanMoveChanged ( bool canMove)
protected

Handles changes to the movement capability.

Parameters
canMoveTrue if the entity can move, false otherwise

Called when the entity's ability to move changes. Updates movement controls and related UI elements.

◆ onHealthChanged()

void makVre::DtHumanControlLogic::onHealthChanged ( double health)
protected

Handles changes to the health.

Parameters
healthThe new health value

Called when the entity's health changes. Updates UI elements, movement capabilities, and other health-dependent attributes.

◆ onEquipmentChanged()

void makVre::DtHumanControlLogic::onEquipmentChanged ( Equipment equipment)
protected

Handles changes to the active equipment.

Parameters
equipmentThe new active equipment

Called when the entity's active equipment changes. Updates UI elements, control modes, and equipment-dependent attributes.

◆ onBinocularsChanged()

void makVre::DtHumanControlLogic::onBinocularsChanged ( bool usingBinoculars)
protected

Handles changes to the binoculars state.

Parameters
usingBinocularsTrue if binoculars are in use, false otherwise

Called when the entity's binoculars usage state changes. Updates view settings, input sensitivity, and related UI elements.

◆ onForwardControlsChanged()

void makVre::DtHumanControlLogic::onForwardControlsChanged ( bool forwardControls)
protected

Handles changes to the forward controls state.

Parameters
forwardControlsTrue if forward controls are enabled, false otherwise

Called when the entity's forward controls state changes. Updates control mappings and related UI elements.

◆ onWeaponStateChanged()

void makVre::DtHumanControlLogic::onWeaponStateChanged ( int weaponState)
protected

Handles changes to the weapon state.

Parameters
weaponStateThe new weapon state

Called when the entity's weapon state changes (ready, down, stowed). Updates UI elements, control modes, and weapon-dependent attributes.

◆ onDiGuyActionChanged()

void makVre::DtHumanControlLogic::onDiGuyActionChanged ( std::string action)
protected

Handles changes to the DI-Guy action.

Parameters
actionThe new DI-Guy action name

Called when the entity's DI-Guy animation action changes. Updates control restrictions and other animation-dependent attributes.

◆ showQmlOverlay()

void makVre::DtHumanControlLogic::showQmlOverlay ( const std::string & name)
protected

Shows a QML overlay by name.

Parameters
nameName of the QML overlay to show

Activates and displays a named QML overlay, such as a weapon scope or other specialized UI element.

References makVre::DtPlayerComponent::name().

◆ shouldEnableGaze()

bool makVre::DtHumanControlLogic::shouldEnableGaze ( bool pitch) const
protected

Determines if gaze should be enabled.

Parameters
pitchTrue to check pitch gaze, false to check yaw gaze
Returns
True if gaze should be enabled, false otherwise

Returns whether pitch/yaw gaze should be enabled according to the entity state (e.g. weapon/launcher state, freelook/climbing enabled state, spectator observer attach mode).

References pitch().

◆ handleGazeInput()

bool makVre::DtHumanControlLogic::handleGazeInput ( bool pitch)
protected

Handles gaze input and updates attributes.

Parameters
pitchTrue to handle pitch gaze, false to handle yaw gaze
Returns
True if gaze is enabled and input handled, false otherwise

Checks if gaze should be enabled and sets the useGazePitch/Yaw attribute accordingly. Returns whether the gaze input was handled.

References pitch().

◆ firepowerHealthChangeCallback()

virtual void makVre::DtHumanControlLogic::firepowerHealthChangeCallback ( int newFirepowerHealthValue)
protectedvirtual

Handles changes to the firepower health.

Parameters
newFirepowerHealthValueThe new firepower health value

Called when the entity's firepower health changes. This affects aiming accuracy and weapon handling capabilities.

◆ fatigueChangeCallback()

virtual void makVre::DtHumanControlLogic::fatigueChangeCallback ( float newFatigueValue)
protectedvirtual

Handles changes to the fatigue level.

Parameters
newFatigueValueThe new fatigue value

Called when the entity's fatigue level changes. This affects movement speed, aiming accuracy, and other performance attributes.

◆ percentOfMaxSpeedChangeCallback()

virtual void makVre::DtHumanControlLogic::percentOfMaxSpeedChangeCallback ( float newPercentOfMaxSpeedValue)
protectedvirtual

Handles changes to the percent of max speed.

Parameters
newPercentOfMaxSpeedValueThe new percent of max speed value

Called when the entity's percent of maximum speed changes. This affects movement capabilities and is modified by fatigue and other factors.

Friends And Related Symbol Documentation

◆ DtHumanVirtualRealityLogic

friend class DtHumanVirtualRealityLogic
friend

Friend class declaration to allow VR logic access to protected members.

References DtHumanVirtualRealityLogic.

Referenced by DtHumanVirtualRealityLogic.

Member Data Documentation

◆ myCurrentResourceHandle

DtAttributeHandle makVre::DtHumanControlLogic::myCurrentResourceHandle
protected

Current ammunition resource attribute name.

Stores the name of the attribute currently being monitored for ammunition count.

◆ myCurrentAmmoResourceAttributeCallback

DtAttributeChangeCallback makVre::DtHumanControlLogic::myCurrentAmmoResourceAttributeCallback
protected

◆ myWeaponResourceLogic

DtWeaponResourceLogic* makVre::DtHumanControlLogic::myWeaponResourceLogic
protected

Weapon resource logic component.

Manages weapon resources such as ammunition and available weapons.

◆ myWeaponList

DtAttributeHandleType<std::vector<std::string> > makVre::DtHumanControlLogic::myWeaponList
protected

◆ myObserver

makVrv::DtObserver* makVre::DtHumanControlLogic::myObserver
protected

Pointer to the associated observer.

Provides access to view-related functionality for the entity.

◆ myHumanInputLogic

DtHumanInputLogic* makVre::DtHumanControlLogic::myHumanInputLogic
protected

Human input logic component.

Handles input processing specific to human entities.

◆ myInvertPitch

bool makVre::DtHumanControlLogic::myInvertPitch
protected

Flag for inverting pitch input.

When true, pitch input is inverted (up becomes down and vice versa).

◆ mySprintMultiplier

double makVre::DtHumanControlLogic::mySprintMultiplier
protected

Multiplier for sprint movement speed.

Scales forward movement speed when sprinting forward.

◆ mySprintBackwardMultiplier

double makVre::DtHumanControlLogic::mySprintBackwardMultiplier
protected

Multiplier for backward sprint movement speed.

Scales backward movement speed when sprinting backward.

◆ myRunMultiplier

double makVre::DtHumanControlLogic::myRunMultiplier
protected

Multiplier for running movement speed.

Scales movement speed when running (the default movement mode).

◆ myWalkMultiplier

double makVre::DtHumanControlLogic::myWalkMultiplier
protected

Multiplier for walking movement speed.

Scales movement speed when in walking mode (slower than running).

◆ myAimMultiplier

double makVre::DtHumanControlLogic::myAimMultiplier
protected

Multiplier for aiming movement speed.

Scales movement speed when aiming a weapon (typically slower).

◆ myLastMoveValue

double makVre::DtHumanControlLogic::myLastMoveValue
protected

Last forward/backward movement input value.

Stores the most recent forward/backward movement input value.

◆ myLastStrafeValue

double makVre::DtHumanControlLogic::myLastStrafeValue
protected

Last left/right strafe input value.

Stores the most recent left/right strafe input value.

◆ myPostureToString

std::map<HumanPosture, std::string> makVre::DtHumanControlLogic::myPostureToString
protected

Map from posture enum to string representation.

Bidirectional mapping between posture enum values and their string representations.

◆ myStringToPosture

std::map<std::string, HumanPosture> makVre::DtHumanControlLogic::myStringToPosture
protected

Map from string representation to posture enum.

Bidirectional mapping between string representations and posture enum values.

◆ myPostureSequence

std::vector<HumanPosture> makVre::DtHumanControlLogic::myPostureSequence
protected

Sequence of postures for cycling.

Defines the order in which postures are cycled through when using posture cycling commands.

◆ myPostureSequenceIndex

std::map<HumanPosture, int> makVre::DtHumanControlLogic::myPostureSequenceIndex
protected

Map from posture to sequence index.

Maps each posture to its index in the posture sequence for quick lookup.

◆ myPostureRestrictions

std::map<HumanPosture, PostureRestrictions> makVre::DtHumanControlLogic::myPostureRestrictions
protected

Map of posture restrictions for each posture.

Defines movement and weapon usage restrictions for each posture type.

◆ myPostureAnimationWaitTimes

std::map<HumanPosture, std::pair<double , double > > makVre::DtHumanControlLogic::myPostureAnimationWaitTimes
protected

Map of animation transition timing for each posture.

Stores the delay times (in seconds) for transitioning into and out of each posture. The first value is the delay when transitioning into the posture, and the second value is the delay when transitioning out of the posture.

◆ myLastPostureTransition

DtPostureTransition makVre::DtHumanControlLogic::myLastPostureTransition
protected

Last posture transition direction.

Stores the direction of the last posture transition (up or down).

◆ myExpectedPosture

HumanPosture makVre::DtHumanControlLogic::myExpectedPosture
protected

Expected posture after transition completes.

The posture that the entity is transitioning to or expected to reach.

◆ myDesiredPosture

HumanPosture makVre::DtHumanControlLogic::myDesiredPosture
protected

Desired posture requested by user input.

The posture that was requested through user input, which may differ from the expected posture during transitions.

◆ myLastPosture

HumanPosture makVre::DtHumanControlLogic::myLastPosture
protected

Last stable posture.

The last fully-established posture before any current transition.

◆ myPostureCommandTimeout

double makVre::DtHumanControlLogic::myPostureCommandTimeout
protected

Timeout for posture command processing.

Time remaining (in seconds) before a posture command expires if not completed.

◆ myPostureAnimationWait

double makVre::DtHumanControlLogic::myPostureAnimationWait
protected

Posture animation wait timer.

Time remaining (in seconds) to wait for the current posture animation to complete.

◆ myMoveLockTimer

double makVre::DtHumanControlLogic::myMoveLockTimer = 0.0
protected

Timed move lock time remaining.

Time in seconds remaining in temporary movement lockout.

◆ myMoveLockActive

bool makVre::DtHumanControlLogic::myMoveLockActive
protected

Move lock active flag.

Indicates whether movement is currently locked due to posture constraints or other restrictions.

◆ myEventualWeaponState

int makVre::DtHumanControlLogic::myEventualWeaponState
protected

Target weapon state to transition to.

The weapon state that the entity is transitioning to after any delays.

◆ myWantThrowGrenade

bool makVre::DtHumanControlLogic::myWantThrowGrenade
protected

Flag indicating grenade throw request.

When true, indicates that a grenade throw has been requested and is pending.

◆ myDelayedToggleWeaponDownTimer

double makVre::DtHumanControlLogic::myDelayedToggleWeaponDownTimer
protected

Timer for delayed weapon state changes.

Time remaining (in seconds) before a delayed weapon state change occurs.

◆ myJoystickSensitivity

double makVre::DtHumanControlLogic::myJoystickSensitivity
protected

Joystick input sensitivity multiplier.

Controls the sensitivity of joystick inputs for movement and aiming.

◆ myFatigue

float makVre::DtHumanControlLogic::myFatigue
protected

Current fatigue level.

Stores the current fatigue value, which affects aiming accuracy and movement speed. Higher values indicate greater fatigue and worse performance.

◆ myFirepowerHealth

int makVre::DtHumanControlLogic::myFirepowerHealth
protected

Current firepower health value.

Stores the current firepower health value, which affects aiming accuracy. Lower values indicate degraded weapon handling capability.

◆ myPercentOfMaxSpeed

float makVre::DtHumanControlLogic::myPercentOfMaxSpeed
protected

Current percentage of maximum movement speed.

Represents the current percentage of maximum speed available to the entity. Decreases as fatigue increases, limiting maximum movement speed.

◆ myMaxAimingError

double makVre::DtHumanControlLogic::myMaxAimingError
protected

Maximum aiming error in radians.

The maximum half-angle of aiming error in radians. This is typically negative to produce the full spread of possible aiming error.

◆ myAimingErrorPercent

double makVre::DtHumanControlLogic::myAimingErrorPercent
protected

Current aiming error as a percentage of maximum.

The current aiming error expressed as a percentage of the maximum possible error. Affected by posture, movement, fatigue, and other factors.

◆ myRequiredAimingErrorPercent

double makVre::DtHumanControlLogic::myRequiredAimingErrorPercent
protected

Minimum required aiming error percentage.

The minimum error percentage that is always applied to ensure some spread in shots, preventing unrealistically perfect accuracy.

◆ myProneAimingImprovementPercent

double makVre::DtHumanControlLogic::myProneAimingImprovementPercent
protected

Aiming improvement percentage in prone position.

The percentage by which aiming accuracy improves when in the prone position. This reduces the effective aiming error.

◆ myAimingImprovementPercent

double makVre::DtHumanControlLogic::myAimingImprovementPercent
protected

Aiming improvement percentage when aiming.

The percentage by which aiming accuracy improves when using the weapon's aiming capability (e.g., iron sights, optics).

◆ myCurrentHeading

double makVre::DtHumanControlLogic::myCurrentHeading
protected

Current entity heading in degrees.

The current heading (yaw) angle of the entity in world space, in degrees.

◆ myCurrentPitch

double makVre::DtHumanControlLogic::myCurrentPitch
protected

Current entity pitch in degrees.

The current pitch angle of the entity in world space, in degrees.

◆ myYawRate

double makVre::DtHumanControlLogic::myYawRate
protected

Yaw rate in degrees per second.

The rate at which the entity's yaw angle changes when turning, in degrees per second.

◆ myPitchingRate

double makVre::DtHumanControlLogic::myPitchingRate
protected

Pitch rate in degrees per second.

The rate at which the entity's pitch angle changes when looking up/down, in degrees per second.

◆ myTurningRate

double makVre::DtHumanControlLogic::myTurningRate
protected

Turning rate modifier.

A modifier applied to the turning rate under various conditions.

◆ myYaw

double makVre::DtHumanControlLogic::myYaw
protected

Current input-driven yaw offset.

The current yaw offset resulting from user input, relative to the entity's base orientation.

◆ myPitch

double makVre::DtHumanControlLogic::myPitch
protected

Current input-driven pitch offset.

The current pitch offset resulting from user input, relative to the entity's base orientation.

◆ myInitializedHeading

bool makVre::DtHumanControlLogic::myInitializedHeading
protected

Flag indicating heading initialization.

When true, indicates that the entity's heading has been initialized.

◆ myForceOrientationUpdate

bool makVre::DtHumanControlLogic::myForceOrientationUpdate
protected

Flag to force orientation update.

When true, forces an update to the entity's orientation even if other conditions would normally prevent it. Temporary solution for VR input (VRE-3178).

◆ mySendGazeAngles

bool makVre::DtHumanControlLogic::mySendGazeAngles
protected

Flag for sending gaze angles.

When true, enables sending of gaze angle updates to the entity.

◆ myTwoStageFire

bool makVre::DtHumanControlLogic::myTwoStageFire
protected

Flag for two-stage fire mode.

When true, indicates that the current weapon uses a two-stage firing process, such as missile launchers with target lock before firing.

◆ myLasingLocation

DtVector makVre::DtHumanControlLogic::myLasingLocation
protected

Current laser designation target location.

The world position of the current laser designation target point.

◆ myUsingBinocularsInputMultiplier

double makVre::DtHumanControlLogic::myUsingBinocularsInputMultiplier
protected

Input sensitivity multiplier when using binoculars.

Scales joystick and mouse pitch/yaw inputs while using binoculars. Corresponds to lua configuration variable "binocularsInputMultiplier". Defaults to 0.5 to provide finer control while using binoculars.

◆ myCachedObserverAttachMode

ObserverAttachMode makVre::DtHumanControlLogic::myCachedObserverAttachMode
protected

Cached observer attach mode before menu state.

Stores the observer attach mode at the time we enter the menu state. Used to restore the observer attach mode upon exiting menu state (while in the menu state, we force third person mode).

◆ myCachedShowCompass

bool makVre::DtHumanControlLogic::myCachedShowCompass
protected

Cached compass visibility state before menu state.

Stores whether the compass was visible at the time we enter the menu state. Used to restore the compass visibility when exiting the menu state.

◆ myActiveScopeOverlay

DtQtQuickOverlay* makVre::DtHumanControlLogic::myActiveScopeOverlay
protected

Currently active scope overlay.

The DtQtQuickOverlay scope currently in use. It may or may not be null over the lifetime of a player. For example, with shoulder mounted launchers, there may be a valid pointer when the launcher is raised, but once lowered, the pointer will be set to null again.


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