XPMP2
X-Plane multiplayer library 2 - using instancing
XPMPMultiplayer.h
Go to the documentation of this file.
1
62
63#ifndef _XPLMMultiplayer_h_
64#define _XPLMMultiplayer_h_
65
66#include <string>
67#include <cmath>
68#include "XPLMDefs.h"
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73
74// defined in XPMPAircraft
75namespace XPMP2 { class Aircraft; }
76
77/************************************************************************************
78 * MARK: PLANE DATA TYPES
79 ************************************************************************************/
80
89 long size = sizeof(XPMPPlanePosition_t);
90 double lat = 0.0;
91 double lon = 0.0;
92 double elevation = 0.0;
93 float pitch = 0.0f;
94 float roll = 0.0f;
95 float heading = 0.0f;
96 char label[32] = "";
97 float offsetScale = 1.0f;
98 bool clampToGround = false;
99 int aiPrio = 1;
100 float label_color[4] = {1.0f,1.0f,0.0f,1.0f};
101 int multiIdx = 0;
102};
103
104
110enum {
115typedef unsigned int XPMPLightsPattern;
116
117
118#if __GNUC__
119#pragma GCC diagnostic push
120#pragma GCC diagnostic ignored "-Wpedantic" // because we don't want to change the anonymous structure following here as that would require code change in legacy plugins
121#elif _MSC_VER
122#pragma warning(push)
123#pragma warning(disable: 4202 4201)
124#endif
129 unsigned int lightFlags = 0x150000;
130 struct {
131 unsigned int timeOffset : 16;
132
133 unsigned int taxiLights : 1;
134 unsigned int landLights : 1;
135 unsigned int bcnLights : 1;
136 unsigned int strbLights : 1;
137 unsigned int navLights : 1;
138
140 XPMPLightsPattern flashPattern : 4;
141 };
142};
143#if __GNUC__
144#pragma GCC diagnostic pop
145#elif _MSC_VER
146#pragma warning(pop)
147#endif
148
149
157 long size = sizeof(XPMPPlaneSurfaces_t);
158 float gearPosition = 0.0f;
159 float flapRatio = 0.0f;
160 float spoilerRatio = 0.0f;
161 float speedBrakeRatio = 0.0f;
162 float slatRatio = 0.0f;
163 float wingSweep = 0.0f;
164 float thrust = 0.0f;
165 float yokePitch = 0.0f;
166 float yokeHeading = 0.0f;
167 float yokeRoll = 0.0f;
168
170
171 float tireDeflect = 0.0f;
172 float tireRotDegree = 0.0f;
173 float tireRotRpm = 0.0f;
174
175 float engRotDegree = 0.0f;
176 float engRotRpm = 0.0f;
177 float propRotDegree = 0.0f;
178 float propRotRpm = 0.0f;
179 float reversRatio = 0.0f;
180
181 bool touchDown = false;
182};
183
184
191enum XPMPTransponderMode {
192 xpmpTransponderMode_Off = 0,
193 xpmpTransponderMode_Standby,
194 xpmpTransponderMode_ModeA,
195 xpmpTransponderMode_ModeC,
196 xpmpTransponderMode_Test,
197 xpmpTransponderMode_ModeS_Gnd,
198 xpmpTransponderMode_ModeS_TAOnly,
199 xpmpTransponderMode_ModeS_TARA,
200};
201
202
204struct XPMPPlaneRadar_t {
205 long size = sizeof(XPMPPlaneRadar_t);
206 long code = 0;
207 XPMPTransponderMode mode = xpmpTransponderMode_ModeC;
208 const char* GetModeStr() const;
209};
210
211
215struct XPMPInfoTexts_t {
216 long size = sizeof(XPMPInfoTexts_t);
217 char tailNum[10] = {0};
218 char icaoAcType[5] = {0};
219 char manufacturer[40] = {0};
220 char model[40] = {0};
221 char icaoAirline[4] = {0};
222 char airline[40] = {0};
223 char flightNum [10] = {0};
224 char aptFrom [5] = {0};
225 char aptTo [5] = {0};
226};
227
228
236enum XPMPPlaneDataType {
237 xpmpDataType_Position = 1L << 1,
238 xpmpDataType_Surfaces = 1L << 2,
239 xpmpDataType_Radar = 1L << 3,
240 xpmpDataType_InfoTexts = 1L << 4,
241};
242
243
247enum XPMPPlaneCallbackResult {
248 xpmpData_Unavailable = 0, /* The information has never been specified. */
249 xpmpData_Unchanged = 1, /* The information from the last time the plug-in was asked. */
250 xpmpData_NewData = 2 /* The information has changed this sim cycle. */
251};
252
253
259typedef unsigned XPMPPlaneID;
260
262constexpr XPMPPlaneID MIN_MODE_S_ID = 0x00000001;
264constexpr XPMPPlaneID MAX_MODE_S_ID = 0x00FFFFFF;
265
266
267/************************************************************************************
268* MARK: INITIALIZATION
269************************************************************************************/
270
274#define XPMP_CFG_SEC_MODELS "models"
275#define XPMP_CFG_SEC_PLANES "planes"
276#define XPMP_CFG_SEC_SOUND "sound"
277#define XPMP_CFG_SEC_DEBUG "debug"
279
283#define XPMP_CFG_ITM_REPLDATAREFS "replace_datarefs"
284#define XPMP_CFG_ITM_REPLTEXTURE "replace_texture"
285#define XPMP_CFG_ITM_CLAMPALL "clamp_all_to_ground"
286#define XPMP_CFG_ITM_HANDLE_DUP_ID "handle_dup_id"
287#define XPMP_CFG_ITM_SUPPORT_REMOTE "support_remote"
288#define XPMP_CFG_ITM_CONTR_MIN_ALT "contrail_min_alt"
289#define XPMP_CFG_ITM_CONTR_MAX_ALT "contrail_max_alt"
290#define XPMP_CFG_ITM_CONTR_LIFE "contrail_life_time"
291#define XPMP_CFG_ITM_CONTR_MULTI "contrail_multiple"
292#define XPMP_CFG_ITM_ACTIVATE_SOUND "activate_sound"
293#define XPMP_CFG_ITM_FMOD_INSTANCE "force_fmod_instance"
294#define XPMP_CFG_ITM_MUTE_ON_PAUSE "mute_on_pause"
295#define XPMP_CFG_ITM_LOGLEVEL "log_level"
296#define XPMP_CFG_ITM_MODELMATCHING "model_matching"
298
325typedef int (*XPMPIntPrefsFuncTy)(const char* _section, const char* _key, int _default);
326
329
335[[deprecated("Use XPMPMultiplayerInit and XPMPLoadCSLPackages")]]
336const char * XPMPMultiplayerInitLegacyData(const char* inCSLFolder,
337 const char* inPluginName,
338 const char* resourceDir,
339 XPMPIntPrefsFuncTy inIntPrefsFunc = nullptr,
340 const char* inDefaultICAO = nullptr,
341 const char* inPluginLogAcronym = nullptr);
342
351const char * XPMPMultiplayerInit(const char* inPluginName,
352 const char* resourceDir,
353 XPMPIntPrefsFuncTy inIntPrefsFunc = nullptr,
354 const char* inDefaultICAO = nullptr,
355 const char* inPluginLogAcronym = nullptr);
356
363void XPMPSetPluginName (const char* inPluginName,
364 const char* inPluginLogAcronym = nullptr);
365
366
372
373
378
383
386[[deprecated("Unsupported feature, will always return 'OBJ7 format is no longer supported'")]]
387const char * XPMPMultiplayerOBJ7SupportEnable(const char * inTexturePath);
388
390
391/************************************************************************************
392* MARK: Sound
393************************************************************************************/
394
397
405bool XPMPSoundEnable (bool bEnable = true);
406
408bool XPMPSoundIsEnabled ();
409
412void XPMPSoundSetMasterVolume (float fVol = 1.0f);
413
416void XPMPSoundMute (bool bMute);
417
431const char* XPMPSoundAdd (const char* sName,
432 const char* filePath,
433 bool bLoop,
434 float coneDir = NAN, float conePitch = NAN,
435 float coneInAngle = NAN, float coneOutAngle = NAN,
436 float coneOutVol = NAN);
437
444const char* XPMPSoundEnumerate (const char* prevName, const char** ppFilePath = nullptr);
445
447
450
451// Standard sounds loaded by XPMP2 from XP's `Resource/sounds` folders
452#define XP_SOUND_ELECTRIC "Electric"
453#define XP_SOUND_HIBYPASSJET "HiBypassJet"
454#define XP_SOUND_LOBYPASSJET "LoBypassJet"
455#define XP_SOUND_TURBOPROP "Turboprop"
456#define XP_SOUND_PROP_AIRPLANE "PropAirplane"
457#define XP_SOUND_PROP_HELI "PropHeli"
458#define XP_SOUND_REVERSE_THRUST "ReverseThrust"
459#define XP_SOUND_ROLL_RUNWAY "RollRunway"
460#define XP_SOUND_FLAP "Flap"
461#define XP_SOUND_GEAR "Gear"
462
464
465/************************************************************************************
466* MARK: AI / Multiplayer plane control
467************************************************************************************/
468
471
492const char * XPMPMultiplayerEnable(void (*_callback)(void*) = nullptr,
493 void* _refCon = nullptr);
494
495
501
502
506
508
509/************************************************************************************
510* MARK: CSL Package Handling
511************************************************************************************/
512
515
534const char * XPMPLoadCSLPackage(const char * inCSLFolder);
535
536
538[[deprecated("No longer needed, does not do anything.")]]
540
541
544
545
559[[deprecated("Unsafe, use XPMPGetModelInfo2() instead.")]]
560void XPMPGetModelInfo(int inIndex, const char **outModelName, const char **outIcao, const char **outAirline, const char **outLivery);
561
570void XPMPGetModelInfo2(int inIndex, std::string& outModelName, std::string& outIcao, std::string& outAirline, std::string& outLivery);
571
572
578int XPMPModelMatchQuality(const char * inICAO,
579 const char * inAirline,
580 const char * inLivery);
581
582
584bool XPMPIsICAOValid(const char * inICAO);
585
603size_t XPMPAddModelDataRef (const std::string& dataRef);
604
606
607/************************************************************************************
608 * MARK: PLANE CREATION API
609 ************************************************************************************/
610
611
623typedef XPMPPlaneCallbackResult (* XPMPPlaneData_f)(XPMPPlaneID inPlane,
624 XPMPPlaneDataType inDataType,
625 void * ioData,
626 void * inRefcon);
627
630
641[[deprecated("Subclass XPMP2::Aircraft instead")]]
642XPMPPlaneID XPMPCreatePlane(const char * inICAOCode,
643 const char * inAirline,
644 const char * inLivery,
645 XPMPPlaneData_f inDataFunc,
646 void * inRefcon,
647 XPMPPlaneID inModeS_id = 0);
648
658[[deprecated("Subclass XPMP2::Aircraft instead")]]
659XPMPPlaneID XPMPCreatePlaneWithModelName(const char * inModelName,
660 const char * inICAOCode,
661 const char * inAirline,
662 const char * inLivery,
663 XPMPPlaneData_f inDataFunc,
664 void * inRefcon,
665 XPMPPlaneID inModeS_id = 0);
666
669[[deprecated("Delete subclassed XPMP2::Aircraft object instead")]]
671
672
674void XPMPSetPlaneVisibility(XPMPPlaneID _id, bool _bVisible);
675
676
686 const char * inICAOCode,
687 const char * inAirline,
688 const char * inLivery);
689
690
703 char * outTxtBuf,
704 int outTxtBufSize);
705
706
712[[deprecated("Unsafe pointer operations")]]
714 char * outICAOCode, // Can be NULL
715 char * outLivery); // Can be NULL
716
717
725[[deprecated("Unsupported")]]
726XPMPPlaneCallbackResult XPMPGetPlaneData(XPMPPlaneID inPlane,
727 XPMPPlaneDataType inDataType,
728 void * outData);
729
730
733
734
736long XPMPCountPlanes(void);
737
738
740XPMPPlaneID XPMPGetNthPlane(long index);
741
742
745
746
750void XPMPSetDefaultPlaneICAO(const char* _acIcaoType,
751 const char* _carIcaoType = nullptr);
752
754
755/************************************************************************************
756 * MARK: PLANE OBSERVATION API
757 ************************************************************************************/
758
759
766
767
773typedef void (*XPMPPlaneNotifier_f)(XPMPPlaneID inPlaneID,
774 XPMPPlaneNotification inNotification,
775 void * inRefcon);
776
779
785 void * inRefcon);
786
787
793 void * inRefcon);
794
796
797/************************************************************************************
798 * MARK: PLANE RENDERING API (unsued in XPMP2)
799 ************************************************************************************/
800
804[[deprecated("Unsupported, will not be called")]]
805typedef void (* XPMPRenderPlanes_f)(
806 int inIsBlend,
807 void * inRef);
808
811
815[[deprecated("Unsupported, doesn't do anything")]]
817 void * inRef);
818
819
822[[deprecated("Unsupported, doesn't do anything")]]
823void XPMPDumpOneCycle(void);
824
825
827void XPMPEnableAircraftLabels (bool _enable = true);
828
829
833
834
837
838
842void XPMPSetAircraftLabelDist (float _dist_nm, bool _bCutOffAtVisibility = true);
843
844//
845// MARK: MAP
846// Enable or disable the drawing of icons on maps
847//
848
854void XPMPEnableMap (bool _bEnable, bool _bLabels = true);
855
857
858#ifdef __cplusplus
859}
860#endif
861
862
863#endif
size_t XPMPAddModelDataRef(const std::string &dataRef)
Definition Aircraft.cpp:1141
bool XPMPIsICAOValid(const char *inICAO)
Definition XPMPMultiplayer.cpp:359
int XPMPModelMatchQuality(const char *inICAO, const char *inAirline, const char *inLivery)
Definition XPMPMultiplayer.cpp:347
void XPMPGetModelInfo2(int inIndex, std::string &outModelName, std::string &outIcao, std::string &outAirline, std::string &outLivery)
Definition XPMPMultiplayer.cpp:315
int(* XPMPIntPrefsFuncTy)(const char *_section, const char *_key, int _default)
Definition for the type of configuration callback function.
Definition XPMPMultiplayer.h:325
void XPMPSetAircraftLabelDist(float _dist_nm, bool _bCutOffAtVisibility=true)
Definition 2D.cpp:301
bool clampToGround
enables ground-clamping for this aircraft (can be expensive, see XPMP2::Aircraft::bClampToGround)
Definition XPMPMultiplayer.h:98
@ xpmp_Lights_Pattern_GA
GA: one strobe flash, long beacon (-*-----—*—)
Definition XPMPMultiplayer.h:113
@ xpmp_Lights_Pattern_EADS
Airbus+EADS: strobe flashes twice (-*-*--—*-*–), short beacon.
Definition XPMPMultiplayer.h:112
@ xpmp_Lights_Pattern_Default
Jets: one strobe flash, short beacon (-*—*—*—)
Definition XPMPMultiplayer.h:111
double elevation
current altitude of aircraft [ft above MSL]
Definition XPMPMultiplayer.h:92
long XPMPCountPlanes(void)
Returns the number of planes in existence.
Definition XPMPMultiplayer.cpp:504
double lat
current position of aircraft (latitude)
Definition XPMPMultiplayer.h:90
bool XPMPContrailsAvailable()
Are Contrails available?
Definition Contrail.cpp:306
float pitch
pitch [degrees, psitive up]
Definition XPMPMultiplayer.h:93
int XPMPGetPlaneModelName(XPMPPlaneID inPlaneID, char *outTxtBuf, int outTxtBufSize)
Return the name of the model, with which the given plane is rendered.
Definition XPMPMultiplayer.cpp:454
float engRotRpm
engine rotation speed (rpm)
Definition XPMPMultiplayer.h:176
XPMPPlaneCallbackResult XPMPGetPlaneData(XPMPPlaneID inPlane, XPMPPlaneDataType inDataType, void *outData)
Unsupported, don't use.
Definition XPMPMultiplayer.cpp:485
*param[out] outModelName Receives pointer to model can be nullptr *param[out] outIcao Receives pointer to ICAO aircraft type designator can be nullptr *param[out] outAirline Receives pointer to ICAO airline code can be nullptr *param[out] outLivery Receives pointer to special livery string can be nullptr *void XPMPGetModelInfo(int inIndex, const char **outModelName, const char **outIcao, const char **outAirline, const char **outLivery)
Definition XPMPMultiplayer.cpp:283
float yokePitch
yoke pitch ratio [0..1]
Definition XPMPMultiplayer.h:165
float gearPosition
gear position [0..1]
Definition XPMPMultiplayer.h:158
void XPMPSoundSetMasterVolume(float fVol=1.0f)
Set Master Volume.
Definition Sound.cpp:1089
void XPMPRegisterPlaneNotifierFunc(XPMPPlaneNotifier_f inFunc, void *inRefcon)
Registers a callback, which is called when one of the events defined in XPMPPlaneNotification happens...
Definition XPMPMultiplayer.cpp:554
char label[32]
label to show with the aircraft
Definition XPMPMultiplayer.h:96
constexpr XPMPPlaneID MIN_MODE_S_ID
Minimum allowed XPMPPlaneID / mode S id.
Definition XPMPMultiplayer.h:262
bool touchDown
just now is moment of touch down?
Definition XPMPMultiplayer.h:181
void(* XPMPRenderPlanes_f)(int inIsBlend, void *inRef)
The original libxplanemp allowed to override rendering; no longer supported.
Definition XPMPMultiplayer.h:805
void XPMPGetPlaneICAOAndLivery(XPMPPlaneID inPlane, char *outICAOCode, char *outLivery)
Returns ICAO aircraft type designator and livery of the given plane.
Definition XPMPMultiplayer.cpp:472
const char * XPMPMultiplayerInitLegacyData(const char *inCSLFolder, const char *inPluginName, const char *resourceDir, XPMPIntPrefsFuncTy inIntPrefsFunc=nullptr, const char *inDefaultICAO=nullptr, const char *inPluginLogAcronym=nullptr)
Deprecated legacy initialization of XPMP2.
Definition XPMPMultiplayer.cpp:122
float tireRotRpm
tire rotation speed (rpm)
Definition XPMPMultiplayer.h:173
float heading
heading [degrees]
Definition XPMPMultiplayer.h:95
float yokeRoll
yoke roll ratio [0..1]
Definition XPMPMultiplayer.h:167
const char * XPMPMultiplayerInit(const char *inPluginName, const char *resourceDir, XPMPIntPrefsFuncTy inIntPrefsFunc=nullptr, const char *inDefaultICAO=nullptr, const char *inPluginLogAcronym=nullptr)
Initializes the XPMP2 library. This shall be your first call to the library.
Definition XPMPMultiplayer.cpp:146
float flapRatio
flap extension ratio [0..1]
Definition XPMPMultiplayer.h:159
constexpr XPMPPlaneID MAX_MODE_S_ID
Maximum allowed XPMPPlaneID / mode S id.
Definition XPMPMultiplayer.h:264
void XPMPSoundMute(bool bMute)
Mute all sounds (temporarily)
Definition Sound.cpp:1097
const char * XPMPMultiplayerOBJ7SupportEnable(const char *inTexturePath)
Used to set the light textures for old OBJ7 models.
Definition XPMPMultiplayer.cpp:251
XPMPPlaneID XPMPGetNthPlane(long index)
Returns the plane ID of the Nth plane.
Definition XPMPMultiplayer.cpp:510
const char * XPMPSoundAdd(const char *sName, const char *filePath, bool bLoop, float coneDir=NAN, float conePitch=NAN, float coneInAngle=NAN, float coneOutAngle=NAN, float coneOutVol=NAN)
Add a sound that can later be referenced from an XPMP2::Aircraft.
Definition Sound.cpp:1105
float label_color[4]
label base color (RGB), defaults to yellow
Definition XPMPMultiplayer.h:100
int aiPrio
Priority for AI/TCAS consideration, the lower the earlier.
Definition XPMPMultiplayer.h:99
void XPMPUnregisterPlaneNotifierFunc(XPMPPlaneNotifier_f inFunc, void *inRefcon)
Unregisters a notification callback. Both function pointer and refcon must match what was registered.
Definition XPMPMultiplayer.cpp:574
const char * XPMPLoadCSLPackage(const char *inCSLFolder)
Loads CSL packages from the given folder, searching up to 5 folder levels deep.
Definition XPMPMultiplayer.cpp:261
xpmp_LightStatus lights
status of lights
Definition XPMPMultiplayer.h:169
float engRotDegree
engine rotation angle (degrees 0..360)
Definition XPMPMultiplayer.h:175
XPMP2::Aircraft * XPMPGetAircraft(XPMPPlaneID _id)
Returns the underlying aircraft object, or nullptr if _id is invalid */.
Definition XPMPMultiplayer.cpp:521
float reversRatio
thrust reversers ratio
Definition XPMPMultiplayer.h:179
XPMPPlaneCallbackResult(* XPMPPlaneData_f)(XPMPPlaneID inPlane, XPMPPlaneDataType inDataType, void *ioData, void *inRefcon)
Callback function your plugin provides to return updated plane data.
Definition XPMPMultiplayer.h:623
void XPMPDisableAircraftLabels()
Disable drawing of labels with the aircraft.
Definition 2D.cpp:290
void XPMPEnableMap(bool _bEnable, bool _bLabels=true)
Enable or disable the drawing of aircraft icons on X-Plane's map.
Definition Map.cpp:397
float offsetScale
how much of the surface contact correction offset should be applied [0..1]
Definition XPMPMultiplayer.h:97
bool XPMPHasControlOfAIAircraft()
Has XPMP2 control of TCAS targets?
Definition AIMultiplayer.cpp:1222
int XPMPChangePlaneModel(XPMPPlaneID inPlaneID, const char *inICAOCode, const char *inAirline, const char *inLivery)
Perform model matching again and change the CSL model to the resulting match.
Definition XPMPMultiplayer.cpp:439
XPMPPlaneID XPMPCreatePlane(const char *inICAOCode, const char *inAirline, const char *inLivery, XPMPPlaneData_f inDataFunc, void *inRefcon, XPMPPlaneID inModeS_id=0)
Creates a new plane.
Definition XPMPMultiplayer.cpp:370
XPMPPlaneNotification
Events that trigger a notification callback.
Definition XPMPMultiplayer.h:761
@ xpmp_PlaneNotification_Destroyed
a plane is about to be destroyed
Definition XPMPMultiplayer.h:764
@ xpmp_PlaneNotification_ModelChanged
a plane's model changed
Definition XPMPMultiplayer.h:763
@ xpmp_PlaneNotification_Created
a plane was just created
Definition XPMPMultiplayer.h:762
unsigned int XPMPLightsPattern
Light flash pattern (unused in XPMP2)
Definition XPMPMultiplayer.h:115
unsigned XPMPPlaneID
Unique ID for an aircraft created by a plugin.
Definition XPMPMultiplayer.h:259
bool XPMPSoundIsEnabled()
Is Sound enabled?
Definition Sound.cpp:1083
long size
size of structure
Definition XPMPMultiplayer.h:89
xpmpData_Unchanged
These enumerations define the way the transponder of a given plane is operating.
Definition XPMPMultiplayer.h:249
xpmpData_NewData
Definition XPMPMultiplayer.h:250
float spoilerRatio
spoiler extension ratio [0..1]
Definition XPMPMultiplayer.h:160
float yokeHeading
yoke heading ratio [0..1]
Definition XPMPMultiplayer.h:166
void XPMPDestroyPlane(XPMPPlaneID _id)
[Deprecated] Removes a plane previously created with XPMPCreatePlane()
Definition XPMPMultiplayer.cpp:423
void XPMPSetPlaneVisibility(XPMPPlaneID _id, bool _bVisible)
Show/Hide the aircraft temporarily without destroying the object.
Definition XPMPMultiplayer.cpp:431
void XPMPSetDefaultPlaneICAO(const char *_acIcaoType, const char *_carIcaoType=nullptr)
Define default aircraft and ground vehicle ICAO types.
Definition XPMPMultiplayer.cpp:528
unsigned int lightFlags
this defaults to taxi | beacon | nav lights on
Definition XPMPMultiplayer.h:129
float wingSweep
wing sweep ratio [0..1]
Definition XPMPMultiplayer.h:163
const char * XPMPMultiplayerEnable(void(*_callback)(void *)=nullptr, void *_refCon=nullptr)
Tries to grab control of TCAS targets (formerly known as AI/multiplayer) from X-Plane.
Definition AIMultiplayer.cpp:1099
float propRotDegree
prop rotation angle (degrees 0..360)
Definition XPMPMultiplayer.h:177
float propRotRpm
prop rotation speed (rpm)
Definition XPMPMultiplayer.h:178
XPMPPlaneID XPMPCreatePlaneWithModelName(const char *inModelName, const char *inICAOCode, const char *inAirline, const char *inLivery, XPMPPlaneData_f inDataFunc, void *inRefcon, XPMPPlaneID inModeS_id=0)
Creates a new plane, providing a specific CSL model name.
Definition XPMPMultiplayer.cpp:388
double lon
current position of aircraft (longitude)
Definition XPMPMultiplayer.h:91
bool XPMPContrailsAutoEnabled()
Are automatic Contrails enabled?
Definition Contrail.cpp:299
float tireDeflect
tire deflection (meters)
Definition XPMPMultiplayer.h:171
const char * XPMPSoundEnumerate(const char *prevName, const char **ppFilePath=nullptr)
Enumerate all sounds, including the internal ones.
Definition Sound.cpp:1131
float thrust
thrust ratio [0..1]
Definition XPMPMultiplayer.h:164
void XPMPSetPluginName(const char *inPluginName, const char *inPluginLogAcronym=nullptr)
Overrides the plugin's name to be used in Log output.
Definition XPMPMultiplayer.cpp:224
float speedBrakeRatio
speed brake extension ratio [0..1]
Definition XPMPMultiplayer.h:161
void XPMPMultiplayerCleanup()
Clean up the multiplayer library.
Definition XPMPMultiplayer.cpp:233
int multiIdx
OUT: set by XPMP2 to inform application about TCAS target index in use [1..63], with [1....
Definition XPMPMultiplayer.h:101
void(* XPMPPlaneNotifier_f)(XPMPPlaneID inPlaneID, XPMPPlaneNotification inNotification, void *inRefcon)
Type of the callback function you provide, called when one of the events defined in XPMPPlaneNotifica...
Definition XPMPMultiplayer.h:773
void XPMPDumpOneCycle(void)
Legacy debug-support function, no longer supported.
Definition XPMPMultiplayer.cpp:610
float roll
roll [degrees, positive right]
Definition XPMPMultiplayer.h:94
float tireRotDegree
tire rotation angle (degrees 0..360)
Definition XPMPMultiplayer.h:172
int XPMPGetNumberOfInstalledModels()
Returns the number of loaded CSL models.
Definition XPMPMultiplayer.cpp:277
void XPMPMultiplayerDisable()
Release TCAS targets control.
Definition AIMultiplayer.cpp:1187
bool XPMPSoundEnable(bool bEnable=true)
Enable/Disable Sound.
Definition Sound.cpp:1068
bool XPMPDrawingAircraftLabels()
Returns if labels are currently configured to be drawn.
Definition 2D.cpp:295
float slatRatio
slats extension ratio [0..1]
Definition XPMPMultiplayer.h:162
int XPMPGetPlaneModelQuality(XPMPPlaneID inPlane)
Returns the match quality of the currently used model, or -1 if inPlane is invalid.
Definition XPMPMultiplayer.cpp:494
void XPMPSetPlaneRenderer(XPMPRenderPlanes_f inRenderer, void *inRef)
The original libxplanemp allowed to override rendering; no longer supported.
Definition XPMPMultiplayer.cpp:605
long size
structure size
Definition XPMPMultiplayer.h:157
void XPMPLoadPlanesIfNecessary()
Legacy function only provided for backwards compatibility. Does not actually do anything.
Definition XPMPMultiplayer.cpp:273
void XPMPEnableAircraftLabels(bool _enable=true)
Enable or disable drawing of labels with the aircraft.
Definition 2D.cpp:261
This data structure contains the basic position info for an aircraft.
Definition XPMPMultiplayer.h:88
External physical configuration of the plane.
Definition XPMPMultiplayer.h:156
Defines, which lights of the aircraft are on.
Definition XPMPMultiplayer.h:128
Actual representation of all aircraft in XPMP2.
Definition XPMPAircraft.h:178
Definition XPMPAircraft.h:70