DtFlightControlsInputLogic manages user input processing for aircraft flight controls, handling keyboard, joystick, and controller inputs for both fixed-wing and rotary-wing aircraft. It translates raw input values into appropriate control actions for the aircraft entity.
#include <flightControlsInputLogic.h>
|
| | DtFlightControlsInputLogic (DtPilotSimLogic &simLogic, const std::string &configFile) |
| |
| virtual | ~DtFlightControlsInputLogic () override |
| |
| virtual void | initialize (bool isFixedWing, bool useRTD) |
| |
| virtual std::string | setFlightControls (bool isFixedWing, bool useRTD) |
| |
| virtual std::string | flightControlsFunctionGroup () const |
| |
| virtual void | airBrake (float val) |
| |
| virtual void | flapState (float val) |
| |
| virtual void | landingGear (float val) |
| |
| virtual void | pedal (float val) |
| |
| virtual void | pitch (float val) |
| |
| virtual void | roll (float val) |
| |
| virtual void | throttle (float val) |
| |
| virtual void | wheelBrake (float val) |
| |
| virtual void | collective (float val) |
| |
| virtual void | yaw (float val) |
| |
| virtual void | autopilotMode1 (float val) |
| |
| virtual void | autopilotMode2 (float val) |
| |
| virtual void | autopilotToggle (float val) |
| |
| virtual void | cycleWeapon (float val) |
| |
| virtual void | setFlap (int flap) |
| |
| virtual void | flap1 (float val) |
| |
| virtual void | flap2 (float val) |
| |
| virtual void | flapToggle (float val=1) |
| |
| virtual void | setNoseWheelSteering (float val) |
| |
| virtual void | replenishFuelAndAmmo (float val) |
| |
| virtual void | toggleLandingGear (float val=1) |
| |
| virtual void | raiseLandingGear () |
| |
| virtual void | lowerLandingGear () |
| |
| virtual void | trigger (float val) |
| |
| virtual void | launchCountermeasures (const std::string &countermeasuresName) |
| |
| virtual void | toggleAutomaticCountermeasures (float val=1) |
| |
| virtual void | launchChaff (float val) |
| |
| virtual void | launchFlares (float val) |
| |
| virtual void | suppressWarnings (float val) |
| |
| virtual void | toggleArCameraMenu (float val) |
| |
| virtual void | toggleObserverAttachMode (float val) |
| |
| | DtInputLogic () |
| |
| virtual | ~DtInputLogic () |
| |
| virtual void | initialize () |
| |
| 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) |
| |
◆ DtFlightControlsInputLogic()
| makVre::DtFlightControlsInputLogic::DtFlightControlsInputLogic |
( |
DtPilotSimLogic & | simLogic, |
|
|
const std::string & | configFile ) |
Constructor.
- Parameters
-
| simLogic | Reference to the pilot simulation logic component |
| configFile | Path to the input configuration file |
◆ ~DtFlightControlsInputLogic()
| virtual makVre::DtFlightControlsInputLogic::~DtFlightControlsInputLogic |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
| virtual void makVre::DtFlightControlsInputLogic::initialize |
( |
bool | isFixedWing, |
|
|
bool | useRTD ) |
|
virtual |
Initializes the flight controls input logic.
- Parameters
-
| isFixedWing | True for fixed-wing aircraft, false for rotary-wing |
| useRTD | True to use real-time dynamics, false otherwise |
◆ setFlightControls()
| virtual std::string makVre::DtFlightControlsInputLogic::setFlightControls |
( |
bool | isFixedWing, |
|
|
bool | useRTD ) |
|
virtual |
Sets the flight controls mode based on aircraft type.
- Parameters
-
| isFixedWing | True for fixed-wing aircraft, false for rotary-wing |
| useRTD | True to use real-time dynamics, false otherwise |
- Returns
- Name of the configured function group
◆ flightControlsFunctionGroup()
| virtual std::string makVre::DtFlightControlsInputLogic::flightControlsFunctionGroup |
( |
| ) |
const |
|
virtual |
Gets the current flight controls function group name.
- Returns
- Name of the current function group
◆ airBrake()
| virtual void makVre::DtFlightControlsInputLogic::airBrake |
( |
float | val | ) |
|
|
virtual |
Handles air brake control input.
- Parameters
-
| val | Input value in the range [0.0, 1.0] |
◆ flapState()
| virtual void makVre::DtFlightControlsInputLogic::flapState |
( |
float | val | ) |
|
|
virtual |
Handles flap state control input.
- Parameters
-
| val | Input value determining flap state |
◆ landingGear()
| virtual void makVre::DtFlightControlsInputLogic::landingGear |
( |
float | val | ) |
|
|
virtual |
Handles landing gear control input.
- Parameters
-
| val | Input value controlling gear state |
◆ pedal()
| virtual void makVre::DtFlightControlsInputLogic::pedal |
( |
float | val | ) |
|
|
virtual |
Handles rudder pedal control input.
- Parameters
-
| val | Input value in the range [-1.0, 1.0] |
◆ pitch()
| virtual void makVre::DtFlightControlsInputLogic::pitch |
( |
float | val | ) |
|
|
virtual |
Handles pitch control input.
- Parameters
-
| val | Input value in the range [-1.0, 1.0], where positive is nose down |
◆ roll()
| virtual void makVre::DtFlightControlsInputLogic::roll |
( |
float | val | ) |
|
|
virtual |
Handles roll control input.
- Parameters
-
| val | Input value in the range [-1.0, 1.0], where positive is right roll |
◆ throttle()
| virtual void makVre::DtFlightControlsInputLogic::throttle |
( |
float | val | ) |
|
|
virtual |
Handles throttle control input.
- Parameters
-
| val | Input value in the range [0.0, 1.0] |
◆ wheelBrake()
| virtual void makVre::DtFlightControlsInputLogic::wheelBrake |
( |
float | val | ) |
|
|
virtual |
Handles wheel brake control input.
- Parameters
-
| val | Input value in the range [0.0, 1.0] |
◆ collective()
| virtual void makVre::DtFlightControlsInputLogic::collective |
( |
float | val | ) |
|
|
virtual |
Handles collective control input (for helicopters)
- Parameters
-
| val | Input value in the range [0.0, 1.0] |
◆ yaw()
| virtual void makVre::DtFlightControlsInputLogic::yaw |
( |
float | val | ) |
|
|
virtual |
Handles yaw control input.
- Parameters
-
| val | Input value in the range [-1.0, 1.0] |
◆ autopilotMode1()
| virtual void makVre::DtFlightControlsInputLogic::autopilotMode1 |
( |
float | val | ) |
|
|
virtual |
Activates autopilot mode 1.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ autopilotMode2()
| virtual void makVre::DtFlightControlsInputLogic::autopilotMode2 |
( |
float | val | ) |
|
|
virtual |
Activates autopilot mode 2.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ autopilotToggle()
| virtual void makVre::DtFlightControlsInputLogic::autopilotToggle |
( |
float | val | ) |
|
|
virtual |
Toggles autopilot on/off.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ cycleWeapon()
| virtual void makVre::DtFlightControlsInputLogic::cycleWeapon |
( |
float | val | ) |
|
|
virtual |
Cycles to the next weapon with ammunition.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ setFlap()
| virtual void makVre::DtFlightControlsInputLogic::setFlap |
( |
int | flap | ) |
|
|
virtual |
Sets the flap to a specific position.
- Parameters
-
| flap | Flap position index to set |
◆ flap1()
| virtual void makVre::DtFlightControlsInputLogic::flap1 |
( |
float | val | ) |
|
|
virtual |
Sets flaps to position 1.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ flap2()
| virtual void makVre::DtFlightControlsInputLogic::flap2 |
( |
float | val | ) |
|
|
virtual |
Sets flaps to position 2.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ flapToggle()
| virtual void makVre::DtFlightControlsInputLogic::flapToggle |
( |
float | val = 1 | ) |
|
|
virtual |
Toggles flaps between positions.
- Parameters
-
| val | Input value, defaults to 1.0 for activation |
◆ setNoseWheelSteering()
| virtual void makVre::DtFlightControlsInputLogic::setNoseWheelSteering |
( |
float | val | ) |
|
|
virtual |
Controls nose wheel steering.
- Parameters
-
| val | Input value in the range [-1.0, 1.0], where positive is right |
◆ replenishFuelAndAmmo()
| virtual void makVre::DtFlightControlsInputLogic::replenishFuelAndAmmo |
( |
float | val | ) |
|
|
virtual |
Refills fuel resources and ammunition counts.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ toggleLandingGear()
| virtual void makVre::DtFlightControlsInputLogic::toggleLandingGear |
( |
float | val = 1 | ) |
|
|
virtual |
Toggles landing gear between raised and lowered positions.
- Parameters
-
| val | Input value, defaults to 1.0 for activation |
◆ raiseLandingGear()
| virtual void makVre::DtFlightControlsInputLogic::raiseLandingGear |
( |
| ) |
|
|
virtual |
◆ lowerLandingGear()
| virtual void makVre::DtFlightControlsInputLogic::lowerLandingGear |
( |
| ) |
|
|
virtual |
◆ trigger()
| virtual void makVre::DtFlightControlsInputLogic::trigger |
( |
float | val | ) |
|
|
virtual |
Activates the weapon trigger.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ launchCountermeasures()
| virtual void makVre::DtFlightControlsInputLogic::launchCountermeasures |
( |
const std::string & | countermeasuresName | ) |
|
|
virtual |
Launches specified countermeasures.
- Parameters
-
| countermeasuresName | Name of the countermeasures to launch |
◆ toggleAutomaticCountermeasures()
| virtual void makVre::DtFlightControlsInputLogic::toggleAutomaticCountermeasures |
( |
float | val = 1 | ) |
|
|
virtual |
Toggles automatic countermeasures deployment.
- Parameters
-
| val | Input value, defaults to 1.0 for activation |
◆ launchChaff()
| virtual void makVre::DtFlightControlsInputLogic::launchChaff |
( |
float | val | ) |
|
|
virtual |
Launches chaff countermeasures.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ launchFlares()
| virtual void makVre::DtFlightControlsInputLogic::launchFlares |
( |
float | val | ) |
|
|
virtual |
Launches flare countermeasures.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ suppressWarnings()
| virtual void makVre::DtFlightControlsInputLogic::suppressWarnings |
( |
float | val | ) |
|
|
virtual |
Suppresses warning notifications.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ toggleArCameraMenu()
| virtual void makVre::DtFlightControlsInputLogic::toggleArCameraMenu |
( |
float | val | ) |
|
|
virtual |
Toggles AR camera menu display.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ toggleObserverAttachMode()
| virtual void makVre::DtFlightControlsInputLogic::toggleObserverAttachMode |
( |
float | val | ) |
|
|
virtual |
Toggles the observer attachment mode.
- Parameters
-
| val | Input value, typically 1.0 for activation |
◆ mySimLogic
Reference to the pilot simulation logic component.
◆ myConfigFile
| std::string makVre::DtFlightControlsInputLogic::myConfigFile |
|
protected |
Path to the input configuration file.
◆ myFunctionGroup
| std::string makVre::DtFlightControlsInputLogic::myFunctionGroup |
|
protected |
Current flight controls function group name.
◆ myNoseWheelSteering
| bool makVre::DtFlightControlsInputLogic::myNoseWheelSteering |
|
protected |
Flag indicating if nose wheel steering is active.
◆ myFlapState
| int makVre::DtFlightControlsInputLogic::myFlapState |
|
protected |
Current flap state position.
The documentation for this class was generated from the following file: