|
VR-Engage
2.2
|
DtHumanInputLogic manages user input processing for the human role, handling keyboard, mouse, and controller inputs for character movement, weapon operations, view modes, and special equipment. It translates raw input values into appropriate control actions for the human entity.
#include <humanInputLogic.h>
Public Member Functions | |
| DtHumanInputLogic (DtHumanControlLogic &simLogic, const std::string &configFile) | |
| virtual | ~DtHumanInputLogic () override |
| virtual void | initialize () override |
| virtual void | loadConfigGroup (const std::string &group) |
| virtual void | unloadConfigGroup (const std::string &group) |
| virtual void | move (float value) |
| virtual void | strafe (float value) |
| virtual void | yaw (float value) |
| virtual void | pitch (float value) |
| virtual void | mouseYaw (float value) |
| virtual void | mousePitch (float value) |
| virtual void | sprint (float value) |
| virtual void | walk (float value) |
| virtual void | moveForward (float value) |
| virtual void | moveBackward (float value) |
| virtual void | strafeLeft (float value) |
| virtual void | strafeRight (float value) |
| virtual void | yawLeft (float value) |
| virtual void | yawRight (float value) |
| virtual void | pitchUp (float value) |
| virtual void | pitchDown (float value) |
| virtual void | postureSelect (float value) |
| virtual void | postureUp (float value) |
| virtual void | postureDown (float value) |
| virtual void | postureStand (float value) |
| virtual void | postureProne (float value) |
| virtual void | fire (float value) |
| virtual void | reload (float value) |
| virtual void | aim (float value) |
| virtual void | weaponCycle (float value) |
| virtual void | nextWeapon (float value) |
| virtual void | selectWeapon (float value, int index) |
| virtual void | selectWeapon1 (float value) |
| virtual void | selectWeapon2 (float value) |
| virtual void | selectWeapon3 (float value) |
| virtual void | selectWeapon4 (float value) |
| virtual void | selectWeapon5 (float value) |
| virtual void | selectWeapon6 (float value) |
| virtual void | selectWeapon7 (float value) |
| virtual void | selectWeapon8 (float value) |
| virtual void | selectWeapon9 (float value) |
| virtual void | selectWeapon10 (float value) |
| virtual void | toggleWeaponStowed (float value) |
| virtual void | toggleWeaponDown (float value) |
| virtual void | toggleHUD (float value) |
| virtual void | cycleWeaponState (float value) |
| virtual void | freeLook (float value) |
| virtual void | firstPersonMode (float value) |
| virtual void | thirdPersonMode (float value) |
| virtual void | toggleViewMode (float value) |
| virtual void | toggleNVG (float value) |
| virtual void | toggleBinoculars (float value) |
| virtual void | toggleFlashlight (float value) |
| virtual void | toggleCompass (float value) |
| virtual void | toggleCompassUnits (float value) |
| virtual void | parachuteDeploy (float value) |
| virtual void | setParachuteControls (bool enabled) |
| virtual void | parachuteLeftToggle (float value) |
| virtual void | parachuteRightToggle (float value) |
| virtual void | minimapCycle (float value) |
| virtual void | minimapZoomIn (float value) |
| virtual void | minimapZoomOut (float value) |
| virtual void | minimapResetZoom (float value) |
| virtual void | toggleARCameraMenu (float value) |
| virtual void | setBinocularsControls (bool enabled) |
| virtual void | zoomIn (float value) |
| virtual void | zoomOut (float value) |
| virtual void | zoom (float value) |
| virtual void | setLauncherControls (bool enabled) |
| virtual void | firstStageTrigger (float value) |
| virtual void | toggleMissileAttackMode (float value) |
| virtual void | setScopeControls (bool enabled) |
| virtual void | setDroneControls (bool enabled) |
| virtual void | toggleRemoteViewViewport (float value) |
| virtual void | toggleFocusOnDrone (float value) |
| virtual void | toggleDronePIDMenu (float value) |
| virtual void | droneCollective (float value) |
| virtual void | dronePitch (float value) |
| virtual void | droneRoll (float value) |
| virtual void | dronePedal (float value) |
| virtual void | droneWheelBrake (float value) |
| virtual void | droneCameraElevation (float value) |
| virtual void | droneCameraZoom (float value) |
| virtual void | droneCaptureImage (float value) |
Public Member Functions inherited from makVre::DtInputLogic | |
| DtInputLogic () | |
| virtual | ~DtInputLogic () |
| virtual void | shutdown () |
| virtual bool | loadInputConfig (const std::string &config, const std::string &group, bool alwaysOnTop=false, bool alwaysEnabled=false) |
| virtual void | unloadInputConfig (const std::string &category, const std::string &group) |
| virtual void | addActionHandler (const std::string &group, const std::string &action, const DtActionDelegate &handler) |
| virtual void | removeActionGroup (const std::string &group) |
| virtual void | setRawInputHandler (const DtInputDelegate &inputDelegate) |
| virtual void | removeRawInputHandler () |
| virtual void | removeActionHandler (const std::string &group, const std::string &action) |
Protected Member Functions | |
| virtual void | sendDroneJoystickCommand (const std::string &functionGroup, const std::string &function, double value) |
Protected Attributes | |
| DtHumanControlLogic & | mySimLogic |
| std::string | myConfigFile |
| bool | myBinocularsEnabled |
| bool | myScopeEnabled |
Protected Attributes inherited from makVre::DtInputLogic | |
| DtVreInputManager * | myInputManager |
| std::vector< std::pair< std::string, std::string > > | myInputConfigurations |
| std::unordered_map< std::string, std::vector< std::string > > | myActionGroups |
| bool | myHandlingRawInput |
| makVre::DtHumanInputLogic::DtHumanInputLogic | ( | DtHumanControlLogic & | simLogic, |
| const std::string & | configFile ) |
Constructor.
| simLogic | Reference to the human control logic component |
| configFile | Path to the input configuration file |
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initializes the input logic component.
Sets up input bindings and default configuration
Reimplemented from makVre::DtInputLogic.
|
virtual |
Loads a specific input configuration group.
| group | Name of the configuration group to load |
|
virtual |
Unloads a specific input configuration group.
| group | Name of the configuration group to unload |
|
virtual |
Handles forward/backward movement input.
| value | Input value in the range [-1.0, 1.0], where positive is forward |
|
virtual |
Handles left/right movement input.
| value | Input value in the range [-1.0, 1.0], where positive is right |
|
virtual |
Handles yaw (left/right turning) input.
| value | Input value in the range [-1.0, 1.0], where positive is right |
|
virtual |
Handles pitch (up/down looking) input.
| value | Input value in the range [-1.0, 1.0], where positive is down |
|
virtual |
Handles mouse-specific yaw input.
| value | Input value derived from mouse movement |
|
virtual |
Handles mouse-specific pitch input.
| value | Input value derived from mouse movement |
|
virtual |
Activates sprint movement.
| value | Input value, typically 1.0 for activation |
|
virtual |
Activates walk movement.
| value | Input value, typically 1.0 for activation |
|
virtual |
Handles forward movement input.
| value | Input value, typically 1.0 for full forward |
|
virtual |
Handles backward movement input.
| value | Input value, typically 1.0 for full backward |
|
virtual |
Handles leftward movement input.
| value | Input value, typically 1.0 for full left |
|
virtual |
Handles rightward movement input.
| value | Input value, typically 1.0 for full right |
|
virtual |
Handles leftward turning input.
| value | Input value, typically 1.0 for activation |
|
virtual |
Handles rightward turning input.
| value | Input value, typically 1.0 for activation |
|
virtual |
Handles upward looking input.
| value | Input value, typically 1.0 for activation |
|
virtual |
Handles downward looking input.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects posture based on current state.
| value | Input value, typically 1.0 for activation |
|
virtual |
Transitions to a more upright posture.
| value | Input value, typically 1.0 for activation |
|
virtual |
Transitions to a more prone posture.
| value | Input value, typically 1.0 for activation |
|
virtual |
Transitions to standing posture.
| value | Input value, typically 1.0 for activation |
|
virtual |
Transitions to prone posture.
| value | Input value, typically 1.0 for activation |
|
virtual |
Fires the current weapon.
| value | Input value, typically 1.0 for activation |
|
virtual |
Initiates weapon reload.
| value | Input value, typically 1.0 for activation |
|
virtual |
Activates aiming mode.
| value | Input value, typically 1.0 for activation |
|
virtual |
Cycles through available weapons.
| value | Input value, typically 1.0 for activation |
|
virtual |
Switches to the next weapon.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects a specific weapon by index.
| value | Input value, typically 1.0 for activation |
| index | Index of the weapon to select (0-based) |
|
virtual |
Selects weapon 1.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 2.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 3.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 4.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 5.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 6.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 7.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 8.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 9.
| value | Input value, typically 1.0 for activation |
|
virtual |
Selects weapon 10.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles weapon stowed state.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles weapon down state.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles HUD visibility.
| value | Input value, typically 1.0 for activation |
Action handler for "toggle-HUD" control. Calls corresponding function in mySimLogic.
|
virtual |
Cycles through weapon states (ready, down, stowed)
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles free look mode.
| value | Input value, typically 1.0 for activation |
|
virtual |
Switches to first-person view mode.
| value | Input value, typically 1.0 for activation |
|
virtual |
Switches to third-person view mode.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles between view modes.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles night vision goggles.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles binoculars equipment.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles flashlight on/off.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles compass display.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles between compass unit types.
| value | Input value, typically 1.0 for activation |
|
virtual |
Deploys the parachute.
| value | Input value, typically 1.0 for activation |
|
virtual |
Enables or disables parachute controls.
| enabled | True to enable parachute controls, false to disable |
|
virtual |
Toggles left parachute control.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles right parachute control.
| value | Input value, typically 1.0 for activation |
|
virtual |
Cycles minimap display modes.
| value | Input value, typically 1.0 for activation |
|
virtual |
Zooms in the minimap.
| value | Input value, typically 1.0 for activation |
|
virtual |
Zooms out the minimap.
| value | Input value, typically 1.0 for activation |
|
virtual |
Resets minimap zoom to default.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles AR camera menu display.
| value | Input value, typically 1.0 for activation |
|
virtual |
Enables or disables binoculars-specific controls.
| enabled | True to enable binoculars controls, false to disable |
|
virtual |
Zooms in with current optical equipment.
| value | Input value, typically 1.0 for activation |
|
virtual |
Zooms out with current optical equipment.
| value | Input value, typically 1.0 for activation |
|
virtual |
Controls continuous zoom level.
| value | Input value in the range [-1.0, 1.0], where positive is zoom in |
|
virtual |
Enables or disables launcher-specific controls.
| enabled | True to enable launcher controls, false to disable |
|
virtual |
Handles first stage trigger input for weapons.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles the missile attack mode.
| value | Input value, typically 1.0 for activation |
Toggles between top attack mode and direct attack mode for missile launchers
|
virtual |
Enables or disables scope-specific controls.
| enabled | True to enable scope controls, false to disable |
|
virtual |
Enables or disables drone-specific controls.
| enabled | True to enable drone controls, false to disable |
|
virtual |
Toggles remote view viewport for drone.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles focus on controlled drone.
| value | Input value, typically 1.0 for activation |
|
virtual |
Toggles drone PID control menu.
| value | Input value, typically 1.0 for activation |
|
virtual |
Controls drone collective (vertical movement)
| value | Input value in the range [-1.0, 1.0], where positive is up |
|
virtual |
Controls drone pitch (forward/backward tilt)
| value | Input value in the range [-1.0, 1.0], where positive is down |
|
virtual |
Controls drone roll (left/right tilt)
| value | Input value in the range [-1.0, 1.0], where positive is right |
|
virtual |
Controls drone pedal (yaw/rotation)
| value | Input value in the range [-1.0, 1.0], where positive is right |
|
virtual |
Controls drone wheel brake.
| value | Input value, typically 1.0 for activation |
|
virtual |
Controls drone camera elevation.
| value | Input value in the range [-1.0, 1.0], where positive is down |
|
virtual |
Controls drone camera zoom.
| value | Input value in the range [-1.0, 1.0], where positive is zoom in |
|
virtual |
Captures an image from the drone camera.
| value | Input value, typically 1.0 for activation |
|
protectedvirtual |
Sends a joystick command to the controlled drone.
| functionGroup | Function group name for the command |
| function | Function name for the command |
| value | Command value |
|
protected |
Reference to the human control logic component.
|
protected |
Path to the input configuration file.
|
protected |
Flag indicating if binoculars controls are enabled.
|
protected |
Flag indicating if scope controls are enabled.