diff --git a/.github/actions/build-lin/README.md b/.github/actions/build-lin/README.md
index ed6a3342..355d9c11 100644
--- a/.github/actions/build-lin/README.md
+++ b/.github/actions/build-lin/README.md
@@ -1,13 +1,13 @@
# build-lin
-This is a custom GitHub action to build an X-Plane plugin on Linux based on a prepared CMake setup.
+This is a custom GitHub action to build a library on Linux based on a prepared CMake setup.
## Parameters
Parameter|Requied|Default|Description
---------|-------|-------|------------
-`pluginName`|yes||Plugin's name, used both as top-level folder name and as file name as required by X-Plane
-`archFolder`|yes|`lin_x64`|Subfolder in which the executable is placed, is based on architecture like 'lin_x64'
+`libName`|yes | |Library's name, used as file name
+`flags` |no | |Flags to be passed to CMake
## What it does
@@ -19,4 +19,4 @@ Parameter|Requied|Default|Description
Output|Description
------|-----------
-`xpl-file-name`|path to the produced xpl file
+`lib-file-name`|path to the produced library
diff --git a/.github/actions/build-lin/action.yml b/.github/actions/build-lin/action.yml
index 24957ffe..94230501 100644
--- a/.github/actions/build-lin/action.yml
+++ b/.github/actions/build-lin/action.yml
@@ -1,20 +1,19 @@
name: Build Linux / CMake
-description: Build on Linux based on a CMake setup
+description: Build library on Linux based on a CMake setup
author: TwinFan
inputs:
- pluginName:
- description: "Plugin's name, used both as top-level folder name and as file name as required by X-Plane"
+ libName:
+ description: "Library's name, used as file name"
required: true
- archFolder:
- description: "Subfolder in which the executable is placed, is based on architecture like 'lin_x64'"
- required: true
- default: lin_x64
+ flags:
+ description: "Flags to be passed to CMake"
+ required: false
outputs:
- xpl-file-name:
- description: Path to the resulting xpl file
- value: ${{ steps.return.outputs.xpl-file-name }}
+ lib-file-name:
+ description: Path to the resulting lib file
+ value: ${{ steps.return.outputs.lib-file-name }}
runs:
using: "composite"
@@ -33,25 +32,25 @@ runs:
run: |
cd build-lin
pwd
- cmake -G Ninja ..
+ cmake -G Ninja ${{ inputs.flags }} ..
- name: Build
shell: bash
run: |
cd build-lin
pwd
- ninja XPMP2 XPMP2-Sample XPMP2-Remote
+ ninja
- name: Test for Target
shell: bash
env:
- TARGET_XPL: build-lin/${{ inputs.archFolder }}/${{ inputs.pluginName }}.xpl
+ TARGET_LIB: build-lin/lib${{ inputs.libName }}.a
run: |
- if [[ ! -f "$TARGET_XPL" ]]; then
- echo Expected target build not found: "$TARGET_XPL"
+ if [[ ! -f "$TARGET_LIB" ]]; then
+ echo Expected target build not found: "$TARGET_LIB"
exit 1
fi
- name: Return Value
id: return
shell: bash
env:
- TARGET_XPL: build-lin/${{ inputs.archFolder }}/${{ inputs.pluginName }}.xpl
- run: echo "::set-output name=xpl-file-name::$(echo $TARGET_XPL)"
+ TARGET_LIB: build-lin/lib${{ inputs.libName }}.a
+ run: echo "lib-file-name=$(echo $TARGET_LIB)" >> $GITHUB_OUTPUT
diff --git a/.github/actions/build-mac/README.md b/.github/actions/build-mac/README.md
index 0ed2cf8b..4e1e0a11 100644
--- a/.github/actions/build-mac/README.md
+++ b/.github/actions/build-mac/README.md
@@ -1,22 +1,23 @@
# build-mac
-This is a custom GitHub action to build an X-Plane plugin on and for MacOS based on a prepared CMake setup.
+This is a custom GitHub action to build a framwork for MacOS based on a prepared CMake setup.
## Inputs
Parameter|Requied|Default|Description
---------|-------|-------|------------
-`pluginName`|yes||Plugin's name, used both as top-level folder name and as file name as required by X-Plane
-`archFolder`|yes|`mac_x64`|Subfolder in which the executable is placed, is based on architecture like 'mac_x64'
+`libName`|yes | |Library's name, used as file name
+`flags` |no | |Flags to be passed to CMake
## What it does
- Installs Ninja
- Creates build folder `build-mac`
- There, runs `cmake`, then `ninja` to build
+- Zips the framework, including the `-y` parameter to preserve symlinks
## Outputs
Output|Description
------|-----------
-`xpl-file-name`|path to the produced xpl file
+`lib-file-name`|path to the produced zip archive of the framework
diff --git a/.github/actions/build-mac/action.yml b/.github/actions/build-mac/action.yml
index e34b65e6..36342d90 100644
--- a/.github/actions/build-mac/action.yml
+++ b/.github/actions/build-mac/action.yml
@@ -3,18 +3,17 @@ description: Build a MacOS plugin based on a CMake setup
author: TwinFan
inputs:
- pluginName:
- description: "Plugin's name, used both as top-level folder name and as file name as required by X-Plane"
+ libName:
+ description: "Library's name, used both as top-level folder name and as file name as required by X-Plane"
required: true
- archFolder:
- description: "Subfolder in which the executable is placed, is based on architecture like 'mac_x64'"
- required: true
- default: mac_x64
+ flags:
+ description: "Flags to be passed to CMake"
+ required: false
outputs:
- xpl-file-name:
- description: Path to the resulting xpl file
- value: ${{ steps.return.outputs.xpl-file-name }}
+ lib-file-name:
+ description: Path to the resulting lib file
+ value: ${{ steps.return.outputs.lib-file-name }}
runs:
using: "composite"
@@ -32,25 +31,27 @@ runs:
run: |
cd build-mac
pwd
- cmake -G Ninja ..
+ cmake -G Ninja ${{ inputs.flags }} ..
- name: Build
shell: bash
run: |
cd build-mac
pwd
- ninja XPMP2 XPMP2-Sample XPMP2-Remote
- - name: Test for Target
+ ninja
+ - name: Test for and Zip Framework
shell: bash
env:
- TARGET_XPL: build-mac/${{ inputs.archFolder }}/${{ inputs.pluginName }}.xpl
+ TARGET_LIB: build-mac/${{ inputs.libName }}.framework
run: |
- if [[ ! -f "$TARGET_XPL" ]]; then
- echo Expected target build not found: "$TARGET_XPL"
+ if [[ ! -d "$TARGET_LIB" ]]; then
+ echo Expected target build not found: "$TARGET_LIB"
exit 1
fi
+ cd build-mac
+ zip -9ry ${{ inputs.libName }}.framework.zip ${{ inputs.libName }}.framework
- name: Return Value
id: return
shell: bash
env:
- TARGET_XPL: build-mac/${{ inputs.archFolder }}/${{ inputs.pluginName }}.xpl
- run: echo "::set-output name=xpl-file-name::$(echo $TARGET_XPL)"
+ TARGET_ZIP: build-mac/${{ inputs.libName }}.framework.zip
+ run: echo "lib-file-name=$(echo $TARGET_ZIP)" >> $GITHUB_OUTPUT
diff --git a/.github/actions/build-win/README.md b/.github/actions/build-win/README.md
index 0ed2cf8b..09cac992 100644
--- a/.github/actions/build-win/README.md
+++ b/.github/actions/build-win/README.md
@@ -1,22 +1,22 @@
-# build-mac
+# build-win
-This is a custom GitHub action to build an X-Plane plugin on and for MacOS based on a prepared CMake setup.
+This is a custom GitHub action to build a library on and for Windows based on a prepared CMake setup.
## Inputs
Parameter|Requied|Default|Description
---------|-------|-------|------------
-`pluginName`|yes||Plugin's name, used both as top-level folder name and as file name as required by X-Plane
-`archFolder`|yes|`mac_x64`|Subfolder in which the executable is placed, is based on architecture like 'mac_x64'
+`libName`|yes | |Library's name, used as file name
+`flags` |no | |Flags to be passed to CMake
## What it does
-- Installs Ninja
-- Creates build folder `build-mac`
-- There, runs `cmake`, then `ninja` to build
+- Runs a separate command file, `build-win.cmd`, which in tun
+- Creates build folder `build-win`
+- There, runs `CMAKE`, then `NMAKE` to build
## Outputs
Output|Description
------|-----------
-`xpl-file-name`|path to the produced xpl file
+`lib-file-name`|path to the produced lib file
diff --git a/.github/actions/build-win/action.yml b/.github/actions/build-win/action.yml
index 63129f0d..02ad4289 100644
--- a/.github/actions/build-win/action.yml
+++ b/.github/actions/build-win/action.yml
@@ -1,45 +1,38 @@
name: Build Windows / MSVC / CMake
-description: Build a Windows plugin with MS Visual Studio based on a CMake setup
+description: Build a Windows library with MS Visual Studio based on a CMake setup
author: TwinFan
inputs:
- pluginName:
- description: "Plugin's name, used both as top-level folder name and as file name as required by X-Plane"
+ libName:
+ description: "Library's name, used as file name"
required: true
- archFolder:
- description: "Subfolder in which the executable is placed, is based on architecture like 'win_x64'"
- required: true
- default: win_x64
+ flags:
+ description: "Flags to be passed to CMake"
+ required: false
outputs:
- xpl-file-name:
- description: Path to the resulting xpl file
- value: ${{ steps.return.outputs.xpl-file-name }}
- pdb-file-name:
- description: Path to the resulting pdb file (debug symbol info)
- value: ${{ steps.return.outputs.pdb-file-name }}
+ lib-file-name:
+ description: Path to the resulting lib
+ value: ${{ steps.return.outputs.lib-file-name }}
runs:
using: "composite"
steps:
- name: Build
shell: cmd
- run: ${{ github.action_path }}\build-win.cmd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" build-win
+ run: ${{ github.action_path }}\build-win.cmd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" build-win "${{ inputs.flags }}"
- name: Test for Target
shell: bash
env:
- TARGET_XPL: build-win/${{ inputs.archFolder }}/${{ inputs.pluginName }}.xpl
+ TARGET_LIB: build-win/${{ inputs.libName }}.lib
run: |
- if [[ ! -f "$TARGET_XPL" ]]; then
- echo Expected target build not found: "$TARGET_XPL"
+ if [[ ! -f "$TARGET_LIB" ]]; then
+ echo Expected target build not found: "$TARGET_LIB"
exit 1
fi
- name: Return Value
id: return
shell: bash
env:
- TARGET_XPL: build-win/${{ inputs.archFolder }}/${{ inputs.pluginName }}.xpl
- TARGET_PDB: build-win/${{ inputs.archFolder }}/${{ inputs.pluginName }}.pdb
- run: |
- echo "::set-output name=xpl-file-name::$(echo $TARGET_XPL)"
- echo "::set-output name=pdb-file-name::$(echo $TARGET_PDB)"
+ TARGET_LIB: build-win/${{ inputs.libName }}.lib
+ run: echo "lib-file-name=$(echo $TARGET_LIB)" >> $GITHUB_OUTPUT
diff --git a/.github/actions/build-win/build-win.cmd b/.github/actions/build-win/build-win.cmd
index d580408a..4bf36ac8 100644
--- a/.github/actions/build-win/build-win.cmd
+++ b/.github/actions/build-win/build-win.cmd
@@ -1,6 +1,7 @@
@ECHO OFF
REM We expect 2 parameters
+REM Additional parameters are passed through to CMake
IF "%~1"=="" GOTO :PRINT_HELP
IF "%~2"=="" GOTO :PRINT_HELP
@@ -20,11 +21,11 @@ PUSHD "%MY_BUILD_DIR%"
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
REM Create Makefile from CMakeLists.txt, using NMake output beacause NMake happens to be available
-CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" -DCMAKE_MAKE_PROGRAM="nmake.exe" -DCMAKE_TOOLCHAIN_FILE="..\docker\Toolchain-msvc-x86-64.cmake" ..
+CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" -DCMAKE_MAKE_PROGRAM="nmake.exe" -DCMAKE_TOOLCHAIN_FILE="..\docker\Toolchain-msvc-x86-64.cmake" %~3 %~4 %~5 ..
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
REM Perform the actual build
-NMAKE /A XPMP2 XPMP2-Sample XPMP2-Remote
+NMAKE /A
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
ECHO Windows Build: SUCCESS!
diff --git a/.github/actions/sign-notarize/README.md b/.github/actions/sign-notarize/README.md
deleted file mode 100644
index 0bf799fc..00000000
--- a/.github/actions/sign-notarize/README.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# sign-notarize
-
-This is a custom GitHub action to sign and then notarize a MacOS X-Plane plugin.
-It waits for Apple's answer to notarization, which can take a couple of minutes!
-
-## Inputs
-
-Parameter|Requied|Default|Description
----------|-------|-------|------------
-`xplFileName`|yes||Path to just built xpl plugin
-`certificate`|yes||Base64 encoded .p12 certificate file
-`certPwd`|yes||Password of the .p12 certificate file
-`notarizeUser`|yes||Apple ID for notarization service (parameter `--apple-id` to `notarytool`)
-`notarizeTeam`|yes||Team ID for notarization service (parameter `--team-id` to `notarytool`)
-`notarizeAppPwd`|yes||[App-specific password](https://support.apple.com/en-gb/HT204397) for notarization service (parameter `--password` to `notarytool`)
-
-## What it does
-
-All actions are performed by script `sign-notarize`, which
-- Creates a temporary keychain to store the passed-in certificate
-- Signs the file provided in `xplFileName`
-- Zips the file and sends it to Apple's notarization service
-- Waits for notarization to finish, which can take a few minutes
diff --git a/.github/actions/sign-notarize/action.yml b/.github/actions/sign-notarize/action.yml
deleted file mode 100644
index e7fd4e63..00000000
--- a/.github/actions/sign-notarize/action.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: Sign/Notarize MacOS plugin
-description: Signs, then notarizes the plugin
-author: TwinFan
-
-inputs:
- xplFileName:
- description: "Path to just built xpl plugin"
- required: true
- certificate:
- description: "Base64 encoded .p12 certificate file"
- required: true
- certPwd:
- description: "Password of the .p12 certificate file"
- required: true
- notarizeUser:
- description: "Apple-ID for notarization"
- required: true
- notarizeTeam:
- description: "Team-ID for notarization"
- required: true
- notarizeAppPwd:
- description: "App-specific password for notarization"
- required: true
-
-runs:
- using: "composite"
- steps:
- - name: Sign and Notarize # is actually all in a shell script
- shell: bash
- run: |
- echo ${{ inputs.certificate }} | base64 --decode > certificate.p12
- chmod a+x ${{ github.action_path }}/sign-notarize
- ${{ github.action_path }}/sign-notarize "${{ inputs.xplFileName }}" certificate.p12 "${{ inputs.certPwd }}" "${{ inputs.notarizeUser }}" "${{ inputs.notarizeTeam }}" "${{ inputs.notarizeAppPwd }}"
diff --git a/.github/actions/sign-notarize/sign-notarize b/.github/actions/sign-notarize/sign-notarize
deleted file mode 100755
index 59793698..00000000
--- a/.github/actions/sign-notarize/sign-notarize
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh
-# Signs and notarizes a MacOS build
-#
-# Parameters
-# 1. Path to file to sign, then notarize
-# 2. Signing ID file like 'certificate.p12'
-# 3. Password for above p12 file
-# 4. Apple ID for notarization (parameter --apple-id to notarytool)
-# 5. Team ID for notarization (parmeter --team-id to notarytool)
-# 6. App-specific password for notarization (parameter --password to notarytool)
-
-set -eu
-
-# --- Cleanup in case of faulty exit
-
-function cleanup {
- echo ">>> Cleanup <<<"
- security delete-keychain build.keychain
-}
-
-# ==================================================================
-# Read parameters
-
-if (( $# < 6 ))
-then
- echo "$0 requires 6 parameters, check script!"
- exit 1
-fi
-
-PATH_TO_FILE=$1
-SIGN_ID_FILE=$2
-SIGN_ID_PWD=$3
-NOTAR_USER=$4
-NOTAR_TEAM=$5
-NOTAR_PWD=$6
-
-# --- Sign
-
-echo .
-echo "--- Sign ---"
-echo .
-
-# Taken from https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions
-# Create a temporary keychain and import the given certificate
-security create-keychain -p NotSoSecretAPwd build.keychain
-trap cleanup EXIT # Make sure the keychain gets removed in case of failure exit
-security default-keychain -s build.keychain
-security unlock-keychain -p NotSoSecretAPwd build.keychain
-security import "$SIGN_ID_FILE" -P "$SIGN_ID_PWD" -k build.keychain -T /usr/bin/codesign
-# Allow some tools to use the keychain
-security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k NotSoSecretAPwd build.keychain
-# Actually sign
-security find-identity -v build.keychain
-export MACOS_IDENTITY=`security find-identity -v build.keychain | egrep -o '[0-9A-F]{40}'`
-echo MACOS_IDENTITY = $MACOS_IDENTITY
-codesign --force --keychain build.keychain -s $MACOS_IDENTITY "$PATH_TO_FILE" -v
-codesign --verify --verbose "$PATH_TO_FILE"
-
-# --- Notarize LiveTraffic and XPMP2-Remote ---
-
-echo .
-echo "--- Notarize ---"
-echo .
-
-# Can only send zip archives to notarization
-zip -v "$PATH_TO_FILE.zip" "$PATH_TO_FILE"
-xcrun notarytool submit --wait --apple-id "$NOTAR_USER" --password "$NOTAR_PWD" --team-id "$NOTAR_TEAM" "$PATH_TO_FILE.zip"
-rm "$PATH_TO_FILE.zip"
-
-# Note: No stapling possible to .xpl files
-
-echo .
-echo "*** SIGNED and NOTARIZED ***"
-exit 0
\ No newline at end of file
diff --git a/.github/actions/upload-plugin/README.md b/.github/actions/upload-plugin/README.md
deleted file mode 100644
index 009d501d..00000000
--- a/.github/actions/upload-plugin/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# upload-plugin
-
-This is a custom GitHub action to upload a just built X-Plane plugin to Github's artifacts for later deployment or download.
-
-## Parameters
-
-Parameter|Requied|Default|Description
----------|-------|-------|------------
-`pluginName`|yes||Plugin's name, used both as top-level folder name and as file name as required by X-Plane
-`archFolder`|yes||Subfolder in which the executable is placed, is based on architecture like 'lin_x64'
-`xplFileName`|yes||Path to the just built xpl file
-
-## What it does
-
-- Organizes the produced plugin in the correct folder structure for deployment
-- and adds it to artifacts.
\ No newline at end of file
diff --git a/.github/actions/upload-plugin/action.yml b/.github/actions/upload-plugin/action.yml
deleted file mode 100644
index 6d74b1e3..00000000
--- a/.github/actions/upload-plugin/action.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: Upload Plugin
-description: Organizes plugin files in correct structure, then uploads as artifact
-author: TwinFan
-
-inputs:
- pluginName:
- description: "Plugin's name, used both as top-level folder name and as file name as required by X-Plane"
- required: true
- archFolder:
- description: "Subfolder in which the executable is placed, is based on architecture like 'lin_x64'"
- required: true
- xplFileName:
- description: "Path to just built xpl plugin"
- required: true
- pdbFileName:
- description: "Path to just built pdb file"
- required: false
-
-runs:
- using: "composite"
- steps:
- - name: Prepare Deployment Structure # moves the plugin, like "build-lin/lin_x64/MyPlugin.xpl", to a deployment structure like "deploy-MyPlugin/MyPlugin/lin_x64/MyPlugin.xpl"
- shell: bash
- run: |
- mkdir -p "deploy-${{ inputs.pluginName }}/${{ inputs.pluginName }}/${{ inputs.archFolder }}"
- mv "${{ inputs.xplFileName }}" "deploy-${{ inputs.pluginName }}/${{ inputs.pluginName }}/${{ inputs.archFolder }}"
- if [[ -n "${{ inputs.pdbFileName }}" ]]; then
- mv "${{ inputs.pdbFileName }}" "deploy-${{ inputs.pluginName }}/${{ inputs.pluginName }}/${{ inputs.archFolder }}"
- fi
- - name: Upload plugin
- uses: actions/upload-artifact@v2
- with:
- name: ${{ inputs.pluginName }}
- path: deploy-${{ inputs.pluginName }}/* # this way the top folder in the artifacts is "MyPlugin"
- if-no-files-found: error
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0fe03816..1ee40d6c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -4,11 +4,17 @@ on:
push:
pull_request:
branches: [ main ]
- workflow_dispatch: # Can also be called manually for whatever reason
+ workflow_dispatch: # Can also be called manually for whatever reason, e.g. if wanting to build with FMOD sound
+ inputs:
+ flags:
+ description: "Flags to be passed to CMake"
+ required: false
+ type: string
+ default: '-DINCLUDE_FMOD_SOUND=1'
# Let's set all project specific definitions globally
env:
- PRJ_NAME: XPMP2-Remote # The plugin's name, expected to be the .xpl file's name and used as the plugin folder name
+ PRJ_NAME: XPMP2
jobs:
#####################################
@@ -17,32 +23,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
- uses: actions/checkout@v2 # must checkout before we can use our own actions
+ uses: actions/checkout@v3 # must checkout before we can use our own actions
- name: Build
uses: ./.github/actions/build-lin
id: build
with:
- pluginName: ${{ env.PRJ_NAME }}
- - name: Upload XPMP2-Remote
- uses: ./.github/actions/upload-plugin
- with:
- pluginName: ${{ env.PRJ_NAME }}
- archFolder: lin_x64
- xplFileName: "${{ steps.build.outputs.xpl-file-name }}"
- - name: Upload XPMP2-Sample
- uses: ./.github/actions/upload-plugin
- with:
- pluginName: XPMP2-Sample
- archFolder: lin_x64
- xplFileName: "./build-lin/lin_x64/XPMP2-Sample.xpl"
+ libName: ${{ env.PRJ_NAME }}
+ flags: ${{ inputs.flags }}
- name: Prepare XPMP2 lib
shell: bash
run: |
mkdir -p deploy-lib/lib/lin
cp -a ./inc deploy-lib
- mv ./build-lin/libXPMP2.a deploy-lib/lib/lin
+ mv ${{ steps.build.outputs.lib-file-name }} deploy-lib/lib/lin
- name: Upload XPMP2 lib
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: XPMP2-lib
path: deploy-lib/* # this way we keep the folder structure in the artifact
@@ -54,52 +49,20 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout Code
- uses: actions/checkout@v2 # must checkout before we can use our own actions
+ uses: actions/checkout@v3 # must checkout before we can use our own actions
- name: Build
uses: ./.github/actions/build-mac
id: build
with:
- pluginName: ${{ env.PRJ_NAME }}
- - name: Check if Secrets available
- id: checksecrets
- env:
- MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
- shell: bash
- run: |
- if [ "$MACOS_CERTIFICATE" == "" ]; then
- echo ::set-output name=secretspresent::
- else
- echo ::set-output name=secretspresent::true
- fi
- - name: Codesign and Notarization
- if: ${{ steps.checksecrets.outputs.secretspresent }}
- uses: ./.github/actions/sign-notarize
- with:
- xplFileName: ${{ steps.build.outputs.xpl-file-name }}
- certificate: ${{ secrets.MACOS_CERTIFICATE }}
- certPwd: ${{ secrets.MACOS_CERT_PWD }}
- notarizeUser: ${{ secrets.NOTARIZATION_USERNAME }}
- notarizeTeam: ${{ secrets.NOTARIZATION_TEAM }}
- notarizeAppPwd: ${{ secrets.NOTARIZATION_PASSWORD }}
- - name: Upload XPMP2-Remote
- uses: ./.github/actions/upload-plugin
- with:
- pluginName: ${{ env.PRJ_NAME }}
- archFolder: mac_x64
- xplFileName: ${{ steps.build.outputs.xpl-file-name }}
- - name: Upload XPMP2-Sample
- uses: ./.github/actions/upload-plugin
- with:
- pluginName: XPMP2-Sample
- archFolder: mac_x64
- xplFileName: "./build-mac/mac_x64/XPMP2-Sample.xpl"
+ libName: ${{ env.PRJ_NAME }}
+ flags: ${{ inputs.flags }}
- name: Prepare XPMP2 Framework
shell: bash
run: |
mkdir -p deploy-lib/lib
- mv ./build-mac/XPMP2.framework deploy-lib/lib
+ mv ${{ steps.build.outputs.lib-file-name }} deploy-lib/lib
- name: Upload XPMP2 Framework
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: XPMP2-lib
path: deploy-lib/* # this way we keep the folder structure in the artifact
@@ -111,33 +74,20 @@ jobs:
runs-on: windows-2022
steps:
- name: Checkout Code
- uses: actions/checkout@v2 # must checkout before we can use our own actions
+ uses: actions/checkout@v3 # must checkout before we can use our own actions
- name: Build
uses: ./.github/actions/build-win
id: build
with:
- pluginName: ${{ env.PRJ_NAME }}
- - name: Upload Artifact
- uses: ./.github/actions/upload-plugin
- with:
- pluginName: ${{ env.PRJ_NAME }}
- archFolder: win_x64
- xplFileName: "${{ steps.build.outputs.xpl-file-name }}"
- pdbFileName: "${{ steps.build.outputs.pdb-file-name }}"
- - name: Upload XPMP2-Sample
- uses: ./.github/actions/upload-plugin
- with:
- pluginName: XPMP2-Sample
- archFolder: win_x64
- xplFileName: "./build-win/win_x64/XPMP2-Sample.xpl"
- pdbFileName: "./build-win/win_x64/XPMP2-Sample.pdb"
+ libName: ${{ env.PRJ_NAME }}
+ flags: ${{ inputs.flags }}
- name: Prepare XPMP2 lib
shell: bash
run: |
mkdir -p deploy-lib/lib/win
- cp ./build-win/XPMP2.lib deploy-lib/lib/win
+ cp ${{ steps.build.outputs.lib-file-name }} deploy-lib/lib/win
- name: Upload XPMP2 lib
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: XPMP2-lib
path: deploy-lib/* # this way we keep the folder structure in the artifact
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 277963c7..e834566f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,12 @@
# Targets XPMP2-Remote and XPMP2-Sample are EXCLUDE_FROM_ALL.
# If you want to build them you have to explicitely state them on the command line, like
# ninja XPMP2-Sample XPMP2-Remote
+#
+# If you want to build with FMOD sound support,
+# 1. Make sure to understand the FMOD license and attribution requirements:
+# https://www.fmod.com/licensing
+# https://www.fmod.com/attribution
+# 2. Define INCLUDE_FMOD_SOUND cache entry, e.g. using `cmake -G Ninja -D INCLUDE_FMOD_SOUND=1 ..`
cmake_minimum_required(VERSION 3.16)
@@ -23,7 +29,7 @@ else()
endif()
project(XPMP2
- VERSION 2.50
+ VERSION 2.60
DESCRIPTION "Multiplayer library for X-Plane 11 and 12")
# Provide compile macros from the above project version definition
@@ -33,6 +39,7 @@ add_compile_definitions(
XPMP2_VER_MINOR=${PROJECT_VERSION_MINOR}
)
+message ("== Building: ${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} ==")
message ("Compiler Info:")
message ("CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}")
message ("CMAKE_CXX_COMPILER_VERSION = ${CMAKE_CXX_COMPILER_VERSION}")
@@ -84,7 +91,7 @@ if (MSVC)
add_compile_options(/wd4996 /wd4068)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
else()
- add_compile_options(-Wall -Wshadow -Wfloat-equal -Wextra -Wno-deprecated-declarations)
+ add_compile_options(-Wall -Wshadow -Wextra -Wno-deprecated-declarations)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0 AND NOT APPLE)
add_compile_options(-Wno-stringop-truncation)
endif()
@@ -105,7 +112,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug")
if (MSVC)
add_compile_options(/Zi)
else()
- add_compile_options(-O0 -g)
+ add_compile_options(-O0 -g -fPIC)
endif()
else()
add_compile_definitions(NDEBUG=1)
@@ -122,10 +129,10 @@ else()
endif()
endif()
-# Mingw Threads
-if (MINGW)
+# Mingw Threads (if not already defined by an outer target)
+if (MINGW AND NOT TARGET mingw_stdthreads)
option(MINGW_STDTHREADS_GENERATE_STDHEADERS "" ON)
- add_subdirectory(XPMP2-Sample/mingw-std-threads)
+ add_subdirectory(lib/mingw-std-threads)
endif()
################################################################################
@@ -170,17 +177,38 @@ target_include_directories(XPMP2
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/inc
PRIVATE
- ${CMAKE_CURRENT_SOURCE_DIR}/XPMP2-Sample/SDK/CHeaders/XPLM
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib/SDK/CHeaders/XPLM
${CMAKE_CURRENT_SOURCE_DIR}/src
)
+# Some files are known to do float comparison, but are good with that
+if (NOT MSVC)
+ set_source_files_properties(
+ src/Remote.cpp
+ src/Sound.cpp
+ PROPERTIES
+ COMPILE_FLAGS -Wno-float-equal)
+endif()
+
# Include MingW threads
if (MINGW)
target_link_libraries(XPMP2 mingw_stdthreads)
endif()
+# FMOD Library support if requested
+# (The actual FMOD lib is not included here, that needs to be done by the plugin target)
+if(INCLUDE_FMOD_SOUND)
+ # Compile options
+ add_compile_definitions(INCLUDE_FMOD_SOUND)
+ target_include_directories(XPMP2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/fmod/inc)
+ target_sources(XPMP2 PRIVATE
+ src/Sound.h
+ src/Sound.cpp
+ )
+endif()
+
+# make it a framework
if(APPLE)
- # make it a framework
list(APPEND XPMP2_PUB_HEADERS
../inc/XPCAircraft.h
../inc/XPMPAircraft.h
@@ -199,191 +227,3 @@ if(APPLE)
PUBLIC_HEADER "${XPMP2_PUB_HEADERS}"
)
endif()
-
-# Copy the resulting framework/library also into the 'lib' directory of the sample plugin
-if(APPLE)
- add_custom_command(TARGET XPMP2 POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_SOURCE_DIR}/XPMP2-Sample/lib/XPMP2.framework
- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/XPMP2-Sample/lib/XPMP2.framework
- COMMAND cp -a $
Change log:
- -XPMP2-Remote/Activate
and
- XPMP2-Remote/TCAS
for menu items
- Activate and TCAS Control
- to bind keyboard shortcuts to them or trigger them via CMND network message.First public version.
- - - diff --git a/XPMP2-Sample/.gitignore b/XPMP2-Sample/.gitignore deleted file mode 100644 index b9ee09a9..00000000 --- a/XPMP2-Sample/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.DS_Store -.localized -.image* -.vs/ -.vscode/ - -# Build directories -build*/* - -# XCode user specific files -xcuserdata/ -*.xcworkspace/ -*.mode1v3 -*.mode2v3 -*.perspectivev3 -*.pbxuser diff --git a/XPMP2-Sample/CMakeLists.txt b/XPMP2-Sample/CMakeLists.txt deleted file mode 100644 index 0b891f66..00000000 --- a/XPMP2-Sample/CMakeLists.txt +++ /dev/null @@ -1,210 +0,0 @@ -# XPMP2 - Set up to be used in the provided docker environment to build lin and mac -# Set up to be used in a Visual Studio environment to build win (File > Open > Folder, then VS recognized the CMAKE configuration) - -cmake_minimum_required(VERSION 3.16) - -# Mac: Need to tell early on that we want a cross platform build -if(DEFINED ENV{platform}) - message ("-- Platform is $ENV{platform}") - if($ENV{platform} STREQUAL "mac-x86") - message (" Building cross-platform for mac/x86_64") - set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Archs to build") - elseif($ENV{platform} STREQUAL "mac-arm") - message (" Building cross-platform for mac/arm64") - set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "Archs to build") - endif() -else() - # No 'platform' defined could mean running from command line, assume we build universal image in one go via XCode - set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Archs to build") -endif() - -project(XPMP2-Sample - VERSION 2.50 - DESCRIPTION "XPMP2-Sample X-Plane plugin") - -# Provide compile macros from the above project version definition -add_compile_definitions( - XPMP2_VERSION="${PROJECT_VERSION}" - XPMP2_VER_MAJOR=${PROJECT_VERSION_MAJOR} - XPMP2_VER_MINOR=${PROJECT_VERSION_MINOR} -) - -message ("Compiler Info:") -message ("CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}") -message ("CMAKE_CXX_COMPILER_VERSION = ${CMAKE_CXX_COMPILER_VERSION}") -message ("CMAKE_CXX_COMPILER = ${CMAKE_CXX_COMPILER}") -message ("WIN32 / MSVC / MINGW = ${WIN32} / ${MSVC} / ${MINGW}") -message ("UNIX / APPLE = ${UNIX} / ${APPLE}") -if (APPLE) - message ("OSX_SDK_PATH = $ENV{OSX_SDK_PATH}") - message ("CMAKE_OSX_ARCHITECTURES = ${CMAKE_OSX_ARCHITECTURES}") -endif() - -################################################################################ -# Target Systems -################################################################################ - -# Windows: Target Windows 7.0 and later -if (WIN32) - add_compile_definitions(_WIN32_WINNT=0x0601) - if (NOT DEFINED ENV{platform}) - set(ENV{platform} "win") - endif() -elseif(APPLE) - set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0) - add_compile_options(-mmacosx-version-min=11.0) - add_link_options(-mmacosx-version-min=11.0) -endif() - -################################################################################ -# C++ Standard required -################################################################################ - -set(CMAKE_CXX_STANDARD 17) -set_property(GLOBAL PROPERTY CXX_STANDARD_REQUIRED 17) -set_property(GLOBAL PROPERTY CXX_STANDARD 17) - -################################################################################ -# Compile Options -################################################################################ - -# Enable all X-Plane SDK APIs up to the newest version. -add_compile_definitions(XPLM200=1 XPLM210=1 XPLM300=1 XPLM301=1 XPLM303=1) - -# Define platform macros. -add_compile_definitions(APL=$
diff --git a/docs/html/2D_8h.html b/docs/html/2D_8h.html
index eef2774f..ac772811 100644
--- a/docs/html/2D_8h.html
+++ b/docs/html/2D_8h.html
@@ -59,6 +59,7 @@
Namespaces | Defined by FMOD. | | |
diff --git a/docs/html/2D_8h_source.html b/docs/html/2D_8h_source.html
index 8ff34709..7a1a201b 100644
--- a/docs/html/2D_8h_source.html
+++ b/docs/html/2D_8h_source.html
@@ -63,10 +63,10 @@
-Definition: XPMPAircraft.h:41 | XPMP2 | | Namespaces | Defined by FMOD. |
@@ -161,7 +162,7 @@
| Release TCAS targets control. More... | | | Has XPMP2 control of TCAS targets? More... | | |
XPMP2 Remote Client: Displays aircraft served from other XPMP2-based plugins in the network.
+XPMP2 Remote Client: Displays aircraft served from other XPMP2-based plugins in the network.
This plugin is intended to be used in a multi-computer simulator setup, usually in the PCs used for external visuals.
The typical setup would be:
Technically, this works as follows:
Short ID used in XPMP2 log entries.
+Short ID used in XPMP2 log entries.
Version number for the XPMP2 Remote plugin.
+Version number for the XPMP2 Remote plugin.
diff --git a/docs/html/XPMP2-Sample_8cpp.html b/docs/html/XPMP2-Sample_8cpp.html index ccd57519..4339e890 100644 --- a/docs/html/XPMP2-Sample_8cpp.html +++ b/docs/html/XPMP2-Sample_8cpp.html @@ -45,6 +45,7 @@Example plugin demonstrating XPMP2 techniques. +
Example plugin demonstrating XPMP2 techniques. More...
#include <cstdio>
#include <cstdarg>
+Enumerations | |
enum | MenuItemsTy { + MENU_PLANES = 0 +, MENU_VISIBLE +, MENU_FREEZE +, MENU_CYCLE_MDL +, + MENU_REMATCH_MDL +, MENU_AI + + } |
List of all menu item indexes. More... | |
Functions | |
void | LogMsg (const char *szMsg,...) |
Log a message to X-Plane's Log.txt with sprintf-style parameters. More... | |
int | CBIntPrefsFunc (const char *, [[maybe_unused]] const char *item, int defaultVal) |
This is a callback the XPMP2 calls regularly to learn about configuration settings. More... | |
void | CBPlaneNotifier (XPMPPlaneID inPlaneID, XPMPPlaneNotification inNotification, void *) |
Handles requests for plane's informational texts. More... | |
XPMPPlaneCallbackResult | CBPlaneData (XPMPPlaneID inPlane, XPMPPlaneDataType inDataType, void *ioData, void *) |
Callback function handed to XPMP2, will be called in every drawing frame to deliver plane position and configuration. More... | |
Callback function handed to XPMP2, will be called in every drawing frame to deliver plane position and configuration. More... | |
bool | ArePlanesCreated () |
Is any plane object created? More... | |
std::string | PLANE_MODEL [3][3] |
bool | gbFreeze = false |
Freeze all movements at the moment? More... | |
constexpr float | PLANE_DIST_M = 200.0f |
Distance of our simulated planes to the user's plane's position? [m]. More... | |
Example plugin demonstrating XPMP2 techniques.
-This plugin creates 3 planes, one with each of the available ways of using the XPMP2 library. All planes move in a circle around a position 200m in front of the user's plane (even if the user plane moves).
+Example plugin demonstrating XPMP2 techniques.
+This plugin creates 3 planes, one with each of the available ways of using the XPMP2 library. All planes move in a circle around a position 200m in front of the user's plane (even if the user plane moves).
enum MenuItemsTy | +
List of all menu item indexes.
+Enumerator | |
---|---|
MENU_PLANES | Menu Item "Toggle Planes". + |
MENU_VISIBLE | Menu Item "Toggle Visibility". + |
MENU_FREEZE | Menu Item "Freeze". + |
MENU_CYCLE_MDL | Menu Item "Cycle Models". + |
MENU_REMATCH_MDL | Menu Item "Rematch Models". + |
MENU_AI | Menu Item "Toggle AI control". + |
This is a callback the XPMP2 calls regularly to learn about configuration settings. Only 3 are left, all of them integers.
+ +This is a callback the XPMP2 calls regularly to learn about configuration settings.
Callback function handed to XPMP2, will be called in every drawing frame to deliver plane position and configuration.
+Callback function handed to XPMP2, will be called in every drawing frame to deliver plane position and configuration.
Returns a number between 0.0 and 1.0, increasing over the course of 10 seconds, then restarting. @@ -631,9 +675,6 @@
Detailed Description-XPMP2::Aircraft represent an aircraft as managed by XPMP2. -New implementations should derive directly from XPMP2::Aircraft. -
XPMP2::Aircraft represent an aircraft as managed by XPMP2. +New implementations should derive directly from XPMP2::Aircraft. +This is one of two main header files for using XPMP2. (The other is
Go to the documentation of this file.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- 107 };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 141 };
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 329 bool ShowAsAIPlane () const { return IsVisible() && acRadar.mode != xpmpTransponderMode_Standby; }
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 321 };
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
-
-
- 362 CSLModelInfo_t GetModelInfo() const { return pCSLMdl ? CSLModelInfo_t(*pCSLMdl) : CSLModelInfo_t(); }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 422 void SetLocation (double lat, double lon, double alt_ft, bool on_grnd, float setTouchDownTime = NAN) {
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 412 bool ShowAsAIPlane () const { return IsVisible() && acRadar.mode != xpmpTransponderMode_Standby; }
+
+
+
+
+
+
+
+
- 435 void SetLocalLoc (float _x, float _y, float _z) { drawInfo.x = _x; drawInfo.y = _y; drawInfo.z = _z; }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ 450 CSLModelInfo_t GetModelInfo() const { return pCSLMdl ? CSLModelInfo_t(*pCSLMdl) : CSLModelInfo_t(); }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 517 void SetLocation (double lat, double lon, double alt_ft, bool on_grnd, float setTouchDownTime = NAN) {
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 530 void SetLocalLoc (float _x, float _y, float _z) { drawInfo.x = _x; drawInfo.y = _y; drawInfo.z = _z; }
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Initialization and general control functions for XPMP2. XPMPTransponderMode mode current radar mode, if not xpmpTransponderMode_Standby then is plane considered for TCAS display Definition: XPMPMultiplayer.h:192 unsigned XPMPPlaneID Unique ID for an aircraft created by a plugin. Definition: XPMPMultiplayer.h:243 @ xpmpTransponderMode_Standby transponder is in standby, not currently sending -> aircraft not visible on TCAS Definition: XPMPMultiplayer.h:180 Textual information of planes to be passed on via shared dataRefs to other plugins. Definition: XPMPMultiplayer.h:199 defines information about an aircraft visible to radar. Definition: XPMPMultiplayer.h:189 bool GetLightsBeacon() const Beacon lights. Definition: XPMPAircraft.h:476 XPMPTransponderMode mode current radar mode, if not xpmpTransponderMode_Standby then is plane considered for TCAS display Definition: XPMPMultiplayer.h:201 unsigned XPMPPlaneID Unique ID for an aircraft created by a plugin. Definition: XPMPMultiplayer.h:252 @ xpmpTransponderMode_Standby transponder is in standby, not currently sending -> aircraft not visible on TCAS Definition: XPMPMultiplayer.h:189 Textual information of planes to be passed on via shared dataRefs to other plugins. Definition: XPMPMultiplayer.h:208 defines information about an aircraft visible to radar. Definition: XPMPMultiplayer.h:198 bool GetLightsBeacon() const Beacon lights. Definition: XPMPAircraft.h:577 virtual void UpdatePosition(float _elapsedSinceLastCall, int _flCounter)=0 Called right before updating the aircraft's placement in the world. float GetGearRatio() const Gear deploy ratio. Definition: XPMPAircraft.h:447 void SetLocalLoc(float _x, float _y, float _z) Sets location in local world coordinates. Definition: XPMPAircraft.h:435 float GetThrustReversRatio() const Thrust reversers ratio. Definition: XPMPAircraft.h:469 std::string label aircraft label shown in the 3D world next to the plane Definition: XPMPAircraft.h:184 void SetLightsNav(bool _b) Navigation lights. Definition: XPMPAircraft.h:481 float GetNoseWheelAngle() const Nose Wheel angle in degrees. Definition: XPMPAircraft.h:449 bool IsRendered() const Is this plane to be rendered? Definition: XPMPAircraft.h:381 float GetVertOfs() const Vertical offset, ie. the value that needs to be added to drawInfo.y to make the aircraft appear on th... Definition: Aircraft.cpp:476 float GetSpeedbrakeRatio() const Speedbrakes deploy ratio. Definition: XPMPAircraft.h:455 std::string acIcaoType ICAO aircraft type designator of this plane. Definition: XPMPAircraft.h:161 CSLModelInfo_t GetModelInfo() const return an information structure for the CSL model associated with the aircraft Definition: XPMPAircraft.h:362 XPLMProbeRef hProbe Y Probe for terrain testing, needed in ground clamping. Definition: XPMPAircraft.h:265 int GetWakeCat() const Category between 0=light and 3=Super, derived from WTC. Definition: Aircraft.cpp:486 void SetSpoilerRatio(float _f) Spoilers deploy ratio. Definition: XPMPAircraft.h:454 SndChTy aSndCh[SND_NUM_EVENTS] Operational values per sound channel, that is triggered by a standard sound event. Definition: XPMPAircraft.h:339 float GetGearRatio() const Gear deploy ratio. Definition: XPMPAircraft.h:548 void SetLocalLoc(float _x, float _y, float _z) Sets location in local world coordinates. Definition: XPMPAircraft.h:530 float GetThrustReversRatio() const Thrust reversers ratio. Definition: XPMPAircraft.h:570 float lastDRVal last observed dataRef value to see if sound is to be triggered Definition: XPMPAircraft.h:329 std::string label aircraft label shown in the 3D world next to the plane Definition: XPMPAircraft.h:218 void SetLightsNav(bool _b) Navigation lights. Definition: XPMPAircraft.h:582 float GetNoseWheelAngle() const Nose Wheel angle in degrees. Definition: XPMPAircraft.h:550 bool IsRendered() const Is this plane to be rendered? Definition: XPMPAircraft.h:474 float GetVertOfs() const Vertical offset, ie. the value that needs to be added to drawInfo.y to make the aircraft appear on th... Definition: Aircraft.cpp:490 float GetSpeedbrakeRatio() const Speedbrakes deploy ratio. Definition: XPMPAircraft.h:556 std::string acIcaoType ICAO aircraft type designator of this plane. Definition: XPMPAircraft.h:195 CSLModelInfo_t GetModelInfo() const return an information structure for the CSL model associated with the aircraft Definition: XPMPAircraft.h:450 XPLMProbeRef hProbe Y Probe for terrain testing, needed in ground clamping. Definition: XPMPAircraft.h:301 int GetWakeCat() const Category between 0=light and 3=Super, derived from WTC. Definition: Aircraft.cpp:500 void SetSpoilerRatio(float _f) Spoilers deploy ratio. Definition: XPMPAircraft.h:555 void MapDrawLabel(XPLMMapLayerID inLayer, float yOfs) Actually draw the map label. Definition: Map.cpp:151 bool IsCurrentlyShownAsTcasTarget() const Is this plane currently also being tracked as a TCAS target, ie. will appear on TCAS? Definition: XPMPAircraft.h:325 bool IsCurrentlyShownAsTcasTarget() const Is this plane currently also being tracked as a TCAS target, ie. will appear on TCAS? Definition: XPMPAircraft.h:408 bool IsCurrentlyShownAsAI() const Is this plane currently also being tracked by X-Plane's classic AI/multiplayer? Definition: AIMultiplayer.cpp:217 virtual void SetRender(bool _bRender) Switch rendering of the CSL model on or off. Definition: Aircraft.cpp:848 float vertOfsRatio How much of the vertical offset shall be applied? (This allows phasing out the vertical offset in hig... Definition: XPMPAircraft.h:189 int GetTcasTargetIdx() const return the current TCAS target index (into sim/cockpit2/tcas/targets), 1-based, -1 if not used Definition: XPMPAircraft.h:323 int aiPrio Priority for display in one of the limited number of TCAS target slots. Definition: XPMPAircraft.h:209 XPMP2::CSLModel * GetModel() const return a pointer to the CSL model in use (Note: The CSLModel structure is not public.... Definition: XPMPAircraft.h:358 void SetEngineRotRpm(float _rpm) Engine rotation speed [rpm], also sets [rad/s] and engines 1..4. Definition: Aircraft.cpp:739 float GetEngineRotAngle() const Engine rotation angle [degree]. Definition: XPMPAircraft.h:496 float GetPropRotAngle() const Propellor rotation angle [degree]. Definition: XPMPAircraft.h:513 std::string acIcaoAirline ICAO Airline code of this plane. Definition: XPMPAircraft.h:162 float GetNoseGearDeflection() const Vertical nose gear deflection [meter]. Definition: XPMPAircraft.h:483 virtual void SetRender(bool _bRender) Switch rendering of the CSL model on or off. Definition: Aircraft.cpp:878 float vertOfsRatio How much of the vertical offset shall be applied? (This allows phasing out the vertical offset in hig... Definition: XPMPAircraft.h:223 int GetTcasTargetIdx() const return the current TCAS target index (into sim/cockpit2/tcas/targets), 1-based, -1 if not used Definition: XPMPAircraft.h:406 int aiPrio Priority for display in one of the limited number of TCAS target slots. Definition: XPMPAircraft.h:243 XPMP2::CSLModel * GetModel() const return a pointer to the CSL model in use (Note: The CSLModel structure is not public.... Definition: XPMPAircraft.h:446 void SetEngineRotRpm(float _rpm) Engine rotation speed [rpm], also sets [rad/s] and engines 1..4. Definition: Aircraft.cpp:764 float GetEngineRotAngle() const Engine rotation angle [degree]. Definition: XPMPAircraft.h:597 float GetPropRotAngle() const Propellor rotation angle [degree]. Definition: XPMPAircraft.h:614 std::string acIcaoAirline ICAO Airline code of this plane. Definition: XPMPAircraft.h:196 float GetNoseGearDeflection() const Vertical nose gear deflection [meter]. Definition: XPMPAircraft.h:584 virtual void ComputeMapLabel() Put together the map label. Definition: Map.cpp:165 virtual void SetVisible(bool _bVisible) Make the plane (in)visible. Definition: Aircraft.cpp:831 float camDist Distance to camera in meters (updated internally regularly) Definition: XPMPAircraft.h:260 virtual std::string GetFlightId() const Return a value for dataRef .../tcas/target/flight_id. Definition: Aircraft.cpp:336 float mapX temporary: map coordinates (NAN = not to be drawn) Definition: XPMPAircraft.h:270 float camBearing Bearing from camera in degrees (updated internally regularly) Definition: XPMPAircraft.h:262 virtual void SetVisible(bool _bVisible) Make the plane (in)visible. Definition: Aircraft.cpp:856 float camDist Distance to camera in meters (updated internally regularly) Definition: XPMPAircraft.h:296 virtual std::string GetFlightId() const Return a value for dataRef .../tcas/target/flight_id. Definition: Aircraft.cpp:346 float mapX temporary: map coordinates (NAN = not to be drawn) Definition: XPMPAircraft.h:306 float camBearing Bearing from camera in degrees (updated internally regularly) Definition: XPMPAircraft.h:298 bool GetLightsLanding() const Landing lights. Definition: XPMPAircraft.h:474 float GetTireRotRpm() const Tire rotation speed [rpm]. Definition: XPMPAircraft.h:489 bool GetLightsLanding() const Landing lights. Definition: XPMPAircraft.h:575 float GetTireRotRpm() const Tire rotation speed [rpm]. Definition: XPMPAircraft.h:590 Aircraft() Default constructor creates an empty, invalid(!) and invisible shell; call XPMP2::Aircraft::Create() ... Definition: Aircraft.cpp:204 bool GetLightsStrobe() const Strobe lights. Definition: XPMPAircraft.h:478 float GetEngineRotAngle(size_t idx) const < Engine rotation angle [degree] for engine idx (1..4) Definition: XPMPAircraft.h:503 float GetThrustRatio() const Thrust ratio. Definition: XPMPAircraft.h:461 void SetGearRatio(float _f) Gear deploy ratio. Definition: XPMPAircraft.h:448 float GetSpoilerRatio() const Spoilers deploy ratio. Definition: XPMPAircraft.h:453 bool GetTouchDown() const Moment of touch down. Definition: XPMPAircraft.h:525 void SetThrustReversRatio(float _f) Thrust reversers ratio. Definition: XPMPAircraft.h:470 float GetTireRotAngle() const Tire rotation angle [degree]. Definition: XPMPAircraft.h:487 float GetCameraBearing() const Bearing from camera [°]. Definition: XPMPAircraft.h:394 void SetLightsStrobe(bool _b) Strobe lights. Definition: XPMPAircraft.h:479 virtual void SetTcasTargetIdx(int _idx) Define the TCAS target index in use. Definition: XPMPAircraft.h:580 bool bVisible Shall this plane be drawn at the moment and be visible to TCAS/interfaces? Definition: XPMPAircraft.h:238 int matchQuality quality of the match with the CSL model Definition: XPMPAircraft.h:242 friend size_t AIUpdateTCASTargets() The modern way: Use TCAS override and update TCAS targets. Definition: AIMultiplayer.cpp:343 void SetNoseWheelAngle(float _f) Nose Wheel angle in degrees. Definition: XPMPAircraft.h:450 XPMPPlaneID GetModeS_ID() const return the XPMP2 plane id Definition: XPMPAircraft.h:315 void SetSpeedbrakeRatio(float _f) Speedbrakes deploy ratio. Definition: XPMPAircraft.h:456 friend void AIMultiUpdate() Updates all TCAS target dataRefs, both standard X-Plane, as well as additional shared dataRefs for te... Definition: AIMultiplayer.cpp:606 bool AssignModel(const std::string &_cslId, CSLModel *_pCSLModel=nullptr) Assigns the given model. Definition: Aircraft.cpp:409 void DestroyInstances() Destroy all instances. Definition: Aircraft.cpp:663 void SetTireDeflection(float _mtr) Vertical (main) gear deflection [meter]. Definition: XPMPAircraft.h:486 void SetLightsLanding(bool _b) Landing lights. Definition: XPMPAircraft.h:475 std::list< XPLMInstanceRef > listInst X-Plane instance handles for all objects making up the model. Definition: XPMPAircraft.h:253 bool IsOnGrnd() const Is the aircraft on the ground? Definition: XPMPAircraft.h:407 float GetTireDeflection() const Vertical (main) gear deflection [meter]. Definition: XPMPAircraft.h:485 void SetYokeHeadingRatio(float _f) Yoke heading ratio. Definition: XPMPAircraft.h:466 bool IsRelatedTo(const std::string &_icaoType) const Is this object "related" to the given ICAO code? (named in the same line in related.... Definition: Aircraft.cpp:325 bool IsInstanciated() const Are instances created for this aircraft? Definition: XPMPAircraft.h:384 XPMPPlaneID modeS_id A plane is uniquely identified by a 24bit number [0x01..0xFFFFFF]. Definition: XPMPAircraft.h:156 virtual std::string SoundGetName(SoundEventsTy sndEvent, float &volAdj) const Returns the name of the sound to play per event. Definition: Sound.cpp:505 bool GetLightsStrobe() const Strobe lights. Definition: XPMPAircraft.h:579 bool bChnLowPass Is Low Pass Filter currently being active? Definition: XPMPAircraft.h:341 float GetEngineRotAngle(size_t idx) const < Engine rotation angle [degree] for engine idx (1..4) Definition: XPMPAircraft.h:604 float GetThrustRatio() const Thrust ratio. Definition: XPMPAircraft.h:562 void SetGearRatio(float _f) Gear deploy ratio. Definition: XPMPAircraft.h:549 float GetSpoilerRatio() const Spoilers deploy ratio. Definition: XPMPAircraft.h:554 bool GetTouchDown() const Moment of touch down. Definition: XPMPAircraft.h:626 void SetThrustReversRatio(float _f) Thrust reversers ratio. Definition: XPMPAircraft.h:571 float GetTireRotAngle() const Tire rotation angle [degree]. Definition: XPMPAircraft.h:588 float GetCameraBearing() const Bearing from camera [°]. Definition: XPMPAircraft.h:487 void SetLightsStrobe(bool _b) Strobe lights. Definition: XPMPAircraft.h:580 virtual void SetTcasTargetIdx(int _idx) Define the TCAS target index in use. Definition: XPMPAircraft.h:732 SoundEventsTy Types of sound supported directly by XPMP2. Definition: XPMPAircraft.h:314 @ SND_FLAPS Flaps extending/retracting (once per event), bases on GetFlapRatio() Definition: XPMPAircraft.h:319 @ SND_TIRE Tires rolling on the ground (continuously while rolling on ground), bases on GetTireRotRpm() Definition: XPMPAircraft.h:317 @ SND_GEAR Gear extending/retracting (once per event), bases on GetGearRatio() Definition: XPMPAircraft.h:318 @ SND_REVERSE_THRUST Engine sound while reverse thrust (continuously while reversers deployed), bases on GetThrustReversRa... Definition: XPMPAircraft.h:316 @ SND_ENG Engine sound (continuously while engine running), bases on GetThrustRatio() Definition: XPMPAircraft.h:315 @ SND_NUM_EVENTS Number of events (always last in enum) Definition: XPMPAircraft.h:320 bool bVisible Shall this plane be drawn at the moment and be visible to TCAS/interfaces? Definition: XPMPAircraft.h:272 FMOD_CHANNEL * pChn channel playing the sound currently Definition: XPMPAircraft.h:328 int matchQuality quality of the match with the CSL model Definition: XPMPAircraft.h:276 friend size_t AIUpdateTCASTargets() The modern way: Use TCAS override and update TCAS targets. Definition: AIMultiplayer.cpp:345 void SetNoseWheelAngle(float _f) Nose Wheel angle in degrees. Definition: XPMPAircraft.h:551 XPMPPlaneID GetModeS_ID() const return the XPMP2 plane id Definition: XPMPAircraft.h:398 void SetSpeedbrakeRatio(float _f) Speedbrakes deploy ratio. Definition: XPMPAircraft.h:557 void SoundStop(FMOD_CHANNEL *pChn) Stop a continuously playing sound. Definition: Sound.cpp:478 friend void AIMultiUpdate() Updates all TCAS target dataRefs, both standard X-Plane, as well as additional shared dataRefs for te... Definition: AIMultiplayer.cpp:608 bool AssignModel(const std::string &_cslId, CSLModel *_pCSLModel=nullptr) Assigns the given model. Definition: Aircraft.cpp:423 void DestroyInstances() Destroy all instances. Definition: Aircraft.cpp:688 void SetTireDeflection(float _mtr) Vertical (main) gear deflection [meter]. Definition: XPMPAircraft.h:587 void SetLightsLanding(bool _b) Landing lights. Definition: XPMPAircraft.h:576 std::list< XPLMInstanceRef > listInst X-Plane instance handles for all objects making up the model. Definition: XPMPAircraft.h:289 bool IsOnGrnd() const Is the aircraft on the ground? Definition: XPMPAircraft.h:500 float GetGS_kn() const Rough estimate of a ground speed based on v_x/z Definition: XPMPAircraft.h:541 float GetTireDeflection() const Vertical (main) gear deflection [meter]. Definition: XPMPAircraft.h:586 void SetYokeHeadingRatio(float _f) Yoke heading ratio. Definition: XPMPAircraft.h:567 bool IsRelatedTo(const std::string &_icaoType) const Is this object "related" to the given ICAO code? (named in the same line in related.... Definition: Aircraft.cpp:335 bool IsInstanciated() const Are instances created for this aircraft? Definition: XPMPAircraft.h:477 XPMPPlaneID modeS_id A plane is uniquely identified by a 24bit number [0x01..0xFFFFFF]. Definition: XPMPAircraft.h:190 void MapPreparePos(XPLMMapProjectionID projection, const float boundsLTRB[4]) Prepare map coordinates. Definition: Map.cpp:116 int tcasTargetIdx Which sim/cockpit2/tcas/targets-index does this plane occupy? [1..63], -1 if none. Definition: XPMPAircraft.h:255 void SetFlapRatio(float _f) Flaps deploy ratio. Definition: XPMPAircraft.h:452 bool ShowAsAIPlane() const Is this plane to be drawn on TCAS? (It will if transponder is not switched off) Definition: XPMPAircraft.h:329 float GetTireRotRad() const Tire rotation speed [rad/s]. Definition: XPMPAircraft.h:492 void DoMove() Internal: This puts the instance into XP's sky and makes it move. Definition: Aircraft.cpp:569 float gearDeflectRatio By how much of the gear deflection shall the plane's altitude be reduced? Definition: XPMPAircraft.h:196 void SetLightsBeacon(bool _b) Beacon lights. Definition: XPMPAircraft.h:477 virtual float GetLift() const Lift produced. You should override to blend in/out for take-off/landing, but XPMP2 has no dynamic inf... Definition: XPMPAircraft.h:547 float GetPropRotRpm() const Propellor rotation speed [rpm]. Definition: XPMPAircraft.h:515 int tcasTargetIdx Which sim/cockpit2/tcas/targets-index does this plane occupy? [1..63], -1 if none. Definition: XPMPAircraft.h:291 void SetFlapRatio(float _f) Flaps deploy ratio. Definition: XPMPAircraft.h:553 bool ShowAsAIPlane() const Is this plane to be drawn on TCAS? (It will if transponder is not switched off) Definition: XPMPAircraft.h:412 float GetTireRotRad() const Tire rotation speed [rad/s]. Definition: XPMPAircraft.h:593 void DoMove() Internal: This puts the instance into XP's sky and makes it move. Definition: Aircraft.cpp:594 float gearDeflectRatio By how much of the gear deflection shall the plane's altitude be reduced? Definition: XPMPAircraft.h:230 void SetLightsBeacon(bool _b) Beacon lights. Definition: XPMPAircraft.h:578 virtual float GetLift() const Lift produced. You should override to blend in/out for take-off/landing, but XPMP2 has no dynamic inf... Definition: XPMPAircraft.h:653 float GetPropRotRpm() const Propellor rotation speed [rpm]. Definition: XPMPAircraft.h:616 Aircraft & operator=(const Aircraft &)=delete Aircraft must not be copied as they reference non-copyable resources like XP instances. void Create(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="", CSLModel *_pCSLModel=nullptr) Creates a plane, only a valid operation if object was created using the default constructor. Definition: Aircraft.cpp:237 void SetPropRotAngle(float _deg) Propellor rotation angle [degree]. Definition: XPMPAircraft.h:514 void SetSlatRatio(float _f) Slats deploy ratio. Definition: XPMPAircraft.h:458 bool IsGroundVehicle() const Is this object a ground vehicle? Definition: Aircraft.cpp:318 static float FlightLoopCB(float, float, int, void *) Internal: Flight loop callback function controlling update and movement of all planes. Definition: Aircraft.cpp:492 XPLMDrawInfo_t drawInfo Holds position (in local coordinates!) and orientation (pitch, heading roll) of the aircraft. Definition: XPMPAircraft.h:169 float GetYokePitchRatio() const Yoke pitch ratio. Definition: XPMPAircraft.h:463 void SetOnGrnd(bool on_grnd, float setTouchDownTime=NAN) Set if the aircraft is on the ground. Definition: Aircraft.cpp:685 void SetDrawLabel(bool _b) Define if this aircraft's label is to be drawn (provided label drawing is enabled globally) Definition: XPMPAircraft.h:387 int ChangeModel(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery) (Potentially) changes the plane's model after doing a new match attempt Definition: Aircraft.cpp:357 std::vector< float > v actual dataRef values to be provided to the CSL model Definition: XPMPAircraft.h:181 float GetFlapRatio() const Flaps deploy ratio. Definition: XPMPAircraft.h:451 float GetEngineRotRpm(size_t idx) const < Engine rotation speed [rpm] for engine idx (1..4) Definition: XPMPAircraft.h:506 float GetEngineRotRad(size_t idx) const < Engine rotation speed [rad/s] for engine idx (1..4) Definition: XPMPAircraft.h:509 XPMPInfoTexts_t acInfoTexts Informational texts passed on via multiplayer shared dataRefs. Definition: XPMPAircraft.h:234 bool CreateInstances() Create the instances required to represent the plane, return if successful. Definition: Aircraft.cpp:626 void SetLocation(double lat, double lon, double alt_ft, bool on_grnd, float setTouchDownTime=NAN) Converts world coordinates to local coordinates, writes to Aircraft::drawInfo. Definition: XPMPAircraft.h:422 bool bDrawLabel Shall this aircraft's label be drawn? Definition: XPMPAircraft.h:186 const std::string & GetModelName() const return the name of the CSL model in use Definition: Aircraft.cpp:466 void UpdateDistBearingCamera(const XPLMCameraPosition_t &posCam) Internal: Update the plane's distance/bearing from the camera location. Definition: Aircraft.cpp:615 float GetYokeRollRatio() const Yoke roll ratio. Definition: XPMPAircraft.h:467 void ClampToGround() Clamp to ground: Make sure the plane is not below ground, corrects Aircraft::drawInfo if needed. Definition: Aircraft.cpp:583 bool bClampToGround Shall this plane be clamped to ground (ie. never sink below ground)? Definition: XPMPAircraft.h:203 void SetHeading(float _deg) heading [degree] Definition: XPMPAircraft.h:442 bool bRender Shall the CSL model be drawn in 3D world? (if !bRender && bVivile then still visible on TCAS/interfac... Definition: XPMPAircraft.h:239 void SetWingArea(float _m2) Wing area [m²]. Definition: XPMPAircraft.h:538 bool bValid is this object valid? (Will be reset in case of exceptions) Definition: XPMPAircraft.h:237 void SetTouchDown(bool _b) Moment of touch down. Definition: XPMPAircraft.h:526 bool ShallDrawLabel() const Shall this aircraft's label be drawn? Definition: XPMPAircraft.h:389 void SetNoseGearDeflection(float _mtr) Vertical nose gear deflection [meter]. Definition: XPMPAircraft.h:484 float GetEngineRotRpm() const Engine rotation speed [rpm]. Definition: XPMPAircraft.h:498 void Create(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="", CSLModel *_pCSLModel=nullptr) Creates a plane, only a valid operation if object was created using the default constructor. Definition: Aircraft.cpp:242 void SetPropRotAngle(float _deg) Propellor rotation angle [degree]. Definition: XPMPAircraft.h:615 void SetSlatRatio(float _f) Slats deploy ratio. Definition: XPMPAircraft.h:559 bool IsGroundVehicle() const Is this object a ground vehicle? Definition: Aircraft.cpp:328 static float FlightLoopCB(float, float, int, void *) Internal: Flight loop callback function controlling update and movement of all planes. Definition: Aircraft.cpp:506 XPLMDrawInfo_t drawInfo Holds position (in local coordinates!) and orientation (pitch, heading roll) of the aircraft. Definition: XPMPAircraft.h:203 float GetYokePitchRatio() const Yoke pitch ratio. Definition: XPMPAircraft.h:564 void SetOnGrnd(bool on_grnd, float setTouchDownTime=NAN) Set if the aircraft is on the ground. Definition: Aircraft.cpp:710 void SetDrawLabel(bool _b) Define if this aircraft's label is to be drawn (provided label drawing is enabled globally) Definition: XPMPAircraft.h:480 int ChangeModel(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery) (Potentially) changes the plane's model after doing a new match attempt Definition: Aircraft.cpp:367 std::vector< float > v actual dataRef values to be provided to the CSL model Definition: XPMPAircraft.h:215 float GetFlapRatio() const Flaps deploy ratio. Definition: XPMPAircraft.h:552 float GetEngineRotRpm(size_t idx) const < Engine rotation speed [rpm] for engine idx (1..4) Definition: XPMPAircraft.h:607 float GetEngineRotRad(size_t idx) const < Engine rotation speed [rad/s] for engine idx (1..4) Definition: XPMPAircraft.h:610 XPMPInfoTexts_t acInfoTexts Informational texts passed on via multiplayer shared dataRefs. Definition: XPMPAircraft.h:268 bool CreateInstances() Create the instances required to represent the plane, return if successful. Definition: Aircraft.cpp:651 void SetLocation(double lat, double lon, double alt_ft, bool on_grnd, float setTouchDownTime=NAN) Converts world coordinates to local coordinates, writes to Aircraft::drawInfo. Definition: XPMPAircraft.h:517 bool bDrawLabel Shall this aircraft's label be drawn? Definition: XPMPAircraft.h:220 const std::string & GetModelName() const return the name of the CSL model in use Definition: Aircraft.cpp:480 void UpdateDistBearingCamera(const XPLMCameraPosition_t &posCam) Internal: Update the plane's distance/bearing from the camera location. Definition: Aircraft.cpp:640 float GetYokeRollRatio() const Yoke roll ratio. Definition: XPMPAircraft.h:568 void ClampToGround() Clamp to ground: Make sure the plane is not below ground, corrects Aircraft::drawInfo if needed. Definition: Aircraft.cpp:608 bool bClampToGround Shall this plane be clamped to ground (ie. never sink below ground)? Definition: XPMPAircraft.h:237 void SetHeading(float _deg) heading [degree] Definition: XPMPAircraft.h:537 bool bRender Shall the CSL model be drawn in 3D world? (if !bRender && bVivile then still visible on TCAS/interfac... Definition: XPMPAircraft.h:273 virtual void SoundRemoveAll() Remove all sound, e.g. during destruction. Definition: Sound.cpp:719 void SetWingArea(float _m2) Wing area [m²]. Definition: XPMPAircraft.h:644 bool bValid is this object valid? (Will be reset in case of exceptions) Definition: XPMPAircraft.h:271 std::list< FMOD_CHANNEL * > ChnListTy List of FMOD channels, also beyond sounds created for SoundEvetsTy. Definition: XPMPAircraft.h:323 void SetTouchDown(bool _b) Moment of touch down. Definition: XPMPAircraft.h:627 bool ShallDrawLabel() const Shall this aircraft's label be drawn? Definition: XPMPAircraft.h:482 void SetNoseGearDeflection(float _mtr) Vertical nose gear deflection [meter]. Definition: XPMPAircraft.h:585 float GetEngineRotRpm() const Engine rotation speed [rpm]. Definition: XPMPAircraft.h:599 void MapFindIcon() Determine which map icon to use for this aircraft. Definition: Map.cpp:72 float camTimLstUpd Timestamp of last update of camera dist/bearing. Definition: XPMPAircraft.h:258 void SetReversDeployRatio(float _f) Thrust reversers deploy ratio. Definition: XPMPAircraft.h:523 float GetEngineRotRad() const Engine rotation speed [rad/s]. Definition: XPMPAircraft.h:500 void SetYokePitchRatio(float _f) Yoke pitch ratio. Definition: XPMPAircraft.h:464 int GetMatchQuality() const quality of the match with the CSL model Definition: XPMPAircraft.h:364 int acRelGrp related group, ie. line in related.txt in which this a/c appears, if any Definition: XPMPAircraft.h:243 float camTimLstUpd Timestamp of last update of camera dist/bearing. Definition: XPMPAircraft.h:294 void SetReversDeployRatio(float _f) Thrust reversers deploy ratio. Definition: XPMPAircraft.h:624 float GetEngineRotRad() const Engine rotation speed [rad/s]. Definition: XPMPAircraft.h:601 void SoundMuteAll(bool bMute) Mute/Unmute all sounds of the airplane temporarily. Definition: Sound.cpp:492 void SetYokePitchRatio(float _f) Yoke pitch ratio. Definition: XPMPAircraft.h:565 int GetMatchQuality() const quality of the match with the CSL model Definition: XPMPAircraft.h:452 float volAdj Volume adjustment, fed from Aircraft::SoundGetName() Definition: XPMPAircraft.h:330 int acRelGrp related group, ie. line in related.txt in which this a/c appears, if any Definition: XPMPAircraft.h:277 virtual ~Aircraft() Destructor cleans up all resources acquired. Definition: Aircraft.cpp:212 void ResetTcasTargetIdx() Reset TCAS target slot index to -1 Definition: XPMPAircraft.h:331 float GetReversDeployRatio() const Thrust reversers deploy ratio. Definition: XPMPAircraft.h:522 bool GetLightsNav() const Navigation lights. Definition: XPMPAircraft.h:480 float prev_ts last update of prev_x/y/z in XP's network time Definition: XPMPAircraft.h:247 float GetWingSweepRatio() const Wing sweep ratio. Definition: XPMPAircraft.h:459 float GetSlatRatio() const Slats deploy ratio. Definition: XPMPAircraft.h:457 virtual void SetInvalid() Mark the plane invalid, e.g. after exceptions occured on the data. Definition: Aircraft.cpp:811 void SetWingSweepRatio(float _f) Wing sweep ratio. Definition: XPMPAircraft.h:460 void SetYokeRollRatio(float _f) Yoke roll ratio. Definition: XPMPAircraft.h:468 const XPLMDrawInfo_t & GetLocation() const Gets all location info (including local coordinates) Definition: XPMPAircraft.h:437 void ResetTcasTargetIdx() Reset TCAS target slot index to -1 Definition: XPMPAircraft.h:414 float GetReversDeployRatio() const Thrust reversers deploy ratio. Definition: XPMPAircraft.h:623 bool GetLightsNav() const Navigation lights. Definition: XPMPAircraft.h:581 float prev_ts last update of prev_x/y/z in XP's network time Definition: XPMPAircraft.h:281 float GetWingSweepRatio() const Wing sweep ratio. Definition: XPMPAircraft.h:560 float GetSlatRatio() const Slats deploy ratio. Definition: XPMPAircraft.h:558 virtual void SetInvalid() Mark the plane invalid, e.g. after exceptions occured on the data. Definition: Aircraft.cpp:836 void SetWingSweepRatio(float _f) Wing sweep ratio. Definition: XPMPAircraft.h:561 virtual void SoundSetup() Sound-related initializations, called by Create() and ChangeModel() Definition: Sound.cpp:557 void SetYokeRollRatio(float _f) Yoke roll ratio. Definition: XPMPAircraft.h:569 const XPLMDrawInfo_t & GetLocation() const Gets all location info (including local coordinates) Definition: XPMPAircraft.h:532 void MapDrawIcon(XPLMMapLayerID inLayer, float acSize) Actually draw the map icon. Definition: Map.cpp:135 float GetCameraDist() const Distance to camera [m]. Definition: XPMPAircraft.h:392 void WakeApplyDefaults(bool _bOverwriteAllFields=true) Fill in default wake turbulence support data based on Doc8643 wake turbulence category. Definition: Aircraft.cpp:458 void SetTireRotAngle(float _deg) Tire rotation angle [degree]. Definition: XPMPAircraft.h:488 void SetThrustRatio(float _f) Thrust ratio. Definition: XPMPAircraft.h:462 float GetPropRotRad() const Propellor rotation speed [rad/s]. Definition: XPMPAircraft.h:518 int ReMatchModel() Finds a match again, using the existing parameters, eg. after more models have been loaded. Definition: XPMPAircraft.h:348 void SetEngineRotRad(float _rad) Engine rotation speed [rad/s], also sets [rpm] and engines 1..4. Definition: Aircraft.cpp:754 float GetCameraDist() const Distance to camera [m]. Definition: XPMPAircraft.h:485 FMOD_CHANNEL * SoundPlay(const std::string &sndName, float vol=1.0f) Play a sound; a looping sound plays until explicitely stopped. Definition: Sound.cpp:449 void WakeApplyDefaults(bool _bOverwriteAllFields=true) Fill in default wake turbulence support data based on Doc8643 wake turbulence category. Definition: Aircraft.cpp:472 void SetTireRotAngle(float _deg) Tire rotation angle [degree]. Definition: XPMPAircraft.h:589 void SetThrustRatio(float _f) Thrust ratio. Definition: XPMPAircraft.h:563 int skipCounter Counts how often we skipped expensive computations. Definition: XPMPAircraft.h:347 float GetPropRotRad() const Propellor rotation speed [rad/s]. Definition: XPMPAircraft.h:619 int sndMinDist Minimum distance in [m] to play sound in full volume, the larger the 'louder' the aircraft. Definition: XPMPAircraft.h:335 int ReMatchModel() Finds a match again, using the existing parameters, eg. after more models have been loaded. Definition: XPMPAircraft.h:436 bool bAuto Shall this sound event be handled automatically? (Set to false in your constructor or in Aircraft::So... Definition: XPMPAircraft.h:327 void SetEngineRotRad(float _rad) Engine rotation speed [rad/s], also sets [rpm] and engines 1..4. Definition: Aircraft.cpp:779 Aircraft(const Aircraft &)=delete Aircraft must not be copied as they reference non-copyable resources like XP instances. virtual float GetAoA() const Angle of Attach, returns pitch (but you can override in your class) Definition: XPMPAircraft.h:546 virtual float GetAoA() const Angle of Attach, returns pitch (but you can override in your class) Definition: XPMPAircraft.h:652 virtual void SoundUpdate() Update sound, like position and volume, called once per frame. Definition: Sound.cpp:572 friend size_t AIUpdateMultiplayerDataRefs() The old way: Update Multiplayer dataRefs directly. Definition: AIMultiplayer.cpp:244 float tsResetTouchDown Set by SetOnGrnd() with the timestamp when to reset SetTouchDown() Definition: XPMPAircraft.h:250 std::string acLivery Livery code of this plane. Definition: XPMPAircraft.h:163 float GetYokeHeadingRatio() const Yoke heading ratio. Definition: XPMPAircraft.h:465 void SetEngineRotAngle(float _deg) Engine rotation angle [degree], also sets engines 1..4. Definition: Aircraft.cpp:729 float mapY temporary: map coordinates (NAN = not to be drawn) Definition: XPMPAircraft.h:271 void SoundVolume(FMOD_CHANNEL *pChn, float vol) Sets the sound's volume (after applying master volume and Sound File's adjustments) Definition: Sound.cpp:485 ChnListTy chnList List of channels produced via calls to SoundPlay() Definition: XPMPAircraft.h:345 float tsResetTouchDown ground speed in [kn] based on above v_x/z Definition: XPMPAircraft.h:286 std::string acLivery Livery code of this plane. Definition: XPMPAircraft.h:197 float GetYokeHeadingRatio() const Yoke heading ratio. Definition: XPMPAircraft.h:566 void SetEngineRotAngle(float _deg) Engine rotation angle [degree], also sets engines 1..4. Definition: Aircraft.cpp:754 bool bChnMuted Is sound for this aircraft currently muted? Definition: XPMPAircraft.h:343 float mapY temporary: map coordinates (NAN = not to be drawn) Definition: XPMPAircraft.h:307 Operational values per sound channel, that is triggered by a standard sound event. Definition: XPMPAircraft.h:326 XPMP2 Exception class, e.g. thrown if there are no CSL models or duplicate modeS_ids when creating an... Definition: XPMPAircraft.h:598 std::string fileName filename of the line of code where exception occurred Definition: XPMPAircraft.h:600 virtual const char * what() const noexcept returns msg.c_str() Definition: Utilities.cpp:686 XPMP2Error(const char *szFile, int ln, const char *szFunc, const char *szMsg,...) Constructor puts together a formatted exception text. Definition: Utilities.cpp:671 std::string funcName function of the line of code where exception occurred Definition: XPMPAircraft.h:602 int ln line number of the line of code where exception occurred Definition: XPMPAircraft.h:601 Definition: XPMPAircraft.h:41 constexpr float G_EARTH standard gravitational acceleration [m/s²] Definition: XPMPAircraft.h:53 Aircraft * AcFindByID(XPMPPlaneID _id) Find aircraft by its plane ID, can return nullptr. Definition: Aircraft.cpp:1061 bool AcSetDefaultWakeData(const std::string &_wtc, const Aircraft::wakeTy &_wake) (Re)Define default wake turbulence values per WTC Definition: Aircraft.cpp:1074 constexpr float RPM_to_RADs Convert revolutions-per-minute (RPM) to radians per second (rad/s) by multiplying with PI/30. Definition: XPMPAircraft.h:46 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC3 libxplanemp/engines/engine_rotation_speed_rad_sec3 Definition: XPMPAircraft.h:100 @ V_CONTROLS_YOKE_HEADING_RATIO libxplanemp/controls/yoke_heading_ratio and sim/cockpit2/tcas/targets/position/yolk_yaw Definition: XPMPAircraft.h:66 @ V_CONTROLS_THRUST_RATIO libxplanemp/controls/thrust_ratio and sim/cockpit2/tcas/targets/position/throttle Definition: XPMPAircraft.h:64 @ V_CONTROLS_WING_SWEEP_RATIO libxplanemp/controls/wing_sweep_ratio and sim/cockpit2/tcas/targets/position/wing_sweep Definition: XPMPAircraft.h:63 @ V_CONTROLS_YOKE_PITCH_RATIO libxplanemp/controls/yoke_pitch_ratio and sim/cockpit2/tcas/targets/position/yolk_pitch Definition: XPMPAircraft.h:65 @ V_GEAR_TIRE_ROTATION_ANGLE_DEG libxplanemp/gear/tire_rotation_angle_deg Definition: XPMPAircraft.h:78 @ V_ENGINES_PROP_ROTATION_SPEED_RAD_SEC libxplanemp/engines/prop_rotation_speed_rad_sec Definition: XPMPAircraft.h:87 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC1 libxplanemp/engines/engine_rotation_speed_rad_sec1 Definition: XPMPAircraft.h:98 @ V_MISC_TOUCH_DOWN libxplanemp/misc/touch_down Definition: XPMPAircraft.h:104 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG3 libxplanemp/engines/engine_rotation_angle_deg3 Definition: XPMPAircraft.h:92 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC2 libxplanemp/engines/engine_rotation_speed_rad_sec2 Definition: XPMPAircraft.h:99 @ V_GEAR_NOSE_GEAR_DEFLECTION_MTR libxplanemp/gear/nose_gear_deflection_mtr Definition: XPMPAircraft.h:76 @ V_COUNT always last, number of dataRefs XPMP2 pre-defines Definition: XPMPAircraft.h:106 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC4 libxplanemp/engines/engine_rotation_speed_rad_sec4 Definition: XPMPAircraft.h:101 @ V_ENGINES_PROP_ROTATION_ANGLE_DEG libxplanemp/engines/prop_rotation_angle_deg Definition: XPMPAircraft.h:85 @ V_CONTROLS_YOKE_ROLL_RATIO libxplanemp/controls/yoke_roll_ratio and sim/cockpit2/tcas/targets/position/yolk_roll Definition: XPMPAircraft.h:67 @ V_CONTROLS_SPOILER_RATIO libxplanemp/controls/spoiler_ratio Definition: XPMPAircraft.h:60 @ V_CONTROLS_TAXI_LITES_ON libxplanemp/controls/taxi_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:70 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC libxplanemp/engines/engine_rotation_speed_rad_sec Definition: XPMPAircraft.h:84 @ V_GEAR_TIRE_VERTICAL_DEFLECTION_MTR libxplanemp/gear/tire_vertical_deflection_mtr Definition: XPMPAircraft.h:77 @ V_CONTROLS_NWS_RATIO libxplanemp/controls/nws_ratio, the nose wheel angle, actually in degrees Definition: XPMPAircraft.h:58 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG4 libxplanemp/engines/engine_rotation_angle_deg4 Definition: XPMPAircraft.h:93 @ V_GEAR_TIRE_ROTATION_SPEED_RPM libxplanemp/gear/tire_rotation_speed_rpm Definition: XPMPAircraft.h:79 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG1 libxplanemp/engines/engine_rotation_angle_deg1 Definition: XPMPAircraft.h:90 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG libxplanemp/engines/engine_rotation_angle_deg Definition: XPMPAircraft.h:82 @ V_ENGINES_THRUST_REVERSER_DEPLOY_RATIO libxplanemp/engines/thrust_reverser_deploy_ratio Definition: XPMPAircraft.h:88 @ V_CONTROLS_BEACON_LITES_ON libxplanemp/controls/beacon_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:72 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM4 libxplanemp/engines/engine_rotation_speed_rpm4 Definition: XPMPAircraft.h:97 @ V_ENGINES_PROP_ROTATION_SPEED_RPM libxplanemp/engines/prop_rotation_speed_rpm Definition: XPMPAircraft.h:86 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM2 libxplanemp/engines/engine_rotation_speed_rpm2 Definition: XPMPAircraft.h:95 @ V_CONTROLS_NAV_LITES_ON libxplanemp/controls/nav_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:74 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM libxplanemp/engines/engine_rotation_speed_rpm Definition: XPMPAircraft.h:83 @ V_CONTROLS_SLAT_RATIO libxplanemp/controls/slat_ratio and sim/cockpit2/tcas/targets/position/slat_ratio Definition: XPMPAircraft.h:62 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM3 libxplanemp/engines/engine_rotation_speed_rpm3 Definition: XPMPAircraft.h:96 @ V_CONTROLS_THRUST_REVERS libxplanemp/controls/thrust_revers Definition: XPMPAircraft.h:68 @ V_GEAR_TIRE_ROTATION_SPEED_RAD_SEC libxplanemp/gear/tire_rotation_speed_rad_sec Definition: XPMPAircraft.h:80 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM1 libxplanemp/engines/engine_rotation_speed_rpm1 Definition: XPMPAircraft.h:94 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG2 libxplanemp/engines/engine_rotation_angle_deg2 Definition: XPMPAircraft.h:91 @ V_CONTROLS_FLAP_RATIO libxplanemp/controls/flap_ratio and sim/cockpit2/tcas/targets/position/flap_ratio and .... Definition: XPMPAircraft.h:59 @ V_CONTROLS_LANDING_LITES_ON libxplanemp/controls/landing_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:71 @ V_CONTROLS_GEAR_RATIO libxplanemp/controls/gear_ratio and sim/cockpit2/tcas/targets/position/gear_deploy Definition: XPMPAircraft.h:57 @ V_CONTROLS_STROBE_LITES_ON libxplanemp/controls/strobe_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:73 @ V_CONTROLS_SPEED_BRAKE_RATIO libxplanemp/controls/speed_brake_ratio and sim/cockpit2/tcas/targets/position/speedbrake_ratio Definition: XPMPAircraft.h:61 constexpr double M_per_FT Convert feet to meters, e.g. for altitude calculations. Definition: XPMPAircraft.h:48 XPMP2 Exception class, e.g. thrown if there are no CSL models or duplicate modeS_ids when creating an... Definition: XPMPAircraft.h:768 std::string fileName filename of the line of code where exception occurred Definition: XPMPAircraft.h:770 virtual const char * what() const noexcept returns msg.c_str() Definition: Utilities.cpp:728 XPMP2Error(const char *szFile, int ln, const char *szFunc, const char *szMsg,...) Constructor puts together a formatted exception text. Definition: Utilities.cpp:713 std::string funcName function of the line of code where exception occurred Definition: XPMPAircraft.h:772 int ln line number of the line of code where exception occurred Definition: XPMPAircraft.h:771 constexpr float G_EARTH standard gravitational acceleration [m/s²] Definition: XPMPAircraft.h:87 constexpr double KT_per_M_per_S Convert m/s to knots. Definition: XPMPAircraft.h:84 Aircraft * AcFindByID(XPMPPlaneID _id) Find aircraft by its plane ID, can return nullptr. Definition: Aircraft.cpp:1091 bool AcSetDefaultWakeData(const std::string &_wtc, const Aircraft::wakeTy &_wake) (Re)Define default wake turbulence values per WTC Definition: Aircraft.cpp:1104 constexpr float RPM_to_RADs Defined by XPMP2 internally. Definition: XPMPAircraft.h:78 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC3 libxplanemp/engines/engine_rotation_speed_rad_sec3 Definition: XPMPAircraft.h:134 @ V_CONTROLS_YOKE_HEADING_RATIO libxplanemp/controls/yoke_heading_ratio and sim/cockpit2/tcas/targets/position/yolk_yaw Definition: XPMPAircraft.h:100 @ V_CONTROLS_THRUST_RATIO libxplanemp/controls/thrust_ratio and sim/cockpit2/tcas/targets/position/throttle Definition: XPMPAircraft.h:98 @ V_CONTROLS_WING_SWEEP_RATIO libxplanemp/controls/wing_sweep_ratio and sim/cockpit2/tcas/targets/position/wing_sweep Definition: XPMPAircraft.h:97 @ V_CONTROLS_YOKE_PITCH_RATIO libxplanemp/controls/yoke_pitch_ratio and sim/cockpit2/tcas/targets/position/yolk_pitch Definition: XPMPAircraft.h:99 @ V_GEAR_TIRE_ROTATION_ANGLE_DEG libxplanemp/gear/tire_rotation_angle_deg Definition: XPMPAircraft.h:112 @ V_ENGINES_PROP_ROTATION_SPEED_RAD_SEC libxplanemp/engines/prop_rotation_speed_rad_sec Definition: XPMPAircraft.h:121 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC1 libxplanemp/engines/engine_rotation_speed_rad_sec1 Definition: XPMPAircraft.h:132 @ V_MISC_TOUCH_DOWN libxplanemp/misc/touch_down Definition: XPMPAircraft.h:138 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG3 libxplanemp/engines/engine_rotation_angle_deg3 Definition: XPMPAircraft.h:126 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC2 libxplanemp/engines/engine_rotation_speed_rad_sec2 Definition: XPMPAircraft.h:133 @ V_GEAR_NOSE_GEAR_DEFLECTION_MTR libxplanemp/gear/nose_gear_deflection_mtr Definition: XPMPAircraft.h:110 @ V_COUNT always last, number of dataRefs XPMP2 pre-defines Definition: XPMPAircraft.h:140 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC4 libxplanemp/engines/engine_rotation_speed_rad_sec4 Definition: XPMPAircraft.h:135 @ V_ENGINES_PROP_ROTATION_ANGLE_DEG libxplanemp/engines/prop_rotation_angle_deg Definition: XPMPAircraft.h:119 @ V_CONTROLS_YOKE_ROLL_RATIO libxplanemp/controls/yoke_roll_ratio and sim/cockpit2/tcas/targets/position/yolk_roll Definition: XPMPAircraft.h:101 @ V_CONTROLS_SPOILER_RATIO libxplanemp/controls/spoiler_ratio Definition: XPMPAircraft.h:94 @ V_CONTROLS_TAXI_LITES_ON libxplanemp/controls/taxi_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:104 @ V_ENGINES_ENGINE_ROTATION_SPEED_RAD_SEC libxplanemp/engines/engine_rotation_speed_rad_sec Definition: XPMPAircraft.h:118 @ V_GEAR_TIRE_VERTICAL_DEFLECTION_MTR libxplanemp/gear/tire_vertical_deflection_mtr Definition: XPMPAircraft.h:111 @ V_CONTROLS_NWS_RATIO libxplanemp/controls/nws_ratio, the nose wheel angle, actually in degrees Definition: XPMPAircraft.h:92 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG4 libxplanemp/engines/engine_rotation_angle_deg4 Definition: XPMPAircraft.h:127 @ V_GEAR_TIRE_ROTATION_SPEED_RPM libxplanemp/gear/tire_rotation_speed_rpm Definition: XPMPAircraft.h:113 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG1 libxplanemp/engines/engine_rotation_angle_deg1 Definition: XPMPAircraft.h:124 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG libxplanemp/engines/engine_rotation_angle_deg Definition: XPMPAircraft.h:116 @ V_ENGINES_THRUST_REVERSER_DEPLOY_RATIO libxplanemp/engines/thrust_reverser_deploy_ratio Definition: XPMPAircraft.h:122 @ V_CONTROLS_BEACON_LITES_ON libxplanemp/controls/beacon_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:106 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM4 libxplanemp/engines/engine_rotation_speed_rpm4 Definition: XPMPAircraft.h:131 @ V_ENGINES_PROP_ROTATION_SPEED_RPM libxplanemp/engines/prop_rotation_speed_rpm Definition: XPMPAircraft.h:120 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM2 libxplanemp/engines/engine_rotation_speed_rpm2 Definition: XPMPAircraft.h:129 @ V_CONTROLS_NAV_LITES_ON libxplanemp/controls/nav_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:108 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM libxplanemp/engines/engine_rotation_speed_rpm Definition: XPMPAircraft.h:117 @ V_CONTROLS_SLAT_RATIO libxplanemp/controls/slat_ratio and sim/cockpit2/tcas/targets/position/slat_ratio Definition: XPMPAircraft.h:96 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM3 libxplanemp/engines/engine_rotation_speed_rpm3 Definition: XPMPAircraft.h:130 @ V_CONTROLS_THRUST_REVERS libxplanemp/controls/thrust_revers Definition: XPMPAircraft.h:102 @ V_GEAR_TIRE_ROTATION_SPEED_RAD_SEC libxplanemp/gear/tire_rotation_speed_rad_sec Definition: XPMPAircraft.h:114 @ V_ENGINES_ENGINE_ROTATION_SPEED_RPM1 libxplanemp/engines/engine_rotation_speed_rpm1 Definition: XPMPAircraft.h:128 @ V_ENGINES_ENGINE_ROTATION_ANGLE_DEG2 libxplanemp/engines/engine_rotation_angle_deg2 Definition: XPMPAircraft.h:125 @ V_CONTROLS_FLAP_RATIO libxplanemp/controls/flap_ratio and sim/cockpit2/tcas/targets/position/flap_ratio and .... Definition: XPMPAircraft.h:93 @ V_CONTROLS_LANDING_LITES_ON libxplanemp/controls/landing_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:105 @ V_CONTROLS_GEAR_RATIO libxplanemp/controls/gear_ratio and sim/cockpit2/tcas/targets/position/gear_deploy Definition: XPMPAircraft.h:91 @ V_CONTROLS_STROBE_LITES_ON libxplanemp/controls/strobe_lites_on and sim/cockpit2/tcas/targets/position/lights Definition: XPMPAircraft.h:107 @ V_CONTROLS_SPEED_BRAKE_RATIO libxplanemp/controls/speed_brake_ratio and sim/cockpit2/tcas/targets/position/speedbrake_ratio Definition: XPMPAircraft.h:95 constexpr double M_per_FT Convert feet to meters, e.g. for altitude calculations. Definition: XPMPAircraft.h:80 void fillUpFrom(const wakeTy &o) Copies values only for non-NAN fields. Definition: Aircraft.cpp:178 void clear() clear all values to defaults Definition: XPMPAircraft.h:225 float mass_kg actual mass of the aircraft creating the wake Definition: XPMPAircraft.h:223 float wingSpan_m wing span of the aircraft creating wake turbulence Definition: XPMPAircraft.h:221 float wingArea_m2 wing area (total area of both wings combined) of the aircraft creating wake turbulence Definition: XPMPAircraft.h:222 void clear() clear all values to defaults Definition: XPMPAircraft.h:259 float mass_kg actual mass of the aircraft creating the wake Definition: XPMPAircraft.h:257 float wingSpan_m wing span of the aircraft creating wake turbulence Definition: XPMPAircraft.h:255 float wingArea_m2 wing area (total area of both wings combined) of the aircraft creating wake turbulence Definition: XPMPAircraft.h:256 void applyDefaults(const std::string &_wtc, bool _bOverwriteAllFields=true) based on Doc8643 WTC fill with defaults Definition: Aircraft.cpp:153 std::string modelName name, formed by last part of path plus id Definition: XPMPAircraft.h:118 int xsbAircraftLn Line number in the xsb_aircraft.txt file where the model definition starts. Definition: XPMPAircraft.h:122 std::string icaoType ICAO aircraft type this model represents: xsb_aircraft.txt::ICAO Definition: XPMPAircraft.h:124 std::string cslId id, just an arbitrary label read from xsb_aircraft.txt::OBJ8_AIRCRAFT Definition: XPMPAircraft.h:116 std::string doc8643WTC Doc8643 information: wake turbulence class, like M, L/M, L, H. Definition: XPMPAircraft.h:128 std::string doc8643Classification Doc8643 information: Classification, like L1P, L4J, H1T. Definition: XPMPAircraft.h:126 std::string xsbAircraftPath Path to the xsb_aircraft.txt file from where this model is loaded. Definition: XPMPAircraft.h:120 CSLModelInfo_t() Default constructor does nothing. Definition: XPMPAircraft.h:140 std::string livery special livery (not often used) Definition: XPMPAircraft.h:133 std::string icaoAirline ICAO airine/operator code. Definition: XPMPAircraft.h:132 std::vector< MatchCrit_t > vecMatchCrit_t Definition: XPMPAircraft.h:135 Any number of airline codes and/or liveries can be assigned to a model for matching purpose. Definition: XPMPAircraft.h:131 std::string modelName name, formed by last part of path plus id Definition: XPMPAircraft.h:152 int xsbAircraftLn Line number in the xsb_aircraft.txt file where the model definition starts. Definition: XPMPAircraft.h:156 std::string icaoType ICAO aircraft type this model represents: xsb_aircraft.txt::ICAO Definition: XPMPAircraft.h:158 std::string cslId id, just an arbitrary label read from xsb_aircraft.txt::OBJ8_AIRCRAFT Definition: XPMPAircraft.h:150 std::string doc8643WTC Doc8643 information: wake turbulence class, like M, L/M, L, H. Definition: XPMPAircraft.h:162 std::string doc8643Classification Doc8643 information: Classification, like L1P, L4J, H1T. Definition: XPMPAircraft.h:160 std::string xsbAircraftPath Path to the xsb_aircraft.txt file from where this model is loaded. Definition: XPMPAircraft.h:154 CSLModelInfo_t() Default constructor does nothing. Definition: XPMPAircraft.h:174 std::string livery special livery (not often used) Definition: XPMPAircraft.h:167 std::string icaoAirline ICAO airine/operator code. Definition: XPMPAircraft.h:166 std::vector< MatchCrit_t > vecMatchCrit_t Definition: XPMPAircraft.h:169 Any number of airline codes and/or liveries can be assigned to a model for matching purpose. Definition: XPMPAircraft.h:165 diff --git a/docs/html/XPMPMultiplayer_8cpp.html b/docs/html/XPMPMultiplayer_8cpp.html index dc74a914..a1229161 100644 --- a/docs/html/XPMPMultiplayer_8cpp.html +++ b/docs/html/XPMPMultiplayer_8cpp.html @@ -52,7 +52,7 @@ |
@@ -83,10 +84,10 @@
| Validate all required files are available in the resource directory. More... | | | Deprecated legacy initialization of XPMP2. More... | | | Initializes the XPMP2 library. This shall be your first call to the library. More... | | void | XPMPSetPluginName (const char *inPluginName, const char *inPluginLogAcronym) | | |
Initialization and general control functions for XPMP2.
+Initialization and general control functions for XPMP2.
inDataFunc
inDataFunc
inIndex | Number between 0 and `XPMPGetNumberOfInstalledModels()-1 |
inPluginName | Your plugin's name, mainly used as map layer name and for logging |
resourceDir | The directory where XPMP2 finds all required supplemental files (Doc8643.txt , MapIcons.png , related.txt , optionally Obj8DataRefs.txt ) |
resourceDir | The directory where XPMP2 finds all required supplemental files (Doc8643.txt , MapIcons.png , related.txt , optionally Obj8DataRefs.txt ) |
inIntPrefsFunc | (optional) A pointer to a callback function providing integer config values. See XPMPIntPrefsFuncTy for details. |
inDefaultICAO | (optional) A fallback aircraft type if no type can be deduced otherwise for an aircraft. |
inPluginLogAcronym | (optional) A short text to be used in log output. If not given then inPluginName is used also for this purpose. |
Namespaces | |
XPMP2 | |
Defined by FMOD. | |
Macros | |
Configuration Sections | |
Config section is defined for legacy reasons only + | |
#define | XPMP_CFG_SEC_MODELS "models" |
Config section "models". More... | |
#define | XPMP_CFG_SEC_PLANES "planes" |
Config section "planes". More... | |
#define | XPMP_CFG_SEC_SOUND "sound" |
Config section "sound". More... | |
#define | XPMP_CFG_SEC_DEBUG "debug" |
Config section "debug". More... | |
Configuration Items | |
Configuration Items are unique in itself even without considering the configuration section + | |
#define | XPMP_CFG_ITM_REPLDATAREFS "replace_datarefs" |
Config key: Replace dataRefs in OBJ8 files upon load, creating new OBJ8 files for XPMP2 (defaults to OFF!) More... | |
Config key: Replace dataRefs in OBJ8 files upon load, creating new OBJ8 files for XPMP2 (defaults to OFF!) More... | |
#define | XPMP_CFG_ITM_REPLTEXTURE "replace_texture" |
Config key: Replace textures in OBJ8 files upon load if needed (specified on the OBJ8 line in xsb_aircraft.txt), creating new OBJ8 files. More... | |
#define | XPMP_CFG_ITM_SUPPORT_REMOTE "support_remote" |
Config key: Support remote connections? <0 force off, 0 default: on if in a networked or multiplayer setup, >0 force on. More... | |
#define | XPMP_CFG_ITM_ACTIVATE_SOUND "activate_sound" |
Config key: Activate Sound upon initial startup? (No effect later) More... | |
#define | XPMP_CFG_ITM_MUTE_ON_PAUSE "mute_on_pause" |
Config key: Mute all sound temporarily while X-Plane is in a paused state? More... | |
#define | XPMP_CFG_ITM_LOGLEVEL "log_level" |
Config key: General level of logging into Log.txt (0 = Debug, 1 = Info, 2 = Warning, 3 = Error, 4 = Fatal) More... | |
#define | XPMP_CFG_ITM_MODELMATCHING "model_matching" |
Config key: Write information on model matching into Log.txt More... | |
Config key: Write information on model matching and sound selection into Log.txt More... | |
Sound Macros | |
#define | XP_SOUND_ELECTRIC "Electric" |
#define | XP_SOUND_HIBYPASSJET "HiBypassJet" |
#define | XP_SOUND_LOBYPASSJET "LoBypassJet" |
#define | XP_SOUND_TURBOPROP "Turboprop" |
#define | XP_SOUND_PROP_AIRPLANE "PropAirplane" |
#define | XP_SOUND_PROP_HELI "PropHeli" |
#define | XP_SOUND_REVERSE_THRUST "ReverseThrust" |
#define | XP_SOUND_ROLL_RUNWAY "RollRunway" |
#define | XP_SOUND_FLAP "Flap" |
#define | XP_SOUND_GEAR "Gear" |
Typedefs | |
typedef unsigned int | XPMPLightsPattern |
Light flash pattern (unused in XPMP2) More... | |
Light flash pattern (unused in XPMP2) More... | |
typedef unsigned | XPMPPlaneID |
Unique ID for an aircraft created by a plugin. More... |
Functions | |
Initialization | |
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. More... | |
Deprecated legacy initialization of XPMP2. More... | |
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. More... | |
Initializes the XPMP2 library. This shall be your first call to the library. More... | |
void | XPMPSetPluginName (const char *inPluginName, const char *inPluginLogAcronym=nullptr) |
Overrides the plugin's name to be used in Log output. More... | |
const char * | XPMPMultiplayerOBJ7SupportEnable (const char *inTexturePath) |
Used to set the light textures for old OBJ7 models. More... | |
Sound | |
| |
bool | XPMPSoundEnable (bool bEnable=true) |
Enable/Disable Sound. More... | |
bool | XPMPSoundIsEnabled () |
Is Sound enabled? More... | |
void | XPMPSoundSetMasterVolume (float fVol=1.0f) |
Set Master Volume. More... | |
void | XPMPSoundMute (bool bMute) |
Mute all sounds (temporarily) More... | |
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. More... | |
const char * | XPMPSoundEnumerate (const char *prevName, const char **ppFilePath=nullptr) |
Enumerate all sounds, including the internal ones. More... | |
AI / Multiplayer plane control | |
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. More... | |
Release TCAS targets control. More... | |
bool | XPMPHasControlOfAIAircraft () |
Has XPMP2 control of TCAS targets? More... | |
Has XPMP2 control of TCAS targets? More... | |
CSL Package Handling | |
const char * | XPMPLoadCSLPackage (const char *inCSLFolder) |
Loads CSL packages from the given folder, searching up to 5 folder levels deep. More... | |
size_t | XPMPAddModelDataRef (const std::string &dataRef) |
Add a user-defined dataRef to the list of dataRefs supported by every plane. More... | |
Plane Creation API | |
XPMPPlaneID | XPMPCreatePlane (const char *inICAOCode, const char *inAirline, const char *inLivery, XPMPPlaneData_f inDataFunc, void *inRefcon, XPMPPlaneID inModeS_id=0) |
Creates a new plane. More... | |
void | XPMPSetDefaultPlaneICAO (const char *_acIcaoType, const char *_carIcaoType=nullptr) |
Define default aircraft and ground vehicle ICAO types. More... | |
Plane Observation API | |
void | XPMPRegisterPlaneNotifierFunc (XPMPPlaneNotifier_f inFunc, void *inRefcon) |
Registers a callback, which is called when one of the events defined in XPMPPlaneNotification happens. More... | |
void | XPMPUnregisterPlaneNotifierFunc (XPMPPlaneNotifier_f inFunc, void *inRefcon) |
Unregisters a notification callback. Both function pointer and refcon must match what was registered. More... | |
Plane Rendering API | |
void | XPMPSetPlaneRenderer (XPMPRenderPlanes_f inRenderer, void *inRef) |
The original libxplanemp allowed to override rendering; no longer supported. More... | |
Initialization and general control functions for XPMP2.
+Initialization and general control functions for XPMP2.
This is one of two main header files for using XPMP2. (The other is XPMPAircraft.h
). XPMP2 is a library allowing an X-Plane plugin to have planes rendered in X-Plane's 3D world based on OBJ8 CSL models, which need to be installed separately. The plugin shall subclass XPMP2::Aircraft:: and override the abstract virtual function XPMP2::Aircraft::UpdatePosition() to provide updated position and attitude information. XPMP2 takes care of reading and initializaing CSL models, instanciating and updating the aircraft objects in X-Plane, display in a map layer, provisioning information via X-Plane's TCAS targets and AI/multiplayer (and more) dataRefs.
This is one of two main header files for using XPMP2. (The other is XPMPAircraft.h
). XPMP2 is a library allowing an X-Plane plugin to have planes rendered in X-Plane's 3D world based on OBJ8 CSL models, which need to be installed separately. The plugin shall subclass XPMP2::Aircraft and override the abstract virtual function XPMP2::Aircraft::UpdatePosition() to provide updated position and attitude information. XPMP2 takes care of reading and initializaing CSL models, instanciating and updating the aircraft objects in X-Plane, display in a map layer, provisioning information via X-Plane's TCAS targets and AI/multiplayer (and more) dataRefs.
INCLUDE_FMOD_SOUND
.< 1
means 'none'. < 1
means 'none'.
Textual information of planes to be passed on via shared dataRefs to other plugins.
-The texts are not used within XPMP2 in any way, just passed on to dataRefs
+The texts are not used within XPMP2 in any way, just passed on to dataRefs
Class Members | ||
---|---|---|
@@ -744,7 +812,7 @@ flashPattern: 4 |
-light pattern (unused in XPMP2) | |
unsigned int |
@@ -774,12 +842,168 @@ timeOffset: 16 |
-time offset to avoid lights across planes blink in sync (unused in XPMP2) |
#define XP_SOUND_ELECTRIC "Electric" | +
#define XP_SOUND_FLAP "Flap" | +
#define XP_SOUND_GEAR "Gear" | +
#define XP_SOUND_HIBYPASSJET "HiBypassJet" | +
#define XP_SOUND_LOBYPASSJET "LoBypassJet" | +
#define XP_SOUND_PROP_AIRPLANE "PropAirplane" | +
#define XP_SOUND_PROP_HELI "PropHeli" | +
#define XP_SOUND_REVERSE_THRUST "ReverseThrust" | +
#define XP_SOUND_ROLL_RUNWAY "RollRunway" | +
#define XP_SOUND_TURBOPROP "Turboprop" | +
#define XPMP_CFG_ITM_ACTIVATE_SOUND "activate_sound" | +
Config key: Activate Sound upon initial startup? (No effect later)
+ +Config key: Write information on model matching into Log.txt
Config key: Write information on model matching and sound selection into Log.txt
#define XPMP_CFG_ITM_MUTE_ON_PAUSE "mute_on_pause" | +
Config key: Mute all sound temporarily while X-Plane is in a paused state?
Config key: Replace dataRefs in OBJ8 files upon load, creating new OBJ8 files for XPMP2 (defaults to OFF!)
+Config key: Replace dataRefs in OBJ8 files upon load, creating new OBJ8 files for XPMP2 (defaults to OFF!)
@@ -938,6 +1178,22 @@#define XPMP_CFG_SEC_SOUND "sound" | +
Config section "sound".
+Definition for the type of configuration callback function.
-The plugin using XPMP2 can provide such a callback function via XPMPMultiplayerInit(). It will be called max. every 2s to fetch each of the following configuration values:
+
The plugin using XPMP2 can provide such a callback function via XPMPMultiplayerInit(). It will be called max. every 2s to fetch each of the following configuration values:
section | key | type | default | description
------- | ------------------- | ---- | ------- | -------------------------------------------------------------------------
-models | replace_datarefs | int | 0 | Replace dataRefs in OBJ8 files upon load, creating new OBJ8 files for XPMP2 (defaults to OFF!)
+models | replace_datarefs | int | 0 | Replace dataRefs in OBJ8 files upon load, creating new OBJ8 files for XPMP2 (defaults to OFF!)
models | replace_texture | int | 1 | Replace textures in OBJ8 files upon load if needed (specified on the OBJ8 line in xsb_aircraft.txt), creating new OBJ8 files
planes | clamp_all_to_ground | int | 1 | Ensure no plane sinks below ground, no matter of XPMP2::Aircraft::bClampToGround
planes | handle_dup_id | int | 0 | Boolean: If XPMP2::Aircraft::modeS_id already exists then assign a new unique one, overwrites XPMP2::Aircraft::modeS_id
planes | support_remote | int | 0 | 3-state integer: Support remote connections? <0 force off, 0 default: on if in a networked or multiplayer setup, >0 force on
+sound | activate_sound | int | 1 | Activate Sound upon initial startup? (No effect later)
+sound | mute_on_pause | int | 1 | Mute all sound temporarily while X-Plane is in a paused state?
debug | log_level | int | 2 | General level of logging into Log.txt (0 = Debug, 1 = Info, 2 = Warning, 3 = Error, 4 = Fatal)
-debug | model_matching | int | 0 | Write information on model matching into Log.txt
+debug | model_matching | int | 0 | Write information on model matching and sound selection into Log.txt
_section
in your implementation. _key
by itself is unique. Compare it with any of the XPMP_CFG_ITM_*
values and return your value. _section | Configuration section, ie. group of values, any of the XPMP_CFG_SEC_... values |
_key | Any of the XPMP_CFG_ITM_* values to indicate which config value is to be returned. |
_default | A default provided by XPMP2. Have your callback return _default if you don't want to explicitely set a value or don't know the _key . |
_default | A default provided by XPMP2. Have your callback return _default if you don't want to explicitely set a value or don't know the _key . |
Light flash pattern (unused in XPMP2)
+Light flash pattern (unused in XPMP2)
@@ -1008,11 +1266,11 @@This functions is called by XPMP2 once per cycle per plane per data type. Your implementation returns the requested data, so that XPMP2 can move and update the associated aircraft instance.
This functions is called by XPMP2 once per cycle per plane per data type. Your implementation returns the requested data, so that XPMP2 can move and update the associated aircraft instance.
inPlane | ID of the plane, for which data is requested | |
inDataType | The type of data that is requested, see XPMPPlaneDataType | |
[out] | ioData | A pointer to a structure XPMP2 provides, for you to fill the data into. For its type see XPMPPlaneDataType. |
[out] | ioData | A pointer to a structure XPMP2 provides, for you to fill the data into. For its type see XPMPPlaneDataType. |
inRefcon | The refcon value you provided when creating the plane |
Unique ID for an aircraft created by a plugin.
-modeS_id
in the new TCAS override approach. modeS_id
in the new TCAS override approach. The original libxplanemp allowed to override rendering; no longer supported.
-Light flash patterns.
-Enumerator | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
xpmp_Lights_Pattern_Default | Jets: one strobe flash, short beacon (-*—*—*—) @@ -1142,7 +1400,7 @@
inICAOCodeinLivery | Special livery designator, can be an empty string | inDataFunc | Callback function called by XPMP2 to fetch updated data | inRefcon | A refcon value passed back to you in all calls to the | inDataFunc inModeS_id | (optional) Unique identification of the plane [0x01..0xFFFFFF], e.g. the 24bit mode S transponder code. XPMP2 assigns an arbitrary unique number of not given | |
XPMP2 creates a separate Map Layer named after the plugin for this purposes. By default, the map functionality is enabled including label writing.
@@ -1658,7 +1916,7 @@inIndex | Number between 0 and `XPMPGetNumberOfInstalledModels()-1 |
_callback | (optional) You can provide a callback function, which is called directly by X-Plane when control of TCAS targets is not successful now but becomes available later. |
inPluginName | Your plugin's name, mainly used as map layer name and for logging | ||||
resourceDir | The directory where XPMP2 finds all required supplemental files (Doc8643.txt , MapIcons.png , related.txt , optionally Obj8DataRefs.txt ) | ||||
resourceDir | The directory where XPMP2 finds all required supplemental files (Doc8643.txt , MapIcons.png , related.txt , optionally Obj8DataRefs.txt ) | ||||
inIntPrefsFunc | (optional) A pointer to a callback function providing integer config values. See XPMPIntPrefsFuncTy for details. | ||||
inDefaultICAO | (optional) A fallback aircraft type if no type can be deduced otherwise for an aircraft. | ||||
inPluginLogAcronym | (optional) A short text to be used in log output. If not given then inPluginName is used also for this purpose. |
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.
+XPMP2 loads a number of default sounds from what X-Plane ships. This function allows to add your own. It will try to load the sound immediately.
sName | A descriptive name, used as a key to refer to this sound later |
filePath | Path to the sound file; a relative path is relative to resourceDir as set by XPMPMultiplayerInit() |
bLoop | Is this sound to be played in a loop? |
coneDir | [opt] Which direction relative to plane's heading does the cone point to? (180 would be typical for jet engines) |
conePitch | [opt] Which pitch does the cone point to (up/down)? (0 would be typical, ie. level with the plane) |
coneInAngle | [opt] Inside cone angle. This is the angle spread within which the sound is unattenuated. |
coneOutAngle | [opt] Outside cone angle. This is the angle spread outside of which the sound is attenuated to its coneOutVol . |
coneOutVol | [opt] Cone outside volume. |
bool XPMPSoundEnable | +( | +bool | +bEnable = true | ) | ++ |
Enable/Disable Sound.
+Enable or disable sound support. The default on startup is controlled by the configuration item sound / activate_sound
, which in turn defaults to 1
.
false
even in case of activation if there was a problem during sound initialization) const char* XPMPSoundEnumerate | +( | +const char * | +prevName, | +
+ | + | const char ** | +ppFilePath = nullptr |
+
+ | ) | ++ |
Enumerate all sounds, including the internal ones.
+prevName | nullptr or empty string to start from beginning, last returned name to continue with next sound | |
[out] | ppFilePath | (optional) Receives pointer to file path |
bool XPMPSoundIsEnabled | +( | +) | ++ |
Is Sound enabled?
+ +void XPMPSoundMute | +( | +bool | +bMute | ) | ++ |
Mute all sounds (temporarily)
+bMute | Mute (true ) or unmute (false )? |
void XPMPSoundSetMasterVolume | +( | +float | +fVol = 1.0f | ) | ++ |
Set Master Volume.
+fVol | Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal. |
@@ -167,7 +168,7 @@
Variables | The signature of the XPMP2 Remote Client. More... | | const std::array< RemoteDataRefPackTy, V_COUNT > | XPMP2::REMOTE_DR_DEF | constexpr std::uint8_t RMT_VER_BEACON Interest Beacon message version number. Definition: XPMPRemote.h:136 constexpr float REMOTE_MAX_DIFF_TIME maximum time difference thatn can be represented in a pos update msg Definition: XPMPRemote.h:268 CSLModel * CSLModelByPkgShortId(std::uint16_t _pkgHash, const std::string &_shortId) Find a model by package name hash and short id. Definition: CSLModels.cpp:1150 @ REMOTE_RECV_WAITING waiting to receive data, periodically sending a token of interest Definition: XPMPRemote.h:439 constexpr float REMOTE_TIME_RES resolution of time difference Definition: XPMPRemote.h:267 constexpr double REMOTE_MAX_DIFF_ALT_FT maximum altitude[ft] difference that can be represented in a pos update msg Definition: XPMPRemote.h:266 std::uint16_t PJWHash16(const char *s) Produces a reproducible(!) hash value for strings. Definition: Utilities.cpp:601 @ V_COUNT always last, number of dataRefs XPMP2 pre-defines Definition: XPMPAircraft.h:140 constexpr double REMOTE_ALT_FT_RES resolution of altitude[ft] updates Definition: XPMPRemote.h:265 const std::array< RemoteDataRefPackTy, V_COUNT > REMOTE_DR_DEF An array holding all dataRef packing definitions. Definition: Remote.cpp:36 Here are the classes, structs, unions and interfaces with brief descriptions: [detail level 123]
Aircraft(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="") | XPMP2::Aircraft | Aircraft() | XPMP2::Aircraft | GetGS_kn() const | XPMP2::Aircraft | inline | GetHeading() const | XPMP2::Aircraft | inline | GetInfoTexts(XPMPInfoTexts_t *outInfoTexts) | LegacySampleAircraft | inlinevirtual | GetYokeHeadingRatio() const | XPMP2::Aircraft | inline | GetYokePitchRatio() const | XPMP2::Aircraft | inline | SoundVolume(FMOD_CHANNEL *pChn, float vol) | XPMP2::Aircraft | tcasTargetIdx | XPMP2::Aircraft | protected | tsResetTouchDown | XPMP2::Aircraft | protected | UpdateDistBearingCamera(const XPLMCameraPosition_t &posCam) | XPMP2::Aircraft | protected | UpdatePosition(float _elapsedSinceLastCall, int _flCounter) | XPCAircraft | virtual | ~Aircraft() | XPMP2::Aircraft | virtual | |
v_x/z
More...Additional Inherited Members | |
Public Types inherited from XPMP2::Aircraft | |
enum | SoundEventsTy { + SND_ENG = 0 +, SND_REVERSE_THRUST +, SND_TIRE +, SND_GEAR +, + SND_FLAPS +, SND_NUM_EVENTS + + } |
Types of sound supported directly by XPMP2. More... | |
typedef std::list< FMOD_CHANNEL * > | ChnListTy |
List of FMOD channels, also beyond sounds created for SoundEvetsTy. More... | |
Public Attributes inherited from XPCAircraft | |
XPMPPlanePosition_t | acPos |
Last position data. GetPlanePosition() passes a pointer to this member variable. More... | |
XPMPInfoTexts_t | acInfoTexts |
Informational texts passed on via multiplayer shared dataRefs. More... | |
int | sndMinDist = 50.0 |
Minimum distance in [m] to play sound in full volume, the larger the 'louder' the aircraft. More... | |
Protected Member Functions inherited from XPMP2::Aircraft | |
void | DoMove () |
Internal: This puts the instance into XP's sky and makes it move. More... | |
virtual void | SetTcasTargetIdx (int _idx) |
Define the TCAS target index in use. More... | |
virtual void | SoundSetup () |
Sound-related initializations, called by Create() and ChangeModel() More... | |
virtual void | SoundUpdate () |
Update sound, like position and volume, called once per frame. More... | |
virtual void | SoundRemoveAll () |
Remove all sound, e.g. during destruction. More... | |
Static Protected Member Functions inherited from XPMP2::Aircraft | |
static float | FlightLoopCB (float, float, int, void *) |
Internal: Flight loop callback function controlling update and movement of all planes. More... | |
float | prev_ts = 0.0f |
last update of prev_x/y/z in XP's network time More... | |
float | v_x = 0.0f |
float | v_y = 0.0f |
float | v_z = 0.0f |
Cartesian velocity in m/s per axis. More... | |
float | gs_kn = 0.0f |
float | tsResetTouchDown = NAN |
Set by SetOnGrnd() with the timestamp when to reset SetTouchDown() More... | |
ground speed in [kn] based on above v_x/z More... | |
std::list< XPLMInstanceRef > | listInst |
X-Plane instance handles for all objects making up the model. More... | |
std::string | mapLabel |
label for map drawing More... | |
SndChTy | aSndCh [SND_NUM_EVENTS] |
Operational values per sound channel, that is triggered by a standard sound event. More... | |
bool | bChnLowPass = false |
Is Low Pass Filter currently being active? More... | |
bool | bChnMuted = false |
Is sound for this aircraft currently muted? More... | |
ChnListTy | chnList |
List of channels produced via calls to SoundPlay() More... | |
int | skipCounter = 0 |
Counts how often we skipped expensive computations. More... | |
Subclassing XPCAircraft to create our own class.
diff --git a/docs/html/classRemoteAC-members.html b/docs/html/classRemoteAC-members.html index 58969479..24b4e457 100644 --- a/docs/html/classRemoteAC-members.html +++ b/docs/html/classRemoteAC-members.html @@ -57,44 +57,50 @@v_x/z
More...Protected Attributes | |
float | prev_ts = 0.0f |
last update of prev_x/y/z in XP's network time More... | |
float | v_x = 0.0f |
float | v_y = 0.0f |
float | v_z = 0.0f |
Cartesian velocity in m/s per axis. More... | |
float | gs_kn = 0.0f |
float | tsResetTouchDown = NAN |
Set by SetOnGrnd() with the timestamp when to reset SetTouchDown() More... | |
ground speed in [kn] based on above v_x/z More... | |
std::list< XPLMInstanceRef > | listInst |
X-Plane instance handles for all objects making up the model. More... | |
std::string | mapLabel |
label for map drawing More... | |
SndChTy | aSndCh [SND_NUM_EVENTS] |
Operational values per sound channel, that is triggered by a standard sound event. More... | |
bool | bChnLowPass = false |
Is Low Pass Filter currently being active? More... | |
bool | bChnMuted = false |
Is sound for this aircraft currently muted? More... | |
ChnListTy | chnList |
List of channels produced via calls to SoundPlay() More... | |
int | skipCounter = 0 |
Counts how often we skipped expensive computations. More... | |
Additional Inherited Members | ||
Public Types inherited from XPMP2::Aircraft | ||
enum | SoundEventsTy { + SND_ENG = 0 +, SND_REVERSE_THRUST +, SND_TIRE +, SND_GEAR +, + SND_FLAPS +, SND_NUM_EVENTS + + } | |
Types of sound supported directly by XPMP2. More... | ||
typedef std::list< FMOD_CHANNEL * > | ChnListTy | |
List of FMOD channels, also beyond sounds created for SoundEvetsTy. More... | ||
Public Attributes inherited from XPMP2::Aircraft | ||
std::string | acIcaoType | |
ICAO aircraft type designator of this plane. More... | ||
XPMPInfoTexts_t | acInfoTexts | |
Informational texts passed on via multiplayer shared dataRefs. More... | ||
int | sndMinDist = 50.0 | |
Minimum distance in [m] to play sound in full volume, the larger the 'louder' the aircraft. More... | ||
Protected Member Functions inherited from XPMP2::Aircraft | ||
void | DoMove () | |
Internal: This puts the instance into XP's sky and makes it move. More... | ||
virtual void | SetTcasTargetIdx (int _idx) | |
Define the TCAS target index in use. More... | ||
virtual void | SoundSetup () | |
Sound-related initializations, called by Create() and ChangeModel() More... | ||
virtual void | SoundUpdate () | |
Update sound, like position and volume, called once per frame. More... | ||
virtual void | SoundRemoveAll () | |
Remove all sound, e.g. during destruction. More... | ||
Static Protected Member Functions inherited from XPMP2::Aircraft | ||
static float | FlightLoopCB (float, float, int, void *) | |
Internal: Flight loop callback function controlling update and movement of all planes. More... | ||
Aircraft(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="") | XPMP2::Aircraft | |
Aircraft() | XPMP2::Aircraft | |
Aircraft(const Aircraft &)=delete | XPMP2::Aircraft | |
AssignModel(const std::string &_cslId, CSLModel *_pCSLModel=nullptr) | XPMP2::Aircraft | |
bClampToGround | XPMP2::Aircraft | |
bDrawLabel | XPMP2::Aircraft | |
bOnGrnd | XPMP2::Aircraft | |
bRender | XPMP2::Aircraft | protected |
bValid | XPMP2::Aircraft | protected |
bVisible | XPMP2::Aircraft | protected |
camBearing | XPMP2::Aircraft | protected |
camDist | XPMP2::Aircraft | protected |
camTimLstUpd | XPMP2::Aircraft | protected |
ChangeModel(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery) | XPMP2::Aircraft | |
ClampToGround() | XPMP2::Aircraft | protected |
colLabel | XPMP2::Aircraft | |
ComputeMapLabel() | XPMP2::Aircraft | protectedvirtual |
Create(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="", CSLModel *_pCSLModel=nullptr) | XPMP2::Aircraft | |
CreateInstances() | XPMP2::Aircraft | protected |
DestroyInstances() | XPMP2::Aircraft | protected |
DoMove() | XPMP2::Aircraft | protected |
drawInfo | XPMP2::Aircraft | |
FlightLoopCB(float, float, int, void *) | XPMP2::Aircraft | protectedstatic |
gearDeflectRatio | XPMP2::Aircraft | |
GetAoA() const | XPMP2::Aircraft | inlinevirtual |
GetCameraBearing() const | XPMP2::Aircraft | inline |
GetCameraDist() const | XPMP2::Aircraft | inline |
GetEngineRotAngle() const | XPMP2::Aircraft | inline |
GetEngineRotAngle(size_t idx) const | XPMP2::Aircraft | inline |
GetEngineRotRad() const | XPMP2::Aircraft | inline |
GetEngineRotRad(size_t idx) const | XPMP2::Aircraft | inline |
GetEngineRotRpm() const | XPMP2::Aircraft | inline |
GetEngineRotRpm(size_t idx) const | XPMP2::Aircraft | inline |
GetFlapRatio() const | XPMP2::Aircraft | inline |
GetFlightId() const | XPMP2::Aircraft | virtual |
GetGearRatio() const | XPMP2::Aircraft | inline |
aSndCh | XPMP2::Aircraft | protected |
AssignModel(const std::string &_cslId, CSLModel *_pCSLModel=nullptr) | XPMP2::Aircraft | |
bChnLowPass | XPMP2::Aircraft | protected |
bChnMuted | XPMP2::Aircraft | protected |
bClampToGround | XPMP2::Aircraft | |
bDrawLabel | XPMP2::Aircraft | |
bOnGrnd | XPMP2::Aircraft | |
bRender | XPMP2::Aircraft | protected |
bValid | XPMP2::Aircraft | protected |
bVisible | XPMP2::Aircraft | protected |
camBearing | XPMP2::Aircraft | protected |
camDist | XPMP2::Aircraft | protected |
camTimLstUpd | XPMP2::Aircraft | protected |
ChangeModel(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery) | XPMP2::Aircraft | |
chnList | XPMP2::Aircraft | protected |
ChnListTy typedef | XPMP2::Aircraft | |
ClampToGround() | XPMP2::Aircraft | protected |
colLabel | XPMP2::Aircraft | |
ComputeMapLabel() | XPMP2::Aircraft | protectedvirtual |
Create(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="", CSLModel *_pCSLModel=nullptr) | XPMP2::Aircraft | |
CreateInstances() | XPMP2::Aircraft | protected |
DestroyInstances() | XPMP2::Aircraft | protected |
DoMove() | XPMP2::Aircraft | protected |
drawInfo | XPMP2::Aircraft | |
FlightLoopCB(float, float, int, void *) | XPMP2::Aircraft | protectedstatic |
gearDeflectRatio | XPMP2::Aircraft | |
GetAoA() const | XPMP2::Aircraft | inlinevirtual |
GetCameraBearing() const | XPMP2::Aircraft | inline |
GetCameraDist() const | XPMP2::Aircraft | inline |
GetEngineRotAngle() const | XPMP2::Aircraft | inline |
GetEngineRotAngle(size_t idx) const | XPMP2::Aircraft | inline |
GetEngineRotRad() const | XPMP2::Aircraft | inline |
GetEngineRotRad(size_t idx) const | XPMP2::Aircraft | inline |
GetEngineRotRpm() const | XPMP2::Aircraft | inline |
GetEngineRotRpm(size_t idx) const | XPMP2::Aircraft | inline |
GetFlapRatio() const | XPMP2::Aircraft | inline |
GetFlightId() const | XPMP2::Aircraft | virtual |
GetGearRatio() const | XPMP2::Aircraft | inline |
GetGS_kn() const | XPMP2::Aircraft | inline |
GetHeading() const | XPMP2::Aircraft | inline |
GetLift() const | XPMP2::Aircraft | inlinevirtual |
GetLightsBeacon() const | XPMP2::Aircraft | inline |
GetYokeHeadingRatio() const | XPMP2::Aircraft | inline |
GetYokePitchRatio() const | XPMP2::Aircraft | inline |
GetYokeRollRatio() const | XPMP2::Aircraft | inline |
hProbe | XPMP2::Aircraft | protected |
IsCurrentlyShownAsAI() const | XPMP2::Aircraft | |
IsCurrentlyShownAsTcasTarget() const | XPMP2::Aircraft | inline |
IsGroundVehicle() const | XPMP2::Aircraft | |
IsInstanciated() const | XPMP2::Aircraft | inline |
IsOnGrnd() const | XPMP2::Aircraft | inline |
IsRelatedTo(const std::string &_icaoType) const | XPMP2::Aircraft | |
IsRendered() const | XPMP2::Aircraft | inline |
IsValid() const | XPMP2::Aircraft | inline |
IsVisible() const | XPMP2::Aircraft | inline |
label | XPMP2::Aircraft | |
listInst | XPMP2::Aircraft | protected |
MapDrawIcon(XPLMMapLayerID inLayer, float acSize) | XPMP2::Aircraft | |
MapDrawLabel(XPLMMapLayerID inLayer, float yOfs) | XPMP2::Aircraft | |
MapFindIcon() | XPMP2::Aircraft | |
mapIconCol | XPMP2::Aircraft | protected |
mapIconRow | XPMP2::Aircraft | protected |
mapLabel | XPMP2::Aircraft | protected |
MapPreparePos(XPLMMapProjectionID projection, const float boundsLTRB[4]) | XPMP2::Aircraft | |
mapX | XPMP2::Aircraft | protected |
mapY | XPMP2::Aircraft | protected |
matchQuality | XPMP2::Aircraft | protected |
modeS_id | XPMP2::Aircraft | protected |
operator=(const Aircraft &)=delete | XPMP2::Aircraft | |
pCSLMdl | XPMP2::Aircraft | protected |
prev_ts | XPMP2::Aircraft | protected |
prev_x | XPMP2::Aircraft | protected |
prev_y | XPMP2::Aircraft | protected |
prev_z | XPMP2::Aircraft | protected |
ReMatchModel() | XPMP2::Aircraft | inline |
ResetTcasTargetIdx() | XPMP2::Aircraft | inline |
SampleAircraft(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="") | SampleAircraft | inline |
SetDrawLabel(bool _b) | XPMP2::Aircraft | inline |
SetEngineRotAngle(float _deg) | XPMP2::Aircraft | |
SetEngineRotAngle(size_t idx, float _deg) | XPMP2::Aircraft | |
SetEngineRotRad(float _rad) | XPMP2::Aircraft | |
SetEngineRotRad(size_t idx, float _rad) | XPMP2::Aircraft | |
SetEngineRotRpm(float _rpm) | XPMP2::Aircraft | |
SetEngineRotRpm(size_t idx, float _rpm) | XPMP2::Aircraft | |
SetFlapRatio(float _f) | XPMP2::Aircraft | inline |
SetGearRatio(float _f) | XPMP2::Aircraft | inline |
SetHeading(float _deg) | XPMP2::Aircraft | inline |
SetInvalid() | XPMP2::Aircraft | virtual |
SetLightsBeacon(bool _b) | XPMP2::Aircraft | inline |
SetLightsLanding(bool _b) | XPMP2::Aircraft | inline |
SetLightsNav(bool _b) | XPMP2::Aircraft | inline |
SetLightsStrobe(bool _b) | XPMP2::Aircraft | inline |
SetLightsTaxi(bool _b) | XPMP2::Aircraft | inline |
SetLocalLoc(float _x, float _y, float _z) | XPMP2::Aircraft | inline |
SetLocation(double lat, double lon, double alt_ft, bool on_grnd, float setTouchDownTime=NAN) | XPMP2::Aircraft | inline |
SetLocation(double lat, double lon, double alt_ft) | XPMP2::Aircraft | |
SetMass(float _kg) | XPMP2::Aircraft | inline |
SetNoseGearDeflection(float _mtr) | XPMP2::Aircraft | inline |
SetNoseWheelAngle(float _f) | XPMP2::Aircraft | inline |
SetOnGrnd(bool on_grnd, float setTouchDownTime=NAN) | XPMP2::Aircraft | |
SetPitch(float _deg) | XPMP2::Aircraft | inline |
SetPropRotAngle(float _deg) | XPMP2::Aircraft | inline |
SetPropRotRad(float _rad) | XPMP2::Aircraft | inline |
SetPropRotRpm(float _rpm) | XPMP2::Aircraft | inline |
SetRender(bool _bRender) | XPMP2::Aircraft | virtual |
SetReversDeployRatio(float _f) | XPMP2::Aircraft | inline |
SetRoll(float _deg) | XPMP2::Aircraft | inline |
SetSlatRatio(float _f) | XPMP2::Aircraft | inline |
SetSpeedbrakeRatio(float _f) | XPMP2::Aircraft | inline |
SetSpoilerRatio(float _f) | XPMP2::Aircraft | inline |
SetTcasTargetIdx(int _idx) | XPMP2::Aircraft | inlineprotectedvirtual |
SetThrustRatio(float _f) | XPMP2::Aircraft | inline |
SetThrustReversRatio(float _f) | XPMP2::Aircraft | inline |
SetTireDeflection(float _mtr) | XPMP2::Aircraft | inline |
SetTireRotAngle(float _deg) | XPMP2::Aircraft | inline |
SetTireRotRad(float _rad) | XPMP2::Aircraft | inline |
SetTireRotRpm(float _rpm) | XPMP2::Aircraft | inline |
SetTouchDown(bool _b) | XPMP2::Aircraft | inline |
SetVisible(bool _bVisible) | XPMP2::Aircraft | virtual |
SetWingArea(float _m2) | XPMP2::Aircraft | inline |
SetWingSpan(float _m) | XPMP2::Aircraft | inline |
SetWingSweepRatio(float _f) | XPMP2::Aircraft | inline |
SetYokeHeadingRatio(float _f) | XPMP2::Aircraft | inline |
SetYokePitchRatio(float _f) | XPMP2::Aircraft | inline |
SetYokeRollRatio(float _f) | XPMP2::Aircraft | inline |
ShallDrawLabel() const | XPMP2::Aircraft | inline |
ShowAsAIPlane() const | XPMP2::Aircraft | inline |
gs_kn | XPMP2::Aircraft | protected |
hProbe | XPMP2::Aircraft | protected |
IsCurrentlyShownAsAI() const | XPMP2::Aircraft | |
IsCurrentlyShownAsTcasTarget() const | XPMP2::Aircraft | inline |
IsGroundVehicle() const | XPMP2::Aircraft | |
IsInstanciated() const | XPMP2::Aircraft | inline |
IsOnGrnd() const | XPMP2::Aircraft | inline |
IsRelatedTo(const std::string &_icaoType) const | XPMP2::Aircraft | |
IsRendered() const | XPMP2::Aircraft | inline |
IsValid() const | XPMP2::Aircraft | inline |
IsVisible() const | XPMP2::Aircraft | inline |
label | XPMP2::Aircraft | |
listInst | XPMP2::Aircraft | protected |
MapDrawIcon(XPLMMapLayerID inLayer, float acSize) | XPMP2::Aircraft | |
MapDrawLabel(XPLMMapLayerID inLayer, float yOfs) | XPMP2::Aircraft | |
MapFindIcon() | XPMP2::Aircraft | |
mapIconCol | XPMP2::Aircraft | protected |
mapIconRow | XPMP2::Aircraft | protected |
mapLabel | XPMP2::Aircraft | protected |
MapPreparePos(XPLMMapProjectionID projection, const float boundsLTRB[4]) | XPMP2::Aircraft | |
mapX | XPMP2::Aircraft | protected |
mapY | XPMP2::Aircraft | protected |
matchQuality | XPMP2::Aircraft | protected |
modeS_id | XPMP2::Aircraft | protected |
operator=(const Aircraft &)=delete | XPMP2::Aircraft | |
pCSLMdl | XPMP2::Aircraft | protected |
prev_ts | XPMP2::Aircraft | protected |
prev_x | XPMP2::Aircraft | protected |
prev_y | XPMP2::Aircraft | protected |
prev_z | XPMP2::Aircraft | protected |
ReMatchModel() | XPMP2::Aircraft | inline |
ResetTcasTargetIdx() | XPMP2::Aircraft | inline |
SampleAircraft(const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="") | SampleAircraft | inline |
SetDrawLabel(bool _b) | XPMP2::Aircraft | inline |
SetEngineRotAngle(float _deg) | XPMP2::Aircraft | |
SetEngineRotAngle(size_t idx, float _deg) | XPMP2::Aircraft | |
SetEngineRotRad(float _rad) | XPMP2::Aircraft | |
SetEngineRotRad(size_t idx, float _rad) | XPMP2::Aircraft | |
SetEngineRotRpm(float _rpm) | XPMP2::Aircraft | |
SetEngineRotRpm(size_t idx, float _rpm) | XPMP2::Aircraft | |
SetFlapRatio(float _f) | XPMP2::Aircraft | inline |
SetGearRatio(float _f) | XPMP2::Aircraft | inline |
SetHeading(float _deg) | XPMP2::Aircraft | inline |
SetInvalid() | XPMP2::Aircraft | virtual |
SetLightsBeacon(bool _b) | XPMP2::Aircraft | inline |
SetLightsLanding(bool _b) | XPMP2::Aircraft | inline |
SetLightsNav(bool _b) | XPMP2::Aircraft | inline |
SetLightsStrobe(bool _b) | XPMP2::Aircraft | inline |
SetLightsTaxi(bool _b) | XPMP2::Aircraft | inline |
SetLocalLoc(float _x, float _y, float _z) | XPMP2::Aircraft | inline |
SetLocation(double lat, double lon, double alt_ft, bool on_grnd, float setTouchDownTime=NAN) | XPMP2::Aircraft | inline |
SetLocation(double lat, double lon, double alt_ft) | XPMP2::Aircraft | |
SetMass(float _kg) | XPMP2::Aircraft | inline |
SetNoseGearDeflection(float _mtr) | XPMP2::Aircraft | inline |
SetNoseWheelAngle(float _f) | XPMP2::Aircraft | inline |
SetOnGrnd(bool on_grnd, float setTouchDownTime=NAN) | XPMP2::Aircraft | |
SetPitch(float _deg) | XPMP2::Aircraft | inline |
SetPropRotAngle(float _deg) | XPMP2::Aircraft | inline |
SetPropRotRad(float _rad) | XPMP2::Aircraft | inline |
SetPropRotRpm(float _rpm) | XPMP2::Aircraft | inline |
SetRender(bool _bRender) | XPMP2::Aircraft | virtual |
SetReversDeployRatio(float _f) | XPMP2::Aircraft | inline |
SetRoll(float _deg) | XPMP2::Aircraft | inline |
SetSlatRatio(float _f) | XPMP2::Aircraft | inline |
SetSpeedbrakeRatio(float _f) | XPMP2::Aircraft | inline |
SetSpoilerRatio(float _f) | XPMP2::Aircraft | inline |
SetTcasTargetIdx(int _idx) | XPMP2::Aircraft | inlineprotectedvirtual |
SetThrustRatio(float _f) | XPMP2::Aircraft | inline |
SetThrustReversRatio(float _f) | XPMP2::Aircraft | inline |
SetTireDeflection(float _mtr) | XPMP2::Aircraft | inline |
SetTireRotAngle(float _deg) | XPMP2::Aircraft | inline |
SetTireRotRad(float _rad) | XPMP2::Aircraft | inline |
SetTireRotRpm(float _rpm) | XPMP2::Aircraft | inline |
SetTouchDown(bool _b) | XPMP2::Aircraft | inline |
SetVisible(bool _bVisible) | XPMP2::Aircraft | virtual |
SetWingArea(float _m2) | XPMP2::Aircraft | inline |
SetWingSpan(float _m) | XPMP2::Aircraft | inline |
SetWingSweepRatio(float _f) | XPMP2::Aircraft | inline |
SetYokeHeadingRatio(float _f) | XPMP2::Aircraft | inline |
SetYokePitchRatio(float _f) | XPMP2::Aircraft | inline |
SetYokeRollRatio(float _f) | XPMP2::Aircraft | inline |
ShallDrawLabel() const | XPMP2::Aircraft | inline |
ShowAsAIPlane() const | XPMP2::Aircraft | inline |
skipCounter | XPMP2::Aircraft | protected |
SND_ENG enum value | XPMP2::Aircraft | |
SND_FLAPS enum value | XPMP2::Aircraft | |
SND_GEAR enum value | XPMP2::Aircraft | |
SND_NUM_EVENTS enum value | XPMP2::Aircraft | |
SND_REVERSE_THRUST enum value | XPMP2::Aircraft | |
SND_TIRE enum value | XPMP2::Aircraft | |
sndMinDist | XPMP2::Aircraft | |
SoundEventsTy enum name | XPMP2::Aircraft | |
SoundGetName(SoundEventsTy sndEvent, float &volAdj) const | XPMP2::Aircraft | virtual |
SoundMuteAll(bool bMute) | XPMP2::Aircraft | |
SoundPlay(const std::string &sndName, float vol=1.0f) | XPMP2::Aircraft | |
SoundRemoveAll() | XPMP2::Aircraft | protectedvirtual |
SoundSetup() | XPMP2::Aircraft | protectedvirtual |
SoundStop(FMOD_CHANNEL *pChn) | XPMP2::Aircraft | |
SoundUpdate() | XPMP2::Aircraft | protectedvirtual |
SoundVolume(FMOD_CHANNEL *pChn, float vol) | XPMP2::Aircraft | |
tcasTargetIdx | XPMP2::Aircraft | protected |
tsResetTouchDown | XPMP2::Aircraft | protected |
UpdateDistBearingCamera(const XPLMCameraPosition_t &posCam) | XPMP2::Aircraft | protected |
UpdatePosition(float, int) | SampleAircraft | inlinevirtual |
v | XPMP2::Aircraft | |
vertOfsRatio | XPMP2::Aircraft | |
wake | XPMP2::Aircraft | |
WakeApplyDefaults(bool _bOverwriteAllFields=true) | XPMP2::Aircraft | |
~Aircraft() | XPMP2::Aircraft | virtual |
v_x | XPMP2::Aircraft | protected |
v_y | XPMP2::Aircraft | protected |
v_z | XPMP2::Aircraft | protected |
vertOfsRatio | XPMP2::Aircraft | |
wake | XPMP2::Aircraft | |
WakeApplyDefaults(bool _bOverwriteAllFields=true) | XPMP2::Aircraft | |
~Aircraft() | XPMP2::Aircraft | virtual |
v_x/z
More...Additional Inherited Members | |
Public Types inherited from XPMP2::Aircraft | |
enum | SoundEventsTy { + SND_ENG = 0 +, SND_REVERSE_THRUST +, SND_TIRE +, SND_GEAR +, + SND_FLAPS +, SND_NUM_EVENTS + + } |
Types of sound supported directly by XPMP2. More... | |
typedef std::list< FMOD_CHANNEL * > | ChnListTy |
List of FMOD channels, also beyond sounds created for SoundEvetsTy. More... | |
Public Attributes inherited from XPMP2::Aircraft | |
std::string | acIcaoType |
ICAO aircraft type designator of this plane. More... | |
XPMPInfoTexts_t | acInfoTexts |
Informational texts passed on via multiplayer shared dataRefs. More... | |
int | sndMinDist = 50.0 |
Minimum distance in [m] to play sound in full volume, the larger the 'louder' the aircraft. More... | |
Protected Member Functions inherited from XPMP2::Aircraft | |
void | DoMove () |
Internal: This puts the instance into XP's sky and makes it move. More... | |
virtual void | SetTcasTargetIdx (int _idx) |
Define the TCAS target index in use. More... | |
virtual void | SoundSetup () |
Sound-related initializations, called by Create() and ChangeModel() More... | |
virtual void | SoundUpdate () |
Update sound, like position and volume, called once per frame. More... | |
virtual void | SoundRemoveAll () |
Remove all sound, e.g. during destruction. More... | |
Static Protected Member Functions inherited from XPMP2::Aircraft | |
static float | FlightLoopCB (float, float, int, void *) |
Internal: Flight loop callback function controlling update and movement of all planes. More... | |
float | prev_ts = 0.0f |
last update of prev_x/y/z in XP's network time More... | |
float | v_x = 0.0f |
float | v_y = 0.0f |
float | v_z = 0.0f |
Cartesian velocity in m/s per axis. More... | |
float | gs_kn = 0.0f |
float | tsResetTouchDown = NAN |
Set by SetOnGrnd() with the timestamp when to reset SetTouchDown() More... | |
ground speed in [kn] based on above v_x/z More... | |
std::list< XPLMInstanceRef > | listInst |
X-Plane instance handles for all objects making up the model. More... | |
std::string | mapLabel |
label for map drawing More... | |
SndChTy | aSndCh [SND_NUM_EVENTS] |
Operational values per sound channel, that is triggered by a standard sound event. More... | |
bool | bChnLowPass = false |
Is Low Pass Filter currently being active? More... | |
bool | bChnMuted = false |
Is sound for this aircraft currently muted? More... | |
ChnListTy | chnList |
List of channels produced via calls to SoundPlay() More... | |
int | skipCounter = 0 |
Counts how often we skipped expensive computations. More... | |
Subclassing XPMP2::Aircraft to create our own class.
diff --git a/docs/html/classXPCAircraft-members.html b/docs/html/classXPCAircraft-members.html index 68bf8ed9..eb642dd5 100644 --- a/docs/html/classXPCAircraft-members.html +++ b/docs/html/classXPCAircraft-members.html @@ -58,39 +58,45 @@v_x/z
More...Public Attributes | |
XPMPInfoTexts_t | acInfoTexts |
Informational texts passed on via multiplayer shared dataRefs. More... | |
int | sndMinDist = 50.0 |
Minimum distance in [m] to play sound in full volume, the larger the 'louder' the aircraft. More... | |
Additional Inherited Members | |
Public Types inherited from XPMP2::Aircraft | |
enum | SoundEventsTy { + SND_ENG = 0 +, SND_REVERSE_THRUST +, SND_TIRE +, SND_GEAR +, + SND_FLAPS +, SND_NUM_EVENTS + + } |
Types of sound supported directly by XPMP2. More... | |
typedef std::list< FMOD_CHANNEL * > | ChnListTy |
List of FMOD channels, also beyond sounds created for SoundEvetsTy. More... | |
Protected Member Functions inherited from XPMP2::Aircraft | |
void | DoMove () |
Internal: This puts the instance into XP's sky and makes it move. More... | |
virtual void | SetTcasTargetIdx (int _idx) |
Define the TCAS target index in use. More... | |
virtual void | SoundSetup () |
Sound-related initializations, called by Create() and ChangeModel() More... | |
virtual void | SoundUpdate () |
Update sound, like position and volume, called once per frame. More... | |
virtual void | SoundRemoveAll () |
Remove all sound, e.g. during destruction. More... | |
Static Protected Member Functions inherited from XPMP2::Aircraft | |
static float | FlightLoopCB (float, float, int, void *) |
Internal: Flight loop callback function controlling update and movement of all planes. More... | |
float | prev_ts = 0.0f |
last update of prev_x/y/z in XP's network time More... | |
float | v_x = 0.0f |
float | v_y = 0.0f |
float | v_z = 0.0f |
Cartesian velocity in m/s per axis. More... | |
float | gs_kn = 0.0f |
float | tsResetTouchDown = NAN |
Set by SetOnGrnd() with the timestamp when to reset SetTouchDown() More... | |
ground speed in [kn] based on above v_x/z More... | |
std::list< XPLMInstanceRef > | listInst |
X-Plane instance handles for all objects making up the model. More... | |
std::string | mapLabel |
label for map drawing More... | |
SndChTy | aSndCh [SND_NUM_EVENTS] |
Operational values per sound channel, that is triggered by a standard sound event. More... | |
bool | bChnLowPass = false |
Is Low Pass Filter currently being active? More... | |
bool | bChnMuted = false |
Is sound for this aircraft currently muted? More... | |
ChnListTy | chnList |
List of channels produced via calls to SoundPlay() More... | |
int | skipCounter = 0 |
Counts how often we skipped expensive computations. More... | |
Legacy wrapper class as provided by original libxplanemp.
@@ -679,7 +749,7 @@OBJ8_AIRCRAFT
line) Actual representation of all aircraft in XPMP2. +
Actual representation of all aircraft in XPMP2. More...
#include <XPMPAircraft.h>
Classes | |
struct | SndChTy |
Operational values per sound channel, that is triggered by a standard sound event. More... | |
struct | wakeTy |
Wake dataRef support. More... | |
+Public Types | |
enum | SoundEventsTy { + SND_ENG = 0 +, SND_REVERSE_THRUST +, SND_TIRE +, SND_GEAR +, + SND_FLAPS +, SND_NUM_EVENTS + + } |
Types of sound supported directly by XPMP2. More... | |
typedef std::list< FMOD_CHANNEL * > | ChnListTy |
List of FMOD channels, also beyond sounds created for SoundEvetsTy. More... | |
Public Member Functions | |
Construction | |
Aircraft (const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="") | |
Constructor creates a new aircraft object, which will be managed and displayed. More... | |
void | Create (const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery, XPMPPlaneID _modeS_id=0, const std::string &_cslId="", CSLModel *_pCSLModel=nullptr) |
Creates a plane, only a valid operation if object was created using the default constructor. More... | |
Information | |
XPMPPlaneID | GetModeS_ID () const |
return the XPMP2 plane id More... | |
return the XPMP2 plane id More... | |
bool | IsGroundVehicle () const |
Is this object a ground vehicle? More... | |
virtual std::string | GetFlightId () const |
Return a value for dataRef .../tcas/target/flight_id. More... | |
Model Matching | |
int | ChangeModel (const std::string &_icaoType, const std::string &_icaoAirline, const std::string &_livery) |
(Potentially) changes the plane's model after doing a new match attempt More... | |
int | GetMatchQuality () const |
quality of the match with the CSL model More... | |
Visualization | |
float | GetVertOfs () const |
Vertical offset, ie. the value that needs to be added to drawInfo.y to make the aircraft appear on the ground. More... | |
void | SetOnGrnd (bool on_grnd, float setTouchDownTime=NAN) |
Set if the aircraft is on the ground. More... | |
Getters and Setters for the values in Aircraft::drawInfo | |
void | SetLocation (double lat, double lon, double alt_ft, bool on_grnd, float setTouchDownTime=NAN) |
Converts world coordinates to local coordinates, writes to Aircraft::drawInfo. More... | |
void | SetRoll (float _deg) |
roll [degree] More... | |
float | GetGS_kn () const |
Rough estimate of a ground speed based on v_x/z More... | |
Getters and Setters for the values in the Aircraft::v array | |
float | GetGearRatio () const |
Gear deploy ratio. More... | |
void | SetTouchDown (bool _b) |
Moment of touch down. More... | |
Wake support as per X-Plane 12 | |
void | WakeApplyDefaults (bool _bOverwriteAllFields=true) |
Fill in default wake turbulence support data based on Doc8643 wake turbulence category. More... | |
Angle of Attach, returns pitch (but you can override in your class) More... | |
virtual float | GetLift () const |
Lift produced. You should override to blend in/out for take-off/landing, but XPMP2 has no dynamic info of your plane, not even an on-the-ground flag. More... | |
Lift produced. You should override to blend in/out for take-off/landing, but XPMP2 has no dynamic info of your plane, not even an on-the-ground flag. More... | |
Map Support | |
| |
void | MapFindIcon () |
Determine which map icon to use for this aircraft. More... | |
void | MapDrawLabel (XPLMMapLayerID inLayer, float yOfs) |
Actually draw the map label. More... | |
Sound Support | |
| |
FMOD_CHANNEL * | SoundPlay (const std::string &sndName, float vol=1.0f) |
Play a sound; a looping sound plays until explicitely stopped. More... | |
void | SoundStop (FMOD_CHANNEL *pChn) |
Stop a continuously playing sound. More... | |
void | SoundVolume (FMOD_CHANNEL *pChn, float vol) |
Sets the sound's volume (after applying master volume and Sound File's adjustments) More... | |
void | SoundMuteAll (bool bMute) |
Mute/Unmute all sounds of the airplane temporarily. More... | |
virtual std::string | SoundGetName (SoundEventsTy sndEvent, float &volAdj) const |
Returns the name of the sound to play per event. More... | |
Public Attributes | |
XPMPInfoTexts_t | acInfoTexts |
Informational texts passed on via multiplayer shared dataRefs. More... | |
int | sndMinDist = 50.0 |
Minimum distance in [m] to play sound in full volume, the larger the 'louder' the aircraft. More... | |
Protected Member Functions | |
Internal Control Functions | |
void | DoMove () |
Internal: This puts the instance into XP's sky and makes it move. More... | |
virtual void | SetTcasTargetIdx (int _idx) |
Define the TCAS target index in use. More... | |
Sound Support (internal) | |
| |
virtual void | SoundSetup () |
Sound-related initializations, called by Create() and ChangeModel() More... | |
virtual void | SoundUpdate () |
Update sound, like position and volume, called once per frame. More... | |
virtual void | SoundRemoveAll () |
Remove all sound, e.g. during destruction. More... | |
Static Protected Member Functions | |
float | prev_ts = 0.0f |
last update of prev_x/y/z in XP's network time More... | |
float | v_x = 0.0f |
float | v_y = 0.0f |
float | v_z = 0.0f |
Cartesian velocity in m/s per axis. More... | |
float | gs_kn = 0.0f |
float | tsResetTouchDown = NAN |
Set by SetOnGrnd() with the timestamp when to reset SetTouchDown() More... | |
ground speed in [kn] based on above v_x/z More... | |
std::list< XPLMInstanceRef > | listInst |
X-Plane instance handles for all objects making up the model. More... | |
std::string | mapLabel |
label for map drawing More... | |
SndChTy | aSndCh [SND_NUM_EVENTS] |
Operational values per sound channel, that is triggered by a standard sound event. More... | |
bool | bChnLowPass = false |
Is Low Pass Filter currently being active? More... | |
bool | bChnMuted = false |
Is sound for this aircraft currently muted? More... | |
ChnListTy | chnList |
List of channels produced via calls to SoundPlay() More... | |
int | skipCounter = 0 |
Counts how often we skipped expensive computations. More... | |
Friends | |
Actual representation of all aircraft in XPMP2.
+Actual representation of all aircraft in XPMP2.
struct XPMP2::Aircraft::SndChTy | +
Operational values per sound channel, that is triggered by a standard sound event.
+Class Members | ||
---|---|---|
+bool | ++bAuto | ++Shall this sound event be handled automatically? (Set to false in your constructor or in Aircraft::SoundSetup() if you want to control that event type yourself) |
+float | ++lastDRVal | ++last observed dataRef value to see if sound is to be triggered |
+FMOD_CHANNEL * | ++pChn | ++channel playing the sound currently |
+float | ++volAdj | ++Volume adjustment, fed from Aircraft::SoundGetName() |
typedef std::list<FMOD_CHANNEL*> XPMP2::Aircraft::ChnListTy | +
List of FMOD channels, also beyond sounds created for SoundEvetsTy.
+ +enum XPMP2::Aircraft::SoundEventsTy | +
Types of sound supported directly by XPMP2.
+Enumerator | |
---|---|
SND_ENG | Engine sound (continuously while engine running), bases on GetThrustRatio() + |
SND_REVERSE_THRUST | Engine sound while reverse thrust (continuously while reversers deployed), bases on GetThrustReversRatio() + |
SND_TIRE | Tires rolling on the ground (continuously while rolling on ground), bases on GetTireRotRpm() + |
SND_GEAR | Gear extending/retracting (once per event), bases on GetGearRatio() + |
SND_FLAPS | Flaps extending/retracting (once per event), bases on GetFlapRatio() + |
SND_NUM_EVENTS | Number of events (always last in |
OBJ8_AIRCRAFT
line) OBJ8_AIRCRAFT
line) _cslId
if model is given this way)
+
|
+ +inline | +
Rough estimate of a ground speed based on v_x/z
Lift produced. You should override to blend in/out for take-off/landing, but XPMP2 has no dynamic info of your plane, not even an on-the-ground flag.
+Lift produced. You should override to blend in/out for take-off/landing, but XPMP2 has no dynamic info of your plane, not even an on-the-ground flag.
return the XPMP2 plane id
+return the XPMP2 plane id
@@ -4436,6 +4655,255 @@
+
|
+ +virtual | +
Returns the name of the sound to play per event.
+This standard implementation determines the engine sound via aircraft classification and returns constant names for the other sound types.
sndEvent | The type of sound event, like engine or gear | |
[out] | volAdj | Volume adjustment factor, allows to make sound louder (>1.0) or quiter, defaults to 1.0 |
void XPMP2::Aircraft::SoundMuteAll | +( | +bool | +bMute | ) | ++ |
Mute/Unmute all sounds of the airplane temporarily.
+ +FMOD_CHANNEL * XPMP2::Aircraft::SoundPlay | +( | +const std::string & | +sndName, | +
+ | + | float | +vol = 1.0f |
+
+ | ) | ++ |
Play a sound; a looping sound plays until explicitely stopped.
+sndName | One of the sounds available or registered with XPMP2, see XPMPSoundAdd() and XPMPSoundEnumerate() |
vol | [opt] Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal. |
nullptr
if unsuccessful
+
|
+ +protectedvirtual | +
Remove all sound, e.g. during destruction.
+ +
+
|
+ +protectedvirtual | +
Sound-related initializations, called by Create() and ChangeModel()
+ +void XPMP2::Aircraft::SoundStop | +( | +FMOD_CHANNEL * | +pChn | ) | ++ |
Stop a continuously playing sound.
+pChn | The channel returned by SoundLoopPlay() |
+
|
+ +protectedvirtual | +
Update sound, like position and volume, called once per frame.
+ +void XPMP2::Aircraft::SoundVolume | +( | +FMOD_CHANNEL * | +pChn, | +
+ | + | float | +vol | +
+ | ) | ++ |
Sets the sound's volume (after applying master volume and Sound File's adjustments)
+pChn | The channel returned by SoundLoopPlay() |
vol | Volume level. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal. |
Current radar status.
-mode != Standby
is of interest to XPMP2 for considering the aircraft for TCAS display mode != Standby
is of interest to XPMP2 for considering the aircraft for TCAS display
+
|
+ +protected | +
Operational values per sound channel, that is triggered by a standard sound event.
+ +
+
|
+ +protected | +
Is Low Pass Filter currently being active?
+ +
+
|
+ +protected | +
Is sound for this aircraft currently muted?
+
+
|
+ +protected | +
List of channels produced via calls to SoundPlay()
+0.0
.
+ If you don't want XPMP2 to correct for gear deflection, set 0.0
.
+
+
+
+
+
+
|
+ +protected | +
+
|
+ +protected | +
Counts how often we skipped expensive computations.
+ +int XPMP2::Aircraft::sndMinDist = 50.0 | +
Minimum distance in [m] to play sound in full volume, the larger the 'louder' the aircraft.
+Initialized based on engine type and numbers, overwrite in your constructor if you want to control "size" of aircraft in terms of its sound volume
+ground speed in [kn] based on above v_x/z
Set by SetOnGrnd() with the timestamp when to reset SetTouchDown()
@@ -5403,9 +6031,77 @@actual dataRef values to be provided to the CSL model
-XPMP2 provides a minimum set of dataRefs and also getter/setter member functions, see below. This is the one place where current dataRef values are stored. This array is passed on directly to the XP instance.
+
XPMP2 provides a minimum set of dataRefs and also getter/setter member functions, see below. This is the one place where current dataRef values are stored. This array is passed on directly to the XP instance.
The size of the vector can increase if adding user-defined dataRefs through XPMPAddModelDataRef().
+
|
+ +protected | +
+
|
+ +protected | +
+
|
+ +protected | +
Cartesian velocity in m/s per axis.
+
+
|
+ +inline | +
+ XPMP2
+
+ X-Plane multiplayer library 2 - using instancing
+ |
+
Exception class to pass on error information. + More...
++Public Member Functions | |
FmodError (const std::string &_what, FMOD_RESULT _r, int _ln, const std::string &_sFunc) | |
Constructor taking on a descriptive string and the FMOD_RESULT More... | |
void | LogErr () const |
Log myself to Log.txt as an error. More... | |
+Public Attributes | |
FMOD_RESULT | fmodRes |
the actual FMOD result code More... | |
int | ln |
line number here in the code More... | |
std::string | sFunc |
name of the function the error occurred in More... | |
Exception class to pass on error information.
+
+
|
+ +inline | +
Constructor taking on a descriptive string and the FMOD_RESULT
+
|
+ +inline | +
Log myself to Log.txt as an error.
+ +FMOD_RESULT XPMP2::FmodError::fmodRes | +
the actual FMOD result code
+ +int XPMP2::FmodError::ln | +
line number here in the code
+ +std::string XPMP2::FmodError::sFunc | +
name of the function the error occurred in
+ +