| 1 | /* |
| 2 | * SPDX-FileName: AIBaseAircraft.hxx |
| 3 | * SPDX-FileComment: abstract base class for AI aircraft |
| 4 | * SPDX-FileCopyrightText: Written by Stuart Buchanan, started August 2002 |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 6 | */ |
| 7 | |
| 8 | #pragma once |
| 9 | |
| 10 | #include "AIBase.hxx" |
| 11 | |
| 12 | |
| 13 | class FGAIBaseAircraft : public FGAIBase |
| 14 | { |
| 15 | public: |
| 16 | explicit FGAIBaseAircraft(object_type otype = object_type::otAircraft); |
| 17 | |
| 18 | void bind() override; |
| 19 | |
| 20 | // Note that this is mapped to all 6 gear indices gear/gear[0..5] |
| 21 | void GearPos(double pos) { m_gearPos = pos; }; |
| 22 | void FlapsPos(double pos) { m_flapsPos = pos; }; |
| 23 | void SpoilerPos(double pos) { m_spoilerPos = pos; }; |
| 24 | void SpeedBrakePos(double pos) { m_speedbrakePos = pos; }; |
| 25 | void BeaconLight(bool light) { m_beaconLight = light; }; |
| 26 | void LandingLight(bool light) { m_landingLight = light; }; |
| 27 | void NavLight(bool light) { m_navLight = light; }; |
| 28 | void StrobeLight(bool light) { m_strobeLight = light; }; |
| 29 | void TaxiLight(bool light) { m_taxiLight = light; }; |
| 30 | void CabinLight(bool light) { m_cabinLight = light; }; |
| 31 | |
| 32 | double GearPos() const { return m_gearPos; }; |
| 33 | double FlapsPos() const { return m_flapsPos; }; |
| 34 | double SpoilerPos() const { return m_spoilerPos; }; |
| 35 | double SpeedBrakePos() const { return m_speedbrakePos; }; |
| 36 | bool BeaconLight() const { return m_beaconLight; }; |
| 37 | bool LandingLight() const { return m_landingLight; }; |
| 38 | bool NavLight() const { return m_navLight; }; |
| 39 | bool StrobeLight() const { return m_strobeLight; }; |
| 40 | bool TaxiLight() const { return m_taxiLight; }; |
| 41 | bool CabinLight() const { return m_cabinLight; }; |
| 42 | |
| 43 | protected: |
| 44 | // Aircraft properties. |
| 45 | double m_gearPos; |
| 46 | double m_flapsPos; |
| 47 | double m_spoilerPos; |
| 48 | double m_speedbrakePos; |
| 49 | |
| 50 | // Light properties. |
| 51 | bool m_beaconLight; |
| 52 | bool m_cabinLight; |
| 53 | bool m_landingLight; |
| 54 | bool m_navLight; |
| 55 | bool m_strobeLight; |
| 56 | bool m_taxiLight; |
| 57 | }; |