From bbbec4fb22a54dfd64fc00494fee6729b1bc1fc0 Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Thu, 8 May 2025 19:43:58 -0700 Subject: [PATCH 1/6] Build static libraries and add more platforms --- .github/workflows/ci.yml | 218 +- Box2D.NET.Bindgen/Box2D.NET.Bindgen.csproj | 21 +- Box2D.NET.Bindgen/Program.cs | 51 +- Box2D.NET.Bindings/B2.g.cs | 6412 +++++++++++------ Box2D.NET.Bindings/Box2D.NET.Bindings.csproj | 26 +- Box2D.NET.Examples/Box2D.NET.Examples.csproj | 5 +- Box2D.NET.Native/Box2D.NET.Native.csproj | 227 +- Box2D.NET.Native/Box2D.NET.Native.targets | 31 - Box2D.NET.Native/build.zig | 225 +- .../buildTransitive/Box2D.NET.Native.props | 2 + .../buildTransitive/Box2D.NET.Native.targets | 13 + Box2D.NET.Tests/Box2D.NET.Tests.csproj | 8 +- Box2D.NET.Tests/WorldTests.cs | 4 +- Box2D.NET/Box2D.NET.csproj | 27 +- Directory.Build.props | 57 +- Directory.Build.targets | 3 - 16 files changed, 4913 insertions(+), 2417 deletions(-) delete mode 100644 Box2D.NET.Native/Box2D.NET.Native.targets create mode 100644 Box2D.NET.Native/buildTransitive/Box2D.NET.Native.props create mode 100644 Box2D.NET.Native/buildTransitive/Box2D.NET.Native.targets diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0506908..06eab9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,88 +20,158 @@ on: nuget-registry: description: 'NuGet registry' required: true - default: 'GitLab' + default: 'GitHub' type: choice options: - - GitLab + - GitHub - NuGet jobs: build: - runs-on: ${{ matrix.os }} + permissions: + packages: write + strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-13, windows-latest] + fail-fast: false + matrix: + os: [ubuntu-latest, macos-13, windows-latest] steps: - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 3.1.x - 5.0.x - 6.0.x - 7.0.x - 8.0.x - - - name: Set Version Suffix - shell: bash - run: | - if [ '${{ github.event.inputs.use-auto-generated-version }}' != 'false' ]; then - echo "NugetVersionSuffix=-dev-$(date +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_ENV - fi - - - name: Restore Dependencies - shell: bash - run: dotnet restore - - - name: Generate Bindings - shell: bash - run: dotnet run --project Box2D.NET.Bindgen - - - name: Build Projects - shell: bash - run: | - dotnet build -c Debug - dotnet build -c Release - - - name: Run Tests - shell: bash - run: dotnet test - - - name: Pack Nuget Packages - shell: bash - run: | - if [ '${{ github.event.inputs.nuget-registry }}' == 'NuGet' ]; then - dotnet pack --property:NugetVersionSuffix=$NugetVersionSuffix -c Debug - dotnet pack --property:NugetVersionSuffix=$NugetVersionSuffix -c Release - else - dotnet pack --property:NugetVersionSuffix=$NugetVersionSuffix --property:Box2DPackPdb=true -c Debug - dotnet pack --property:NugetVersionSuffix=$NugetVersionSuffix --property:Box2DPackPdb=true -c Release - fi - - - name: Upload Artifacts - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: Nuget Packages - path: | - **/Box2D.NET.*.nupkg - **/Box2D.NET.*.snupkg - - - name: Push NuGet Packages - if: matrix.os == 'ubuntu-latest' && github.event_name == 'workflow_dispatch' && github.event.inputs.push-packages == 'true' - shell: bash - run: | - if [ '${{ github.event.inputs.nuget-registry }}' == 'GitLab' ]; then - dotnet nuget push **/Box2D.NET.*.nupkg --api-key '${{ secrets.GITLAB_ACCESS_TOKEN }}' --source 'https://gitlab.com/api/v4/projects/53993416/packages/nuget/index.json' - elif [ '${{ github.event.inputs.nuget-registry }}' == 'NuGet' ]; then - dotnet nuget push **/Box2D.NET.*.nupkg --api-key '${{ secrets.NUGET_ACCESS_TOKEN }}' --source 'https://api.nuget.org/v3/index.json' - fi + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Set Version Suffix + shell: bash + run: | + if [ '${{ github.event.inputs.use-auto-generated-version }}' != 'false' ]; then + echo "BuildVersionSuffix=build.$(git rev-list --count HEAD)" >> $GITHUB_ENV + fi + + - name: Setup IOS SDK + if: matrix.os == 'macos-13' + shell: bash + run: | + IOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path) + IOS_SIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path) + + echo "IOS_SDK=$IOS_SDK" >> $GITHUB_ENV + echo "IOS_SIMULATOR_SDK=$IOS_SIMULATOR_SDK" >> $GITHUB_ENV + + - name: Setup Emscripten SDK + if: matrix.os == 'macos-13' + uses: mymindstorm/setup-emsdk@v14 + with: + actions-cache-folder: 'emsdk-cache' + + - name: Setup Android NDK + if: matrix.os == 'macos-13' + uses: nttld/setup-ndk@v1 + with: + ndk-version: r25c + link-to-sdk: true + + - name: Set Android NDK variables + if: matrix.os == 'macos-13' + shell: bash + run: | + echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV + + - name: Restore Dependencies + shell: bash + run: dotnet restore + + - name: Generate Bindings + shell: bash + run: dotnet run --project Box2D.NET.Bindgen + + - name: Build Projects + shell: bash + run: | + dotnet build -c Debug + dotnet build -c Release + + - name: Build Natives + shell: bash + if: matrix.os == 'macos-13' + working-directory: Box2D.NET.Native + run: | + dotnet build -c Debug -r linux-x64 + dotnet build -c Debug -r linux-arm64 + dotnet build -c Debug -r osx-x64 + dotnet build -c Debug -r osx-arm64 + dotnet build -c Debug -r win-x64 + dotnet build -c Debug -r win-arm64 + dotnet build -c Debug -r browser-wasm + dotnet build -c Debug -r iossimulator-x64 + dotnet build -c Debug -r iossimulator-arm64 + dotnet build -c Debug -r ios-arm64 + dotnet build -c Debug -r android-arm64 + dotnet build -c Debug -r android-x64 + + dotnet build -c Release -r linux-x64 + dotnet build -c Release -r linux-arm64 + dotnet build -c Release -r osx-x64 + dotnet build -c Release -r osx-arm64 + dotnet build -c Release -r win-x64 + dotnet build -c Release -r win-arm64 + dotnet build -c Release -r browser-wasm + dotnet build -c Release -r iossimulator-x64 + dotnet build -c Release -r iossimulator-arm64 + dotnet build -c Release -r ios-arm64 + dotnet build -c Release -r android-arm64 + dotnet build -c Release -r android-x64 + + - name: Run Tests + shell: bash + run: dotnet test -p:SkipNatives=true + + - name: Pack Nuget Packages + shell: bash + run: | + dotnet pack --property:VersionSuffix=$BuildVersionSuffix -p:SkipNatives=true -p:BuildSelectorPackage=true + + if [ '${{ github.event.inputs.nuget-registry }}' == 'NuGet' ]; then + dotnet pack --property:VersionSuffix=$BuildVersionSuffix -p:SkipNatives=true -c Debug + dotnet pack --property:VersionSuffix=$BuildVersionSuffix -p:SkipNatives=true -c Release + else + dotnet pack --property:VersionSuffix=$BuildVersionSuffix --property:PackPdb=true -p:SkipNatives=true -c Debug + dotnet pack --property:VersionSuffix=$BuildVersionSuffix --property:PackPdb=true -p:SkipNatives=true -c Release + fi + + - name: Upload Artifacts + if: matrix.os == 'macos-13' + uses: actions/upload-artifact@v4 + with: + name: Nuget Packages + path: | + **/Box2D.NET.*.nupkg + **/Box2D.NET.*.snupkg + + - name: Push NuGet Packages + if: > + matrix.os == 'macos-13' && + github.repository_owner == 'BeanCheeseBurrito' && + ( + (github.event_name == 'workflow_dispatch' && github.event.inputs.push-packages == 'true') || + (github.event_name == 'push' && github.ref == 'refs/heads/main') + ) + shell: bash + run: | + if [ '${{ github.event_name }}' == 'workflow_dispatch' ]; then + if [ '${{ github.event.inputs.nuget-registry }}' == 'NuGet' ]; then + dotnet nuget push **/Box2D.NET.*.nupkg --skip-duplicate --api-key '${{ secrets.NUGET_ACCESS_TOKEN }}' --source 'https://api.nuget.org/v3/index.json' + elif [ '${{ github.event.inputs.nuget-registry }}' == 'GitHub' ]; then + dotnet nuget push **/Box2D.NET.*.nupkg --skip-duplicate --api-key '${{ secrets.GITHUB_TOKEN }}' --source 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json' + fi + elif [ '${{ github.ref }}' == 'refs/heads/main' ]; then + dotnet nuget push **/Box2D.NET.*.nupkg --skip-duplicate --api-key '${{ secrets.GITHUB_TOKEN }}' --source 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json' + fi diff --git a/Box2D.NET.Bindgen/Box2D.NET.Bindgen.csproj b/Box2D.NET.Bindgen/Box2D.NET.Bindgen.csproj index ec0391d..7a37e14 100644 --- a/Box2D.NET.Bindgen/Box2D.NET.Bindgen.csproj +++ b/Box2D.NET.Bindgen/Box2D.NET.Bindgen.csproj @@ -2,16 +2,33 @@ Exe - net7.0 + net8.0 enable enable false false + false $(NETCoreSdkRuntimeIdentifier) - + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + diff --git a/Box2D.NET.Bindgen/Program.cs b/Box2D.NET.Bindgen/Program.cs index c7b5576..16ef994 100644 --- a/Box2D.NET.Bindgen/Program.cs +++ b/Box2D.NET.Bindgen/Program.cs @@ -1,39 +1,28 @@ using System.Runtime.CompilerServices; using Bindgen.NET; -const string library = "box2d"; - BindingOptions options = new() { Namespace = "Box2D.NET.Bindings", Class = "B2", - DllImportPath = library, - DllFilePaths = - { - library, - "lib" + library, - "runtimes/linux-x64/native/lib" + library, - "runtimes/linux-arm64/native/lib" + library, - "runtimes/osx-x64/native/lib" + library, - "runtimes/osx-arm64/native/lib" + library, - "runtimes/win-x64/native/" + library, - "runtimes/win-arm64/native/" + library - }, + DllImportPath = "box2d", - IncludeBuiltInClangHeaders = true, - IncludeDirectories = { GetNativeDirectory("include") }, + SystemIncludeDirectories = { Path.Combine(BuildConstants.ZigLibPath, "include") }, + IncludeDirectories = { GetIncludeDirectory() }, TreatInputFileAsRawSourceCode = true, + OutputFile = GetOutputDirectory(), InputFile = """ - #include - #include - #include - #include - #include - #include - """, - OutputFile = GetOutputDirectory("B2.g.cs"), + #include + #include + #include + #include + #include + #include + """, + + GenerateDisableRuntimeMarshallingAttribute = true, RemappedPrefixes = { @@ -55,11 +44,7 @@ ("b2World_", "World"), ("b2_", ""), ("b2", ""), - }, - - GenerateMacros = true, - GenerateExternVariables = true, - SuppressedWarnings = { "CS9084" } + } }; BindingGenerator.Generate(options); @@ -69,12 +54,12 @@ string GetCurrentFilePath([CallerFilePath] string filePath = "") return filePath; } -string GetNativeDirectory(string path) +string GetIncludeDirectory() { - return GetCurrentFilePath() + "/../../native/box2d/" + path; + return Path.GetFullPath(GetCurrentFilePath() + "/../../native/box2d/include"); } -string GetOutputDirectory(string fileName) +string GetOutputDirectory() { - return GetCurrentFilePath() + "/../../Box2D.NET.Bindings/" + fileName; + return GetCurrentFilePath() + "/../../Box2D.NET.Bindings/B2.g.cs"; } diff --git a/Box2D.NET.Bindings/B2.g.cs b/Box2D.NET.Bindings/B2.g.cs index 69ec726..effe178 100644 --- a/Box2D.NET.Bindings/B2.g.cs +++ b/Box2D.NET.Bindings/B2.g.cs @@ -1,3157 +1,5423 @@ -#nullable enable -#pragma warning disable CS9084 -namespace Box2D.NET.Bindings -{ - public static unsafe partial class B2 - { - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Center", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 AABBCenter(AABB a); +#nullable enable +using System; +using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; + +[assembly: DisableRuntimeMarshalling] +namespace Box2D.NET.Bindings; +public static unsafe partial class B2 +{ + public partial class BindgenInternal + { + public const string DllImportPath = @"box2d"; + } - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Contains", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte AABBContains(AABB a, AABB b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Center")] + public static extern Vec2 AABBCenter(AABB a); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Extents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 AABBExtents(AABB a); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Contains")] + public static extern bool AABBContains(AABB a, AABB b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte AABBIsValid(AABB aabb); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Extents")] + public static extern Vec2 AABBExtents(AABB a); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Union", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern AABB AABBUnion(AABB a, AABB b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_IsValid")] + public static extern bool AABBIsValid(AABB aabb); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Abs", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Abs(Vec2 a); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Union")] + public static extern AABB AABBUnion(AABB a, AABB b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AbsFloat", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float AbsFloat(float a); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Abs")] + public static extern Vec2 Abs(Vec2 a); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AbsInt", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int AbsInt(int a); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AbsFloat")] + public static extern float AbsFloat(float a); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Add", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Add(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AbsInt")] + public static extern int AbsInt(int a); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyAngularImpulse", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyApplyAngularImpulse(BodyId bodyId, float impulse, byte wake); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Add")] + public static extern Vec2 Add(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyApplyForce(BodyId bodyId, Vec2 force, Vec2 point, byte wake); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyAngularImpulse")] + public static extern void BodyApplyAngularImpulse(BodyId bodyId, float impulse, bool wake); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyForceToCenter", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyApplyForceToCenter(BodyId bodyId, Vec2 force, byte wake); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyForce")] + public static extern void BodyApplyForce(BodyId bodyId, Vec2 force, Vec2 point, bool wake); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyLinearImpulse", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyApplyLinearImpulse(BodyId bodyId, Vec2 impulse, Vec2 point, byte wake); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyForceToCenter")] + public static extern void BodyApplyForceToCenter(BodyId bodyId, Vec2 force, bool wake); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyLinearImpulseToCenter", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyApplyLinearImpulseToCenter(BodyId bodyId, Vec2 impulse, byte wake); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyLinearImpulse")] + public static extern void BodyApplyLinearImpulse(BodyId bodyId, Vec2 impulse, Vec2 point, bool wake); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyMassFromShapes", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyApplyMassFromShapes(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyLinearImpulseToCenter")] + public static extern void BodyApplyLinearImpulseToCenter(BodyId bodyId, Vec2 impulse, bool wake); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyApplyTorque(BodyId bodyId, float torque, byte wake); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyMassFromShapes")] + public static extern void BodyApplyMassFromShapes(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ComputeAABB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern AABB BodyComputeAABB(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyTorque")] + public static extern void BodyApplyTorque(BodyId bodyId, float torque, bool wake); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_Disable", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyDisable(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ComputeAABB")] + public static extern AABB BodyComputeAABB(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_Enable", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyEnable(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_Disable")] + public static extern void BodyDisable(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_EnableHitEvents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyEnableHitEvents(BodyId bodyId, byte enableHitEvents); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_Enable")] + public static extern void BodyEnable(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_EnableSleep", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodyEnableSleep(BodyId bodyId, byte enableSleep); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_EnableHitEvents")] + public static extern void BodyEnableHitEvents(BodyId bodyId, bool enableHitEvents); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetAngularDamping", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float BodyGetAngularDamping(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_EnableSleep")] + public static extern void BodyEnableSleep(BodyId bodyId, bool enableSleep); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetAngularVelocity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float BodyGetAngularVelocity(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetAngularDamping")] + public static extern float BodyGetAngularDamping(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetAutomaticMass", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte BodyGetAutomaticMass(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetAngularVelocity")] + public static extern float BodyGetAngularVelocity(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetContactCapacity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int BodyGetContactCapacity(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetAutomaticMass")] + public static extern bool BodyGetAutomaticMass(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetContactData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int BodyGetContactData(BodyId bodyId, ContactData* contactData, int capacity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetContactCapacity")] + public static extern int BodyGetContactCapacity(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetGravityScale", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float BodyGetGravityScale(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetContactData")] + public static extern int BodyGetContactData(BodyId bodyId, ContactData* contactData, int capacity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetInertiaTensor", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float BodyGetInertiaTensor(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetGravityScale")] + public static extern float BodyGetGravityScale(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetJointCount", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int BodyGetJointCount(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetInertiaTensor")] + public static extern float BodyGetInertiaTensor(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetJoints", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int BodyGetJoints(BodyId bodyId, JointId* jointArray, int capacity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetJointCount")] + public static extern int BodyGetJointCount(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLinearDamping", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float BodyGetLinearDamping(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetJoints")] + public static extern int BodyGetJoints(BodyId bodyId, JointId* jointArray, int capacity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLinearVelocity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 BodyGetLinearVelocity(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLinearDamping")] + public static extern float BodyGetLinearDamping(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalCenterOfMass", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 BodyGetLocalCenterOfMass(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLinearVelocity")] + public static extern Vec2 BodyGetLinearVelocity(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalPoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 BodyGetLocalPoint(BodyId bodyId, Vec2 worldPoint); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalCenterOfMass")] + public static extern Vec2 BodyGetLocalCenterOfMass(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalVector", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 BodyGetLocalVector(BodyId bodyId, Vec2 worldVector); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalPoint")] + public static extern Vec2 BodyGetLocalPoint(BodyId bodyId, Vec2 worldPoint); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetMass", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float BodyGetMass(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalVector")] + public static extern Vec2 BodyGetLocalVector(BodyId bodyId, Vec2 worldVector); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetMassData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern MassData BodyGetMassData(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetMass")] + public static extern float BodyGetMass(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetPosition", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 BodyGetPosition(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetMassData")] + public static extern MassData BodyGetMassData(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetRotation", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Rot BodyGetRotation(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetPosition")] + public static extern Vec2 BodyGetPosition(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetShapeCount", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int BodyGetShapeCount(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetRotation")] + public static extern Rot BodyGetRotation(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetShapes", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int BodyGetShapes(BodyId bodyId, ShapeId* shapeArray, int capacity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetShapeCount")] + public static extern int BodyGetShapeCount(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetSleepThreshold", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float BodyGetSleepThreshold(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetShapes")] + public static extern int BodyGetShapes(BodyId bodyId, ShapeId* shapeArray, int capacity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetTransform", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Transform BodyGetTransform(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetSleepThreshold")] + public static extern float BodyGetSleepThreshold(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetType", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern BodyType BodyGetType(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetTransform")] + public static extern Transform BodyGetTransform(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetUserData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void* BodyGetUserData(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetType")] + public static extern BodyType BodyGetType(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldCenterOfMass", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 BodyGetWorldCenterOfMass(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetUserData")] + public static extern void* BodyGetUserData(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldPoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 BodyGetWorldPoint(BodyId bodyId, Vec2 localPoint); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldCenterOfMass")] + public static extern Vec2 BodyGetWorldCenterOfMass(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldVector", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 BodyGetWorldVector(BodyId bodyId, Vec2 localVector); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldPoint")] + public static extern Vec2 BodyGetWorldPoint(BodyId bodyId, Vec2 localPoint); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsAwake", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte BodyIsAwake(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldVector")] + public static extern Vec2 BodyGetWorldVector(BodyId bodyId, Vec2 localVector); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsBullet", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte BodyIsBullet(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsAwake")] + public static extern bool BodyIsAwake(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte BodyIsEnabled(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsBullet")] + public static extern bool BodyIsBullet(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsFixedRotation", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte BodyIsFixedRotation(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsEnabled")] + public static extern bool BodyIsEnabled(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsSleepEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte BodyIsSleepEnabled(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsFixedRotation")] + public static extern bool BodyIsFixedRotation(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte BodyIsValid(BodyId id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsSleepEnabled")] + public static extern bool BodyIsSleepEnabled(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAngularDamping", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetAngularDamping(BodyId bodyId, float angularDamping); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_IsValid")] + public static extern bool BodyIsValid(BodyId id); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAngularVelocity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetAngularVelocity(BodyId bodyId, float angularVelocity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAngularDamping")] + public static extern void BodySetAngularDamping(BodyId bodyId, float angularDamping); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAutomaticMass", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetAutomaticMass(BodyId bodyId, byte automaticMass); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAngularVelocity")] + public static extern void BodySetAngularVelocity(BodyId bodyId, float angularVelocity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAwake", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetAwake(BodyId bodyId, byte awake); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAutomaticMass")] + public static extern void BodySetAutomaticMass(BodyId bodyId, bool automaticMass); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetBullet", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetBullet(BodyId bodyId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAwake")] + public static extern void BodySetAwake(BodyId bodyId, bool awake); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetFixedRotation", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetFixedRotation(BodyId bodyId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetBullet")] + public static extern void BodySetBullet(BodyId bodyId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetGravityScale", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetGravityScale(BodyId bodyId, float gravityScale); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetFixedRotation")] + public static extern void BodySetFixedRotation(BodyId bodyId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetLinearDamping", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetLinearDamping(BodyId bodyId, float linearDamping); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetGravityScale")] + public static extern void BodySetGravityScale(BodyId bodyId, float gravityScale); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetLinearVelocity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetLinearVelocity(BodyId bodyId, Vec2 linearVelocity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetLinearDamping")] + public static extern void BodySetLinearDamping(BodyId bodyId, float linearDamping); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetMassData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetMassData(BodyId bodyId, MassData massData); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetLinearVelocity")] + public static extern void BodySetLinearVelocity(BodyId bodyId, Vec2 linearVelocity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetSleepThreshold", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetSleepThreshold(BodyId bodyId, float sleepVelocity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetMassData")] + public static extern void BodySetMassData(BodyId bodyId, MassData massData); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetTransform", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetTransform(BodyId bodyId, Vec2 position, Rot rotation); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetSleepThreshold")] + public static extern void BodySetSleepThreshold(BodyId bodyId, float sleepVelocity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetType", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetType(BodyId bodyId, BodyType type); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetTransform")] + public static extern void BodySetTransform(BodyId bodyId, Vec2 position, Rot rotation); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetUserData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void BodySetUserData(BodyId bodyId, void* userData); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetType")] + public static extern void BodySetType(BodyId bodyId, BodyType type); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ChainIsValid(ChainId id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetUserData")] + public static extern void BodySetUserData(BodyId bodyId, void* userData); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_SetFriction", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ChainSetFriction(ChainId chainId, float friction); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_IsValid")] + public static extern bool ChainIsValid(ChainId id); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_SetRestitution", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ChainSetRestitution(ChainId chainId, float restitution); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_SetFriction")] + public static extern void ChainSetFriction(ChainId chainId, float friction); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Clamp", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Clamp(Vec2 v, Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_SetRestitution")] + public static extern void ChainSetRestitution(ChainId chainId, float restitution); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ClampFloat", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float ClampFloat(float a, float lower, float upper); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Clamp")] + public static extern Vec2 Clamp(Vec2 v, Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ClampInt", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int ClampInt(int a, int lower, int upper); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ClampFloat")] + public static extern float ClampFloat(float a, float lower, float upper); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCapsuleAndCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideCapsuleAndCircle(Capsule* capsuleA, Transform xfA, Circle* circleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ClampInt")] + public static extern int ClampInt(int a, int lower, int upper); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCapsules", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideCapsules(Capsule* capsuleA, Transform xfA, Capsule* capsuleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCapsuleAndCircle")] + public static extern Manifold CollideCapsuleAndCircle(Capsule* capsuleA, Transform xfA, Circle* circleB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCircles", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideCircles(Circle* circleA, Transform xfA, Circle* circleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCapsules")] + public static extern Manifold CollideCapsules(Capsule* capsuleA, Transform xfA, Capsule* capsuleB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollidePolygonAndCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollidePolygonAndCapsule(Polygon* polygonA, Transform xfA, Capsule* capsuleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCircles")] + public static extern Manifold CollideCircles(Circle* circleA, Transform xfA, Circle* circleB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollidePolygonAndCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollidePolygonAndCircle(Polygon* polygonA, Transform xfA, Circle* circleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollidePolygonAndCapsule")] + public static extern Manifold CollidePolygonAndCapsule(Polygon* polygonA, Transform xfA, Capsule* capsuleB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollidePolygons", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollidePolygons(Polygon* polygonA, Transform xfA, Polygon* polygonB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollidePolygonAndCircle")] + public static extern Manifold CollidePolygonAndCircle(Polygon* polygonA, Transform xfA, Circle* circleB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSegmentAndCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideSegmentAndCapsule(Segment* segmentA, Transform xfA, Capsule* capsuleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollidePolygons")] + public static extern Manifold CollidePolygons(Polygon* polygonA, Transform xfA, Polygon* polygonB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSegmentAndCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideSegmentAndCircle(Segment* segmentA, Transform xfA, Circle* circleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSegmentAndCapsule")] + public static extern Manifold CollideSegmentAndCapsule(Segment* segmentA, Transform xfA, Capsule* capsuleB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSegmentAndPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideSegmentAndPolygon(Segment* segmentA, Transform xfA, Polygon* polygonB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSegmentAndCircle")] + public static extern Manifold CollideSegmentAndCircle(Segment* segmentA, Transform xfA, Circle* circleB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideSmoothSegmentAndCapsule(SmoothSegment* smoothSegmentA, Transform xfA, Capsule* capsuleB, Transform xfB, DistanceCache* cache); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSegmentAndPolygon")] + public static extern Manifold CollideSegmentAndPolygon(Segment* segmentA, Transform xfA, Polygon* polygonB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideSmoothSegmentAndCircle(SmoothSegment* smoothSegmentA, Transform xfA, Circle* circleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndCapsule")] + public static extern Manifold CollideSmoothSegmentAndCapsule(SmoothSegment* smoothSegmentA, Transform xfA, Capsule* capsuleB, Transform xfB, DistanceCache* cache); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Manifold CollideSmoothSegmentAndPolygon(SmoothSegment* smoothSegmentA, Transform xfA, Polygon* polygonB, Transform xfB, DistanceCache* cache); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndCircle")] + public static extern Manifold CollideSmoothSegmentAndCircle(SmoothSegment* smoothSegmentA, Transform xfA, Circle* circleB, Transform xfB); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeAngularVelocity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float ComputeAngularVelocity(Rot q1, Rot q2, float inv_h); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndPolygon")] + public static extern Manifold CollideSmoothSegmentAndPolygon(SmoothSegment* smoothSegmentA, Transform xfA, Polygon* polygonB, Transform xfB, DistanceCache* cache); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCapsuleAABB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern AABB ComputeCapsuleAABB(Capsule* shape, Transform transform); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeAngularVelocity")] + public static extern float ComputeAngularVelocity(Rot q1, Rot q2, float inv_h); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCapsuleMass", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern MassData ComputeCapsuleMass(Capsule* shape, float density); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCapsuleAABB")] + public static extern AABB ComputeCapsuleAABB(Capsule* shape, Transform transform); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCircleAABB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern AABB ComputeCircleAABB(Circle* shape, Transform transform); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCapsuleMass")] + public static extern MassData ComputeCapsuleMass(Capsule* shape, float density); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCircleMass", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern MassData ComputeCircleMass(Circle* shape, float density); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCircleAABB")] + public static extern AABB ComputeCircleAABB(Circle* shape, Transform transform); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeHull", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Hull ComputeHull(Vec2* points, int count); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCircleMass")] + public static extern MassData ComputeCircleMass(Circle* shape, float density); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputePolygonAABB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern AABB ComputePolygonAABB(Polygon* shape, Transform transform); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeHull")] + public static extern Hull ComputeHull(Vec2* points, int count); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputePolygonMass", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern MassData ComputePolygonMass(Polygon* shape, float density); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputePolygonAABB")] + public static extern AABB ComputePolygonAABB(Polygon* shape, Transform transform); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeSegmentAABB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern AABB ComputeSegmentAABB(Segment* shape, Transform transform); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputePolygonMass")] + public static extern MassData ComputePolygonMass(Polygon* shape, float density); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateBody", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern BodyId CreateBody(WorldId worldId, BodyDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeSegmentAABB")] + public static extern AABB ComputeSegmentAABB(Segment* shape, Transform transform); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateCapsuleShape", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ShapeId CreateCapsuleShape(BodyId bodyId, ShapeDef* def, Capsule* capsule); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateBody")] + public static extern BodyId CreateBody(WorldId worldId, BodyDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateChain", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ChainId CreateChain(BodyId bodyId, ChainDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateCapsuleShape")] + public static extern ShapeId CreateCapsuleShape(BodyId bodyId, ShapeDef* def, Capsule* capsule); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateCircleShape", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ShapeId CreateCircleShape(BodyId bodyId, ShapeDef* def, Circle* circle); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateChain")] + public static extern ChainId CreateChain(BodyId bodyId, ChainDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateDistanceJoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern JointId CreateDistanceJoint(WorldId worldId, DistanceJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateCircleShape")] + public static extern ShapeId CreateCircleShape(BodyId bodyId, ShapeDef* def, Circle* circle); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateMotorJoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern JointId CreateMotorJoint(WorldId worldId, MotorJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateDistanceJoint")] + public static extern JointId CreateDistanceJoint(WorldId worldId, DistanceJointDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateMouseJoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern JointId CreateMouseJoint(WorldId worldId, MouseJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateMotorJoint")] + public static extern JointId CreateMotorJoint(WorldId worldId, MotorJointDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreatePolygonShape", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ShapeId CreatePolygonShape(BodyId bodyId, ShapeDef* def, Polygon* polygon); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateMouseJoint")] + public static extern JointId CreateMouseJoint(WorldId worldId, MouseJointDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreatePrismaticJoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern JointId CreatePrismaticJoint(WorldId worldId, PrismaticJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreatePolygonShape")] + public static extern ShapeId CreatePolygonShape(BodyId bodyId, ShapeDef* def, Polygon* polygon); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateRevoluteJoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern JointId CreateRevoluteJoint(WorldId worldId, RevoluteJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreatePrismaticJoint")] + public static extern JointId CreatePrismaticJoint(WorldId worldId, PrismaticJointDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateSegmentShape", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ShapeId CreateSegmentShape(BodyId bodyId, ShapeDef* def, Segment* segment); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateRevoluteJoint")] + public static extern JointId CreateRevoluteJoint(WorldId worldId, RevoluteJointDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateTimer", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Timer CreateTimer(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateSegmentShape")] + public static extern ShapeId CreateSegmentShape(BodyId bodyId, ShapeDef* def, Segment* segment); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateWeldJoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern JointId CreateWeldJoint(WorldId worldId, WeldJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateTimer")] + public static extern Timer CreateTimer(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateWheelJoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern JointId CreateWheelJoint(WorldId worldId, WheelJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateWeldJoint")] + public static extern JointId CreateWeldJoint(WorldId worldId, WeldJointDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateWorld", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern WorldId CreateWorld(WorldDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateWheelJoint")] + public static extern JointId CreateWheelJoint(WorldId worldId, WheelJointDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Cross", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float Cross(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateWorld")] + public static extern WorldId CreateWorld(WorldDef* def); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CrossSV", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 CrossSV(float s, Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Cross")] + public static extern float Cross(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CrossVS", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 CrossVS(Vec2 v, float s); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CrossSV")] + public static extern Vec2 CrossSV(float s, Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultBodyDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern BodyDef DefaultBodyDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CrossVS")] + public static extern Vec2 CrossVS(Vec2 v, float s); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultChainDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ChainDef DefaultChainDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultBodyDef")] + public static extern BodyDef DefaultBodyDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultDistanceJointDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern DistanceJointDef DefaultDistanceJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultChainDef")] + public static extern ChainDef DefaultChainDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultFilter", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Filter DefaultFilter(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultDistanceJointDef")] + public static extern DistanceJointDef DefaultDistanceJointDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultMotorJointDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern MotorJointDef DefaultMotorJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultFilter")] + public static extern Filter DefaultFilter(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultMouseJointDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern MouseJointDef DefaultMouseJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultMotorJointDef")] + public static extern MotorJointDef DefaultMotorJointDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultPrismaticJointDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern PrismaticJointDef DefaultPrismaticJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultMouseJointDef")] + public static extern MouseJointDef DefaultMouseJointDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultQueryFilter", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern QueryFilter DefaultQueryFilter(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultPrismaticJointDef")] + public static extern PrismaticJointDef DefaultPrismaticJointDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultRevoluteJointDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern RevoluteJointDef DefaultRevoluteJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultQueryFilter")] + public static extern QueryFilter DefaultQueryFilter(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultShapeDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ShapeDef DefaultShapeDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultRevoluteJointDef")] + public static extern RevoluteJointDef DefaultRevoluteJointDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultWeldJointDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern WeldJointDef DefaultWeldJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultShapeDef")] + public static extern ShapeDef DefaultShapeDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultWheelJointDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern WheelJointDef DefaultWheelJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultWeldJointDef")] + public static extern WeldJointDef DefaultWeldJointDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultWorldDef", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern WorldDef DefaultWorldDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultWheelJointDef")] + public static extern WheelJointDef DefaultWheelJointDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyBody", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DestroyBody(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultWorldDef")] + public static extern WorldDef DefaultWorldDef(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyChain", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DestroyChain(ChainId chainId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyBody")] + public static extern void DestroyBody(BodyId bodyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyJoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DestroyJoint(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyChain")] + public static extern void DestroyChain(ChainId chainId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyShape", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DestroyShape(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyJoint")] + public static extern void DestroyJoint(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyWorld", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DestroyWorld(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyShape")] + public static extern void DestroyShape(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Distance", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float Distance(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyWorld")] + public static extern void DestroyWorld(WorldId worldId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_EnableLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointEnableLimit(JointId jointId, byte enableLimit); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Distance")] + public static extern float Distance(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_EnableMotor", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointEnableMotor(JointId jointId, byte enableMotor); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_EnableLimit")] + public static extern void DistanceJointEnableLimit(JointId jointId, bool enableLimit); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_EnableSpring", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointEnableSpring(JointId jointId, byte enableSpring); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_EnableMotor")] + public static extern void DistanceJointEnableMotor(JointId jointId, bool enableMotor); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetCurrentLength", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetCurrentLength(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_EnableSpring")] + public static extern void DistanceJointEnableSpring(JointId jointId, bool enableSpring); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetDampingRatio(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetCurrentLength")] + public static extern float DistanceJointGetCurrentLength(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetDampingRatio")] + public static extern float DistanceJointGetDampingRatio(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetLength", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetLength(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetHertz")] + public static extern float DistanceJointGetHertz(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMaxLength", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetMaxLength(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetLength")] + public static extern float DistanceJointGetLength(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMaxMotorForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetMaxMotorForce(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMaxLength")] + public static extern float DistanceJointGetMaxLength(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMinLength", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetMinLength(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMaxMotorForce")] + public static extern float DistanceJointGetMaxMotorForce(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMotorForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetMotorForce(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMinLength")] + public static extern float DistanceJointGetMinLength(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMotorSpeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceJointGetMotorSpeed(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMotorForce")] + public static extern float DistanceJointGetMotorForce(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_IsLimitEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte DistanceJointIsLimitEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMotorSpeed")] + public static extern float DistanceJointGetMotorSpeed(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_IsMotorEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte DistanceJointIsMotorEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_IsLimitEnabled")] + public static extern bool DistanceJointIsLimitEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_IsSpringEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte DistanceJointIsSpringEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_IsMotorEnabled")] + public static extern bool DistanceJointIsMotorEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetLength", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointSetLength(JointId jointId, float length); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_IsSpringEnabled")] + public static extern bool DistanceJointIsSpringEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetLengthRange", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointSetLengthRange(JointId jointId, float minLength, float maxLength); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetLength")] + public static extern void DistanceJointSetLength(JointId jointId, float length); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetMaxMotorForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointSetMaxMotorForce(JointId jointId, float force); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetLengthRange")] + public static extern void DistanceJointSetLengthRange(JointId jointId, float minLength, float maxLength); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetMotorSpeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointSetMotorSpeed(JointId jointId, float motorSpeed); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetMaxMotorForce")] + public static extern void DistanceJointSetMaxMotorForce(JointId jointId, float force); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointSetSpringDampingRatio(JointId jointId, float dampingRatio); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetMotorSpeed")] + public static extern void DistanceJointSetMotorSpeed(JointId jointId, float motorSpeed); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DistanceJointSetSpringHertz(JointId jointId, float hertz); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetSpringDampingRatio")] + public static extern void DistanceJointSetSpringDampingRatio(JointId jointId, float dampingRatio); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceSquared", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DistanceSquared(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_SetSpringHertz")] + public static extern void DistanceJointSetSpringHertz(JointId jointId, float hertz); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Dot", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float Dot(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceSquared")] + public static extern float DistanceSquared(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Create", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern DynamicTree DynamicTreeCreate(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Dot")] + public static extern float Dot(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_CreateProxy", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int DynamicTreeCreateProxy(DynamicTree* tree, AABB aabb, uint categoryBits, int userData); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Create")] + public static extern DynamicTree DynamicTreeCreate(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Destroy", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeDestroy(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_CreateProxy")] + public static extern int DynamicTreeCreateProxy(DynamicTree* tree, AABB aabb, uint categoryBits, int userData); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_DestroyProxy", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeDestroyProxy(DynamicTree* tree, int proxyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Destroy")] + public static extern void DynamicTreeDestroy(DynamicTree* tree); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_EnlargeProxy", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeEnlargeProxy(DynamicTree* tree, int proxyId, AABB aabb); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_DestroyProxy")] + public static extern void DynamicTreeDestroyProxy(DynamicTree* tree, int proxyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetAABB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern AABB DynamicTreeGetAABB(DynamicTree* tree, int proxyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_EnlargeProxy")] + public static extern void DynamicTreeEnlargeProxy(DynamicTree* tree, int proxyId, AABB aabb); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetAreaRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float DynamicTreeGetAreaRatio(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetAABB")] + public static extern AABB DynamicTreeGetAABB(DynamicTree* tree, int proxyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetByteCount", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int DynamicTreeGetByteCount(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetAreaRatio")] + public static extern float DynamicTreeGetAreaRatio(DynamicTree* tree); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetHeight", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int DynamicTreeGetHeight(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetByteCount")] + public static extern int DynamicTreeGetByteCount(DynamicTree* tree); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetMaxBalance", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int DynamicTreeGetMaxBalance(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetHeight")] + public static extern int DynamicTreeGetHeight(DynamicTree* tree); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetProxyCount", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int DynamicTreeGetProxyCount(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetMaxBalance")] + public static extern int DynamicTreeGetMaxBalance(DynamicTree* tree); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetUserData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int DynamicTreeGetUserData(DynamicTree* tree, int proxyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetProxyCount")] + public static extern int DynamicTreeGetProxyCount(DynamicTree* tree); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_MoveProxy", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeMoveProxy(DynamicTree* tree, int proxyId, AABB aabb); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetUserData")] + public static extern int DynamicTreeGetUserData(DynamicTree* tree, int proxyId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Query", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeQuery(DynamicTree* tree, AABB aabb, uint maskBits, System.IntPtr callback, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_MoveProxy")] + public static extern void DynamicTreeMoveProxy(DynamicTree* tree, int proxyId, AABB aabb); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_RayCast", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeRayCast(DynamicTree* tree, RayCastInput* input, uint maskBits, System.IntPtr callback, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Query")] + public static extern void DynamicTreeQuery(DynamicTree* tree, AABB aabb, uint maskBits, delegate* unmanaged callback, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Rebuild", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int DynamicTreeRebuild(DynamicTree* tree, byte fullBuild); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_RayCast")] + public static extern void DynamicTreeRayCast(DynamicTree* tree, RayCastInput* input, uint maskBits, delegate* unmanaged callback, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_RebuildBottomUp", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeRebuildBottomUp(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Rebuild")] + public static extern int DynamicTreeRebuild(DynamicTree* tree, bool fullBuild); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_ShapeCast", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeShapeCast(DynamicTree* tree, ShapeCastInput* input, uint maskBits, System.IntPtr callback, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_RebuildBottomUp")] + public static extern void DynamicTreeRebuildBottomUp(DynamicTree* tree); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_ShiftOrigin", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeShiftOrigin(DynamicTree* tree, Vec2 newOrigin); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_ShapeCast")] + public static extern void DynamicTreeShapeCast(DynamicTree* tree, ShapeCastInput* input, uint maskBits, delegate* unmanaged callback, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Validate", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void DynamicTreeValidate(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_ShiftOrigin")] + public static extern void DynamicTreeShiftOrigin(DynamicTree* tree, Vec2 newOrigin); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetByteCount", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int GetByteCount(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Validate")] + public static extern void DynamicTreeValidate(DynamicTree* tree); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetInverse22", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Mat22 GetInverse22(Mat22 A); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetByteCount")] + public static extern int GetByteCount(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetLengthAndNormalize", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 GetLengthAndNormalize(float* length, Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetInverse22")] + public static extern Mat22 GetInverse22(Mat22 A); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetLengthUnitsPerMeter", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float GetLengthUnitsPerMeter(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetLengthAndNormalize")] + public static extern Vec2 GetLengthAndNormalize(float* length, Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetMilliseconds", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float GetMilliseconds(Timer* timer); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetLengthUnitsPerMeter")] + public static extern float GetLengthUnitsPerMeter(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetMillisecondsAndReset", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float GetMillisecondsAndReset(Timer* timer); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetMilliseconds")] + public static extern float GetMilliseconds(Timer* timer); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetSweepTransform", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Transform GetSweepTransform(Sweep* sweep, float time); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetMillisecondsAndReset")] + public static extern float GetMillisecondsAndReset(Timer* timer); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetTicks", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern long GetTicks(Timer* timer); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetSweepTransform")] + public static extern Transform GetSweepTransform(Sweep* sweep, float time); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetVersion", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Version GetVersion(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetTicks")] + public static extern long GetTicks(Timer* timer); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IntegrateRotation", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Rot IntegrateRotation(Rot q1, float deltaAngle); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetVersion")] + public static extern Version GetVersion(); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvMulRot", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Rot InvMulRot(Rot q, Rot r); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IntegrateRotation")] + public static extern Rot IntegrateRotation(Rot q1, float deltaAngle); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvMulTransforms", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Transform InvMulTransforms(Transform A, Transform B); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvMulRot")] + public static extern Rot InvMulRot(Rot q, Rot r); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvRotateVector", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 InvRotateVector(Rot q, Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvMulTransforms")] + public static extern Transform InvMulTransforms(Transform A, Transform B); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvTransformPoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 InvTransformPoint(Transform t, Vec2 p); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvRotateVector")] + public static extern Vec2 InvRotateVector(Rot q, Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsNormalized", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte IsNormalized(Rot q); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvTransformPoint")] + public static extern Vec2 InvTransformPoint(Transform t, Vec2 p); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte IsValid(float a); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsNormalized")] + public static extern bool IsNormalized(Rot q); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValidRay", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte IsValidRay(RayCastInput* input); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValid")] + public static extern bool IsValid(float a); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetBodyA", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern BodyId JointGetBodyA(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValidRay")] + public static extern bool IsValidRay(RayCastInput* input); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetBodyB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern BodyId JointGetBodyB(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetBodyA")] + public static extern BodyId JointGetBodyA(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetCollideConnected", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte JointGetCollideConnected(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetBodyB")] + public static extern BodyId JointGetBodyB(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetConstraintForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 JointGetConstraintForce(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetCollideConnected")] + public static extern bool JointGetCollideConnected(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetConstraintTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float JointGetConstraintTorque(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetConstraintForce")] + public static extern Vec2 JointGetConstraintForce(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetLocalAnchorA", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 JointGetLocalAnchorA(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetConstraintTorque")] + public static extern float JointGetConstraintTorque(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetLocalAnchorB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 JointGetLocalAnchorB(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetLocalAnchorA")] + public static extern Vec2 JointGetLocalAnchorA(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetType", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern JointType JointGetType(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetLocalAnchorB")] + public static extern Vec2 JointGetLocalAnchorB(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetUserData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void* JointGetUserData(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetType")] + public static extern JointType JointGetType(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte JointIsValid(JointId id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetUserData")] + public static extern void* JointGetUserData(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_SetCollideConnected", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void JointSetCollideConnected(JointId jointId, byte shouldCollide); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_IsValid")] + public static extern bool JointIsValid(JointId id); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_SetUserData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void JointSetUserData(JointId jointId, void* userData); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_SetCollideConnected")] + public static extern void JointSetCollideConnected(JointId jointId, bool shouldCollide); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_WakeBodies", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void JointWakeBodies(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_SetUserData")] + public static extern void JointSetUserData(JointId jointId, void* userData); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2LeftPerp", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 LeftPerp(Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_WakeBodies")] + public static extern void JointWakeBodies(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Length", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float Length(Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2LeftPerp")] + public static extern Vec2 LeftPerp(Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2LengthSquared", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float LengthSquared(Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Length")] + public static extern float Length(Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Lerp", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Lerp(Vec2 a, Vec2 b, float t); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2LengthSquared")] + public static extern float LengthSquared(Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeBox", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Polygon MakeBox(float hx, float hy); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Lerp")] + public static extern Vec2 Lerp(Vec2 a, Vec2 b, float t); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetBox", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Polygon MakeOffsetBox(float hx, float hy, Vec2 center, float angle); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeBox")] + public static extern Polygon MakeBox(float hx, float hy); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Polygon MakeOffsetPolygon(Hull* hull, float radius, Transform transform); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetBox")] + public static extern Polygon MakeOffsetBox(float hx, float hy, Vec2 center, float angle); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakePolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Polygon MakePolygon(Hull* hull, float radius); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetPolygon")] + public static extern Polygon MakeOffsetPolygon(Hull* hull, float radius, Transform transform); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeProxy", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern DistanceProxy MakeProxy(Vec2* vertices, int count, float radius); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakePolygon")] + public static extern Polygon MakePolygon(Hull* hull, float radius); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeRot", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Rot MakeRot(float angle); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeProxy")] + public static extern DistanceProxy MakeProxy(Vec2* vertices, int count, float radius); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeRoundedBox", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Polygon MakeRoundedBox(float hx, float hy, float radius); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeRot")] + public static extern Rot MakeRot(float angle); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeSquare", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Polygon MakeSquare(float h); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeRoundedBox")] + public static extern Polygon MakeRoundedBox(float hx, float hy, float radius); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Max", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Max(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeSquare")] + public static extern Polygon MakeSquare(float h); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MaxFloat", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MaxFloat(float a, float b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Max")] + public static extern Vec2 Max(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MaxInt", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int MaxInt(int a, int b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MaxFloat")] + public static extern float MaxFloat(float a, float b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Min", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Min(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MaxInt")] + public static extern int MaxInt(int a, int b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MinFloat", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MinFloat(float a, float b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Min")] + public static extern Vec2 Min(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MinInt", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int MinInt(int a, int b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MinFloat")] + public static extern float MinFloat(float a, float b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetAngularOffset", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MotorJointGetAngularOffset(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MinInt")] + public static extern int MinInt(int a, int b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetCorrectionFactor", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MotorJointGetCorrectionFactor(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetAngularOffset")] + public static extern float MotorJointGetAngularOffset(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetLinearOffset", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 MotorJointGetLinearOffset(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetCorrectionFactor")] + public static extern float MotorJointGetCorrectionFactor(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetMaxForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MotorJointGetMaxForce(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetLinearOffset")] + public static extern Vec2 MotorJointGetLinearOffset(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetMaxTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MotorJointGetMaxTorque(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetMaxForce")] + public static extern float MotorJointGetMaxForce(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetAngularOffset", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MotorJointSetAngularOffset(JointId jointId, float angularOffset); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_GetMaxTorque")] + public static extern float MotorJointGetMaxTorque(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetCorrectionFactor", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MotorJointSetCorrectionFactor(JointId jointId, float correctionFactor); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetAngularOffset")] + public static extern void MotorJointSetAngularOffset(JointId jointId, float angularOffset); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetLinearOffset", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MotorJointSetLinearOffset(JointId jointId, Vec2 linearOffset); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetCorrectionFactor")] + public static extern void MotorJointSetCorrectionFactor(JointId jointId, float correctionFactor); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetMaxForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MotorJointSetMaxForce(JointId jointId, float maxForce); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetLinearOffset")] + public static extern void MotorJointSetLinearOffset(JointId jointId, Vec2 linearOffset); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetMaxTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MotorJointSetMaxTorque(JointId jointId, float maxTorque); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetMaxForce")] + public static extern void MotorJointSetMaxForce(JointId jointId, float maxForce); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_GetMaxForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MouseJointGetMaxForce(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MotorJoint_SetMaxTorque")] + public static extern void MotorJointSetMaxTorque(JointId jointId, float maxTorque); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_GetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MouseJointGetSpringDampingRatio(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_GetMaxForce")] + public static extern float MouseJointGetMaxForce(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_GetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float MouseJointGetSpringHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_GetSpringDampingRatio")] + public static extern float MouseJointGetSpringDampingRatio(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_GetTarget", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 MouseJointGetTarget(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_GetSpringHertz")] + public static extern float MouseJointGetSpringHertz(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_SetMaxForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MouseJointSetMaxForce(JointId jointId, float maxForce); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_GetTarget")] + public static extern Vec2 MouseJointGetTarget(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_SetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MouseJointSetSpringDampingRatio(JointId jointId, float dampingRatio); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_SetMaxForce")] + public static extern void MouseJointSetMaxForce(JointId jointId, float maxForce); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_SetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MouseJointSetSpringHertz(JointId jointId, float hertz); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_SetSpringDampingRatio")] + public static extern void MouseJointSetSpringDampingRatio(JointId jointId, float dampingRatio); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_SetTarget", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void MouseJointSetTarget(JointId jointId, Vec2 target); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_SetSpringHertz")] + public static extern void MouseJointSetSpringHertz(JointId jointId, float hertz); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Mul", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Mul(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MouseJoint_SetTarget")] + public static extern void MouseJointSetTarget(JointId jointId, Vec2 target); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulAdd", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 MulAdd(Vec2 a, float s, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Mul")] + public static extern Vec2 Mul(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulMV", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 MulMV(Mat22 A, Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulAdd")] + public static extern Vec2 MulAdd(Vec2 a, float s, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulRot", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Rot MulRot(Rot q, Rot r); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulMV")] + public static extern Vec2 MulMV(Mat22 A, Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulSub", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 MulSub(Vec2 a, float s, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulRot")] + public static extern Rot MulRot(Rot q, Rot r); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulSV", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 MulSV(float s, Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulSub")] + public static extern Vec2 MulSub(Vec2 a, float s, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulTransforms", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Transform MulTransforms(Transform A, Transform B); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulSV")] + public static extern Vec2 MulSV(float s, Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Neg", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Neg(Vec2 a); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MulTransforms")] + public static extern Transform MulTransforms(Transform A, Transform B); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2NLerp", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Rot NLerp(Rot q1, Rot q2, float t); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Neg")] + public static extern Vec2 Neg(Vec2 a); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Normalize", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Normalize(Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2NLerp")] + public static extern Rot NLerp(Rot q1, Rot q2, float t); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2NormalizeChecked", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 NormalizeChecked(Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Normalize")] + public static extern Vec2 Normalize(Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2NormalizeRot", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Rot NormalizeRot(Rot q); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2NormalizeChecked")] + public static extern Vec2 NormalizeChecked(Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PointInCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte PointInCapsule(Vec2 point, Capsule* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2NormalizeRot")] + public static extern Rot NormalizeRot(Rot q); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PointInCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte PointInCircle(Vec2 point, Circle* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PointInCapsule")] + public static extern bool PointInCapsule(Vec2 point, Capsule* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PointInPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte PointInPolygon(Vec2 point, Polygon* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PointInCircle")] + public static extern bool PointInCircle(Vec2 point, Circle* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_EnableLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void PrismaticJointEnableLimit(JointId jointId, byte enableLimit); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PointInPolygon")] + public static extern bool PointInPolygon(Vec2 point, Polygon* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_EnableMotor", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void PrismaticJointEnableMotor(JointId jointId, byte enableMotor); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_EnableLimit")] + public static extern void PrismaticJointEnableLimit(JointId jointId, bool enableLimit); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_EnableSpring", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void PrismaticJointEnableSpring(JointId jointId, byte enableSpring); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_EnableMotor")] + public static extern void PrismaticJointEnableMotor(JointId jointId, bool enableMotor); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetLowerLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float PrismaticJointGetLowerLimit(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_EnableSpring")] + public static extern void PrismaticJointEnableSpring(JointId jointId, bool enableSpring); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetMaxMotorForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float PrismaticJointGetMaxMotorForce(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetLowerLimit")] + public static extern float PrismaticJointGetLowerLimit(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetMotorForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float PrismaticJointGetMotorForce(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetMaxMotorForce")] + public static extern float PrismaticJointGetMaxMotorForce(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetMotorSpeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float PrismaticJointGetMotorSpeed(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetMotorForce")] + public static extern float PrismaticJointGetMotorForce(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float PrismaticJointGetSpringDampingRatio(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetMotorSpeed")] + public static extern float PrismaticJointGetMotorSpeed(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float PrismaticJointGetSpringHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetSpringDampingRatio")] + public static extern float PrismaticJointGetSpringDampingRatio(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetUpperLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float PrismaticJointGetUpperLimit(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetSpringHertz")] + public static extern float PrismaticJointGetSpringHertz(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_IsLimitEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte PrismaticJointIsLimitEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetUpperLimit")] + public static extern float PrismaticJointGetUpperLimit(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_IsMotorEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte PrismaticJointIsMotorEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_IsLimitEnabled")] + public static extern bool PrismaticJointIsLimitEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_IsSpringEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte PrismaticJointIsSpringEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_IsMotorEnabled")] + public static extern bool PrismaticJointIsMotorEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetLimits", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void PrismaticJointSetLimits(JointId jointId, float lower, float upper); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_IsSpringEnabled")] + public static extern bool PrismaticJointIsSpringEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetMaxMotorForce", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void PrismaticJointSetMaxMotorForce(JointId jointId, float force); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetLimits")] + public static extern void PrismaticJointSetLimits(JointId jointId, float lower, float upper); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetMotorSpeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void PrismaticJointSetMotorSpeed(JointId jointId, float motorSpeed); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetMaxMotorForce")] + public static extern void PrismaticJointSetMaxMotorForce(JointId jointId, float force); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void PrismaticJointSetSpringDampingRatio(JointId jointId, float dampingRatio); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetMotorSpeed")] + public static extern void PrismaticJointSetMotorSpeed(JointId jointId, float motorSpeed); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void PrismaticJointSetSpringHertz(JointId jointId, float hertz); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetSpringDampingRatio")] + public static extern void PrismaticJointSetSpringDampingRatio(JointId jointId, float dampingRatio); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RayCastCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput RayCastCapsule(RayCastInput* input, Capsule* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_SetSpringHertz")] + public static extern void PrismaticJointSetSpringHertz(JointId jointId, float hertz); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RayCastCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput RayCastCircle(RayCastInput* input, Circle* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RayCastCapsule")] + public static extern CastOutput RayCastCapsule(RayCastInput* input, Capsule* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RayCastPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput RayCastPolygon(RayCastInput* input, Polygon* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RayCastCircle")] + public static extern CastOutput RayCastCircle(RayCastInput* input, Circle* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RayCastSegment", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput RayCastSegment(RayCastInput* input, Segment* shape, byte oneSided); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RayCastPolygon")] + public static extern CastOutput RayCastPolygon(RayCastInput* input, Polygon* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RelativeAngle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RelativeAngle(Rot b, Rot a); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RayCastSegment")] + public static extern CastOutput RayCastSegment(RayCastInput* input, Segment* shape, bool oneSided); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_EnableLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void RevoluteJointEnableLimit(JointId jointId, byte enableLimit); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RelativeAngle")] + public static extern float RelativeAngle(Rot b, Rot a); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_EnableMotor", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void RevoluteJointEnableMotor(JointId jointId, byte enableMotor); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_EnableLimit")] + public static extern void RevoluteJointEnableLimit(JointId jointId, bool enableLimit); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_EnableSpring", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void RevoluteJointEnableSpring(JointId jointId, byte enableSpring); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_EnableMotor")] + public static extern void RevoluteJointEnableMotor(JointId jointId, bool enableMotor); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetAngle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RevoluteJointGetAngle(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_EnableSpring")] + public static extern void RevoluteJointEnableSpring(JointId jointId, bool enableSpring); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetLowerLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RevoluteJointGetLowerLimit(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetAngle")] + public static extern float RevoluteJointGetAngle(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetMaxMotorTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RevoluteJointGetMaxMotorTorque(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetLowerLimit")] + public static extern float RevoluteJointGetLowerLimit(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetMotorSpeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RevoluteJointGetMotorSpeed(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetMaxMotorTorque")] + public static extern float RevoluteJointGetMaxMotorTorque(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetMotorTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RevoluteJointGetMotorTorque(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetMotorSpeed")] + public static extern float RevoluteJointGetMotorSpeed(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RevoluteJointGetSpringDampingRatio(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetMotorTorque")] + public static extern float RevoluteJointGetMotorTorque(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RevoluteJointGetSpringHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetSpringDampingRatio")] + public static extern float RevoluteJointGetSpringDampingRatio(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetUpperLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RevoluteJointGetUpperLimit(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetSpringHertz")] + public static extern float RevoluteJointGetSpringHertz(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_IsLimitEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte RevoluteJointIsLimitEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_GetUpperLimit")] + public static extern float RevoluteJointGetUpperLimit(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_IsMotorEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte RevoluteJointIsMotorEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_IsLimitEnabled")] + public static extern bool RevoluteJointIsLimitEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetLimits", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void RevoluteJointSetLimits(JointId jointId, float lower, float upper); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_IsMotorEnabled")] + public static extern bool RevoluteJointIsMotorEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetMaxMotorTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void RevoluteJointSetMaxMotorTorque(JointId jointId, float torque); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetLimits")] + public static extern void RevoluteJointSetLimits(JointId jointId, float lower, float upper); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetMotorSpeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void RevoluteJointSetMotorSpeed(JointId jointId, float motorSpeed); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetMaxMotorTorque")] + public static extern void RevoluteJointSetMaxMotorTorque(JointId jointId, float torque); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void RevoluteJointSetSpringDampingRatio(JointId jointId, float dampingRatio); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetMotorSpeed")] + public static extern void RevoluteJointSetMotorSpeed(JointId jointId, float motorSpeed); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void RevoluteJointSetSpringHertz(JointId jointId, float hertz); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetSpringDampingRatio")] + public static extern void RevoluteJointSetSpringDampingRatio(JointId jointId, float dampingRatio); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RightPerp", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 RightPerp(Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetSpringHertz")] + public static extern void RevoluteJointSetSpringHertz(JointId jointId, float hertz); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_GetAngle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float RotGetAngle(Rot q); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RightPerp")] + public static extern Vec2 RightPerp(Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_GetXAxis", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 RotGetXAxis(Rot q); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_GetAngle")] + public static extern float RotGetAngle(Rot q); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_GetYAxis", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 RotGetYAxis(Rot q); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_GetXAxis")] + public static extern Vec2 RotGetXAxis(Rot q); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte RotIsValid(Rot q); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_GetYAxis")] + public static extern Vec2 RotGetYAxis(Rot q); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RotateVector", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 RotateVector(Rot q, Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_IsValid")] + public static extern bool RotIsValid(Rot q); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SegmentDistance", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern SegmentDistanceResult SegmentDistance(Vec2 p1, Vec2 q1, Vec2 p2, Vec2 q2); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RotateVector")] + public static extern Vec2 RotateVector(Rot q, Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SetAllocator", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void SetAllocator(System.IntPtr allocFcn, System.IntPtr freeFcn); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SegmentDistance")] + public static extern SegmentDistanceResult SegmentDistance(Vec2 p1, Vec2 q1, Vec2 p2, Vec2 q2); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SetAssertFcn", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void SetAssertFcn(System.IntPtr assertFcn); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SetAllocator")] + public static extern void SetAllocator(delegate* unmanaged allocFcn, delegate* unmanaged freeFcn); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SetLengthUnitsPerMeter", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void SetLengthUnitsPerMeter(float lengthUnits); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SetAssertFcn")] + public static extern void SetAssertFcn(delegate* unmanaged assertFcn); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_AreContactEventsEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ShapeAreContactEventsEnabled(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SetLengthUnitsPerMeter")] + public static extern void SetLengthUnitsPerMeter(float lengthUnits); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_AreHitEventsEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ShapeAreHitEventsEnabled(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_AreContactEventsEnabled")] + public static extern bool ShapeAreContactEventsEnabled(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_ArePreSolveEventsEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ShapeArePreSolveEventsEnabled(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_AreHitEventsEnabled")] + public static extern bool ShapeAreHitEventsEnabled(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_AreSensorEventsEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ShapeAreSensorEventsEnabled(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_ArePreSolveEventsEnabled")] + public static extern bool ShapeArePreSolveEventsEnabled(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_EnableContactEvents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeEnableContactEvents(ShapeId shapeId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_AreSensorEventsEnabled")] + public static extern bool ShapeAreSensorEventsEnabled(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_EnableHitEvents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeEnableHitEvents(ShapeId shapeId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_EnableContactEvents")] + public static extern void ShapeEnableContactEvents(ShapeId shapeId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_EnablePreSolveEvents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeEnablePreSolveEvents(ShapeId shapeId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_EnableHitEvents")] + public static extern void ShapeEnableHitEvents(ShapeId shapeId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_EnableSensorEvents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeEnableSensorEvents(ShapeId shapeId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_EnablePreSolveEvents")] + public static extern void ShapeEnablePreSolveEvents(ShapeId shapeId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetAABB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern AABB ShapeGetAABB(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_EnableSensorEvents")] + public static extern void ShapeEnableSensorEvents(ShapeId shapeId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetBody", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern BodyId ShapeGetBody(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetAABB")] + public static extern AABB ShapeGetAABB(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Capsule ShapeGetCapsule(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetBody")] + public static extern BodyId ShapeGetBody(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Circle ShapeGetCircle(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetCapsule")] + public static extern Capsule ShapeGetCapsule(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetClosestPoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 ShapeGetClosestPoint(ShapeId shapeId, Vec2 target); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetCircle")] + public static extern Circle ShapeGetCircle(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetContactCapacity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int ShapeGetContactCapacity(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetClosestPoint")] + public static extern Vec2 ShapeGetClosestPoint(ShapeId shapeId, Vec2 target); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetContactData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern int ShapeGetContactData(ShapeId shapeId, ContactData* contactData, int capacity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetContactCapacity")] + public static extern int ShapeGetContactCapacity(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetDensity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float ShapeGetDensity(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetContactData")] + public static extern int ShapeGetContactData(ShapeId shapeId, ContactData* contactData, int capacity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetFilter", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Filter ShapeGetFilter(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetDensity")] + public static extern float ShapeGetDensity(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetFriction", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float ShapeGetFriction(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetFilter")] + public static extern Filter ShapeGetFilter(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetParentChain", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ChainId ShapeGetParentChain(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetFriction")] + public static extern float ShapeGetFriction(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Polygon ShapeGetPolygon(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetParentChain")] + public static extern ChainId ShapeGetParentChain(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetRestitution", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float ShapeGetRestitution(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetPolygon")] + public static extern Polygon ShapeGetPolygon(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetSegment", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Segment ShapeGetSegment(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetRestitution")] + public static extern float ShapeGetRestitution(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetSmoothSegment", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern SmoothSegment ShapeGetSmoothSegment(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetSegment")] + public static extern Segment ShapeGetSegment(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetType", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ShapeType ShapeGetType(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetSmoothSegment")] + public static extern SmoothSegment ShapeGetSmoothSegment(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetUserData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void* ShapeGetUserData(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetType")] + public static extern ShapeType ShapeGetType(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_IsSensor", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ShapeIsSensor(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetUserData")] + public static extern void* ShapeGetUserData(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ShapeIsValid(ShapeId id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_IsSensor")] + public static extern bool ShapeIsSensor(ShapeId shapeId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_RayCast", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput ShapeRayCast(ShapeId shapeId, Vec2 origin, Vec2 translation); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_IsValid")] + public static extern bool ShapeIsValid(ShapeId id); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetCapsule(ShapeId shapeId, Capsule* capsule); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_RayCast")] + public static extern CastOutput ShapeRayCast(ShapeId shapeId, Vec2 origin, Vec2 translation); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetCircle(ShapeId shapeId, Circle* circle); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetCapsule")] + public static extern void ShapeSetCapsule(ShapeId shapeId, Capsule* capsule); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetDensity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetDensity(ShapeId shapeId, float density); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetCircle")] + public static extern void ShapeSetCircle(ShapeId shapeId, Circle* circle); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetFilter", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetFilter(ShapeId shapeId, Filter filter); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetDensity")] + public static extern void ShapeSetDensity(ShapeId shapeId, float density); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetFriction", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetFriction(ShapeId shapeId, float friction); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetFilter")] + public static extern void ShapeSetFilter(ShapeId shapeId, Filter filter); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetPolygon(ShapeId shapeId, Polygon* polygon); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetFriction")] + public static extern void ShapeSetFriction(ShapeId shapeId, float friction); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetRestitution", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetRestitution(ShapeId shapeId, float restitution); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetPolygon")] + public static extern void ShapeSetPolygon(ShapeId shapeId, Polygon* polygon); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetSegment", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetSegment(ShapeId shapeId, Segment* segment); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetRestitution")] + public static extern void ShapeSetRestitution(ShapeId shapeId, float restitution); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetUserData", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void ShapeSetUserData(ShapeId shapeId, void* userData); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetSegment")] + public static extern void ShapeSetSegment(ShapeId shapeId, Segment* segment); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_TestPoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ShapeTestPoint(ShapeId shapeId, Vec2 point); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetUserData")] + public static extern void ShapeSetUserData(ShapeId shapeId, void* userData); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCast", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput ShapeCast(ShapeCastPairInput* input); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_TestPoint")] + public static extern bool ShapeTestPoint(ShapeId shapeId, Vec2 point); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCastCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput ShapeCastCapsule(ShapeCastInput* input, Capsule* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCast")] + public static extern CastOutput ShapeCast(ShapeCastPairInput* input); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCastCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput ShapeCastCircle(ShapeCastInput* input, Circle* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCastCapsule")] + public static extern CastOutput ShapeCastCapsule(ShapeCastInput* input, Capsule* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCastPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput ShapeCastPolygon(ShapeCastInput* input, Polygon* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCastCircle")] + public static extern CastOutput ShapeCastCircle(ShapeCastInput* input, Circle* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCastSegment", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern CastOutput ShapeCastSegment(ShapeCastInput* input, Segment* shape); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCastPolygon")] + public static extern CastOutput ShapeCastPolygon(ShapeCastInput* input, Polygon* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeDistance", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern DistanceOutput ShapeDistance(DistanceCache* cache, DistanceInput* input, Simplex* simplexes, int simplexCapacity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeCastSegment")] + public static extern CastOutput ShapeCastSegment(ShapeCastInput* input, Segment* shape); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SleepMilliseconds", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void SleepMilliseconds(int milliseconds); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeDistance")] + public static extern DistanceOutput ShapeDistance(DistanceCache* cache, DistanceInput* input, Simplex* simplexes, int simplexCapacity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Solve22", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Solve22(Mat22 A, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SleepMilliseconds")] + public static extern void SleepMilliseconds(int milliseconds); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Sub", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 Sub(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Solve22")] + public static extern Vec2 Solve22(Mat22 A, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2TimeOfImpact", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern TOIOutput TimeOfImpact(TOIInput* input); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Sub")] + public static extern Vec2 Sub(Vec2 a, Vec2 b); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2TransformPoint", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 TransformPoint(Transform t, Vec2 p); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2TimeOfImpact")] + public static extern TOIOutput TimeOfImpact(TOIInput* input); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2TransformPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Polygon TransformPolygon(Transform transform, Polygon* polygon); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2TransformPoint")] + public static extern Vec2 TransformPoint(Transform t, Vec2 p); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2UnwindAngle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float UnwindAngle(float angle); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2TransformPolygon")] + public static extern Polygon TransformPolygon(Transform transform, Polygon* polygon); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ValidateHull", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte ValidateHull(Hull* hull); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2UnwindAngle")] + public static extern float UnwindAngle(float angle); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Vec2_IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte Vec2IsValid(Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ValidateHull")] + public static extern bool ValidateHull(Hull* hull); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetAngularDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WeldJointGetAngularDampingRatio(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Vec2_IsValid")] + public static extern bool Vec2IsValid(Vec2 v); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetAngularHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WeldJointGetAngularHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetAngularDampingRatio")] + public static extern float WeldJointGetAngularDampingRatio(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetLinearDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WeldJointGetLinearDampingRatio(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetAngularHertz")] + public static extern float WeldJointGetAngularHertz(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetLinearHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WeldJointGetLinearHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetLinearDampingRatio")] + public static extern float WeldJointGetLinearDampingRatio(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetAngularDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WeldJointSetAngularDampingRatio(JointId jointId, float dampingRatio); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetLinearHertz")] + public static extern float WeldJointGetLinearHertz(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetAngularHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WeldJointSetAngularHertz(JointId jointId, float hertz); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetAngularDampingRatio")] + public static extern void WeldJointSetAngularDampingRatio(JointId jointId, float dampingRatio); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetLinearDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WeldJointSetLinearDampingRatio(JointId jointId, float dampingRatio); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetAngularHertz")] + public static extern void WeldJointSetAngularHertz(JointId jointId, float hertz); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetLinearHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WeldJointSetLinearHertz(JointId jointId, float hertz); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetLinearDampingRatio")] + public static extern void WeldJointSetLinearDampingRatio(JointId jointId, float dampingRatio); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_EnableLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WheelJointEnableLimit(JointId jointId, byte enableLimit); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetLinearHertz")] + public static extern void WeldJointSetLinearHertz(JointId jointId, float hertz); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_EnableMotor", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WheelJointEnableMotor(JointId jointId, byte enableMotor); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_EnableLimit")] + public static extern void WheelJointEnableLimit(JointId jointId, bool enableLimit); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_EnableSpring", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WheelJointEnableSpring(JointId jointId, byte enableSpring); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_EnableMotor")] + public static extern void WheelJointEnableMotor(JointId jointId, bool enableMotor); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetLowerLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WheelJointGetLowerLimit(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_EnableSpring")] + public static extern void WheelJointEnableSpring(JointId jointId, bool enableSpring); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetMaxMotorTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WheelJointGetMaxMotorTorque(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetLowerLimit")] + public static extern float WheelJointGetLowerLimit(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetMotorSpeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WheelJointGetMotorSpeed(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetMaxMotorTorque")] + public static extern float WheelJointGetMaxMotorTorque(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetMotorTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WheelJointGetMotorTorque(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetMotorSpeed")] + public static extern float WheelJointGetMotorSpeed(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WheelJointGetSpringDampingRatio(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetMotorTorque")] + public static extern float WheelJointGetMotorTorque(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WheelJointGetSpringHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetSpringDampingRatio")] + public static extern float WheelJointGetSpringDampingRatio(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetUpperLimit", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern float WheelJointGetUpperLimit(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetSpringHertz")] + public static extern float WheelJointGetSpringHertz(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_IsLimitEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte WheelJointIsLimitEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_GetUpperLimit")] + public static extern float WheelJointGetUpperLimit(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_IsMotorEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte WheelJointIsMotorEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_IsLimitEnabled")] + public static extern bool WheelJointIsLimitEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_IsSpringEnabled", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte WheelJointIsSpringEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_IsMotorEnabled")] + public static extern bool WheelJointIsMotorEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetLimits", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WheelJointSetLimits(JointId jointId, float lower, float upper); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_IsSpringEnabled")] + public static extern bool WheelJointIsSpringEnabled(JointId jointId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetMaxMotorTorque", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WheelJointSetMaxMotorTorque(JointId jointId, float torque); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetLimits")] + public static extern void WheelJointSetLimits(JointId jointId, float lower, float upper); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetMotorSpeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WheelJointSetMotorSpeed(JointId jointId, float motorSpeed); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetMaxMotorTorque")] + public static extern void WheelJointSetMaxMotorTorque(JointId jointId, float torque); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetSpringDampingRatio", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WheelJointSetSpringDampingRatio(JointId jointId, float dampingRatio); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetMotorSpeed")] + public static extern void WheelJointSetMotorSpeed(JointId jointId, float motorSpeed); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetSpringHertz", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WheelJointSetSpringHertz(JointId jointId, float hertz); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetSpringDampingRatio")] + public static extern void WheelJointSetSpringDampingRatio(JointId jointId, float dampingRatio); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldCastCapsule(WorldId worldId, Capsule* capsule, Transform originTransform, Vec2 translation, QueryFilter filter, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetSpringHertz")] + public static extern void WheelJointSetSpringHertz(JointId jointId, float hertz); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldCastCircle(WorldId worldId, Circle* circle, Transform originTransform, Vec2 translation, QueryFilter filter, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastCapsule")] + public static extern void WorldCastCapsule(WorldId worldId, Capsule* capsule, Transform originTransform, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldCastPolygon(WorldId worldId, Polygon* polygon, Transform originTransform, Vec2 translation, QueryFilter filter, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastCircle")] + public static extern void WorldCastCircle(WorldId worldId, Circle* circle, Transform originTransform, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastRay", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldCastRay(WorldId worldId, Vec2 origin, Vec2 translation, QueryFilter filter, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastPolygon")] + public static extern void WorldCastPolygon(WorldId worldId, Polygon* polygon, Transform originTransform, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastRayClosest", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern RayResult WorldCastRayClosest(WorldId worldId, Vec2 origin, Vec2 translation, QueryFilter filter); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastRay")] + public static extern void WorldCastRay(WorldId worldId, Vec2 origin, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Draw", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldDraw(WorldId worldId, DebugDraw* draw); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastRayClosest")] + public static extern RayResult WorldCastRayClosest(WorldId worldId, Vec2 origin, Vec2 translation, QueryFilter filter); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_DumpMemoryStats", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldDumpMemoryStats(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Draw")] + public static extern void WorldDraw(WorldId worldId, DebugDraw* draw); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableContinuous", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldEnableContinuous(WorldId worldId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_DumpMemoryStats")] + public static extern void WorldDumpMemoryStats(WorldId worldId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableSleeping", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldEnableSleeping(WorldId worldId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableContinuous")] + public static extern void WorldEnableContinuous(WorldId worldId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableWarmStarting", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldEnableWarmStarting(WorldId worldId, byte flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableSleeping")] + public static extern void WorldEnableSleeping(WorldId worldId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Explode", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldExplode(WorldId worldId, Vec2 position, float radius, float impulse); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableWarmStarting")] + public static extern void WorldEnableWarmStarting(WorldId worldId, bool flag); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetBodyEvents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern BodyEvents WorldGetBodyEvents(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Explode")] + public static extern void WorldExplode(WorldId worldId, Vec2 position, float radius, float impulse); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetContactEvents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern ContactEvents WorldGetContactEvents(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetBodyEvents")] + public static extern BodyEvents WorldGetBodyEvents(WorldId worldId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetCounters", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Counters WorldGetCounters(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetContactEvents")] + public static extern ContactEvents WorldGetContactEvents(WorldId worldId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetGravity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Vec2 WorldGetGravity(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetCounters")] + public static extern Counters WorldGetCounters(WorldId worldId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetProfile", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern Profile WorldGetProfile(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetGravity")] + public static extern Vec2 WorldGetGravity(WorldId worldId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetSensorEvents", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern SensorEvents WorldGetSensorEvents(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetProfile")] + public static extern Profile WorldGetProfile(WorldId worldId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_IsValid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern byte WorldIsValid(WorldId id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetSensorEvents")] + public static extern SensorEvents WorldGetSensorEvents(WorldId worldId); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapAABB", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldOverlapAABB(WorldId worldId, AABB aabb, QueryFilter filter, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_IsValid")] + public static extern bool WorldIsValid(WorldId id); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapCapsule", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldOverlapCapsule(WorldId worldId, Capsule* capsule, Transform transform, QueryFilter filter, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapAABB")] + public static extern void WorldOverlapAABB(WorldId worldId, AABB aabb, QueryFilter filter, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapCircle", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldOverlapCircle(WorldId worldId, Circle* circle, Transform transform, QueryFilter filter, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapCapsule")] + public static extern void WorldOverlapCapsule(WorldId worldId, Capsule* capsule, Transform transform, QueryFilter filter, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapPolygon", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldOverlapPolygon(WorldId worldId, Polygon* polygon, Transform transform, QueryFilter filter, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapCircle")] + public static extern void WorldOverlapCircle(WorldId worldId, Circle* circle, Transform transform, QueryFilter filter, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetContactTuning", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldSetContactTuning(WorldId worldId, float hertz, float dampingRatio, float pushVelocity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapPolygon")] + public static extern void WorldOverlapPolygon(WorldId worldId, Polygon* polygon, Transform transform, QueryFilter filter, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetCustomFilterCallback", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldSetCustomFilterCallback(WorldId worldId, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetContactTuning")] + public static extern void WorldSetContactTuning(WorldId worldId, float hertz, float dampingRatio, float pushVelocity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetGravity", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldSetGravity(WorldId worldId, Vec2 gravity); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetCustomFilterCallback")] + public static extern void WorldSetCustomFilterCallback(WorldId worldId, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetHitEventThreshold", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldSetHitEventThreshold(WorldId worldId, float value); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetGravity")] + public static extern void WorldSetGravity(WorldId worldId, Vec2 gravity); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetPreSolveCallback", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldSetPreSolveCallback(WorldId worldId, System.IntPtr fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetHitEventThreshold")] + public static extern void WorldSetHitEventThreshold(WorldId worldId, float value); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetRestitutionThreshold", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldSetRestitutionThreshold(WorldId worldId, float value); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetPreSolveCallback")] + public static extern void WorldSetPreSolveCallback(WorldId worldId, delegate* unmanaged fcn, void* context); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Step", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void WorldStep(WorldId worldId, float timeStep, int subStepCount); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetRestitutionThreshold")] + public static extern void WorldSetRestitutionThreshold(WorldId worldId, float value); - [System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Yield", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern void Yield(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Step")] + public static extern void WorldStep(WorldId worldId, float timeStep, int subStepCount); - public partial struct AABB - { - public Vec2 lowerBound; + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Yield")] + public static extern void Yield(); - public Vec2 upperBound; - } + public enum BodyType : uint + { + staticBody = 0, + kinematicBody = 1, + dynamicBody = 2, + bodyTypeCount = 3 + } - public partial struct BodyDef - { - public BodyType type; + public enum HexColor : uint + { + colorAliceBlue = 15792383, + colorAntiqueWhite = 16444375, + colorAqua = 65535, + colorAquamarine = 8388564, + colorAzure = 15794175, + colorBeige = 16119260, + colorBisque = 16770244, + colorBlack = 0, + colorBlanchedAlmond = 16772045, + colorBlue = 255, + colorBlueViolet = 9055202, + colorBrown = 10824234, + colorBurlywood = 14596231, + colorCadetBlue = 6266528, + colorChartreuse = 8388352, + colorChocolate = 13789470, + colorCoral = 16744272, + colorCornflowerBlue = 6591981, + colorCornsilk = 16775388, + colorCrimson = 14423100, + colorCyan = 65535, + colorDarkBlue = 139, + colorDarkCyan = 35723, + colorDarkGoldenrod = 12092939, + colorDarkGray = 11119017, + colorDarkGreen = 25600, + colorDarkKhaki = 12433259, + colorDarkMagenta = 9109643, + colorDarkOliveGreen = 5597999, + colorDarkOrange = 16747520, + colorDarkOrchid = 10040012, + colorDarkRed = 9109504, + colorDarkSalmon = 15308410, + colorDarkSeaGreen = 9419919, + colorDarkSlateBlue = 4734347, + colorDarkSlateGray = 3100495, + colorDarkTurquoise = 52945, + colorDarkViolet = 9699539, + colorDeepPink = 16716947, + colorDeepSkyBlue = 49151, + colorDimGray = 6908265, + colorDodgerBlue = 2003199, + colorFirebrick = 11674146, + colorFloralWhite = 16775920, + colorForestGreen = 2263842, + colorFuchsia = 16711935, + colorGainsboro = 14474460, + colorGhostWhite = 16316671, + colorGold = 16766720, + colorGoldenrod = 14329120, + colorGray = 12500670, + colorGray1 = 1710618, + colorGray2 = 3355443, + colorGray3 = 5066061, + colorGray4 = 6710886, + colorGray5 = 8355711, + colorGray6 = 10066329, + colorGray7 = 11776947, + colorGray8 = 13421772, + colorGray9 = 15066597, + colorGreen = 65280, + colorGreenYellow = 11403055, + colorHoneydew = 15794160, + colorHotPink = 16738740, + colorIndianRed = 13458524, + colorIndigo = 4915330, + colorIvory = 16777200, + colorKhaki = 15787660, + colorLavender = 15132410, + colorLavenderBlush = 16773365, + colorLawnGreen = 8190976, + colorLemonChiffon = 16775885, + colorLightBlue = 11393254, + colorLightCoral = 15761536, + colorLightCyan = 14745599, + colorLightGoldenrod = 15654274, + colorLightGoldenrodYellow = 16448210, + colorLightGray = 13882323, + colorLightGreen = 9498256, + colorLightPink = 16758465, + colorLightSalmon = 16752762, + colorLightSeaGreen = 2142890, + colorLightSkyBlue = 8900346, + colorLightSlateBlue = 8679679, + colorLightSlateGray = 7833753, + colorLightSteelBlue = 11584734, + colorLightYellow = 16777184, + colorLime = 65280, + colorLimeGreen = 3329330, + colorLinen = 16445670, + colorMagenta = 16711935, + colorMaroon = 11546720, + colorMediumAquamarine = 6737322, + colorMediumBlue = 205, + colorMediumOrchid = 12211667, + colorMediumPurple = 9662683, + colorMediumSeaGreen = 3978097, + colorMediumSlateBlue = 8087790, + colorMediumSpringGreen = 64154, + colorMediumTurquoise = 4772300, + colorMediumVioletRed = 13047173, + colorMidnightBlue = 1644912, + colorMintCream = 16121850, + colorMistyRose = 16770273, + colorMoccasin = 16770229, + colorNavajoWhite = 16768685, + colorNavy = 128, + colorNavyBlue = 128, + colorOldLace = 16643558, + colorOlive = 8421376, + colorOliveDrab = 7048739, + colorOrange = 16753920, + colorOrangeRed = 16729344, + colorOrchid = 14315734, + colorPaleGoldenrod = 15657130, + colorPaleGreen = 10025880, + colorPaleTurquoise = 11529966, + colorPaleVioletRed = 14381203, + colorPapayaWhip = 16773077, + colorPeachPuff = 16767673, + colorPeru = 13468991, + colorPink = 16761035, + colorPlum = 14524637, + colorPowderBlue = 11591910, + colorPurple = 10494192, + colorRebeccaPurple = 6697881, + colorRed = 16711680, + colorRosyBrown = 12357519, + colorRoyalBlue = 4286945, + colorSaddleBrown = 9127187, + colorSalmon = 16416882, + colorSandyBrown = 16032864, + colorSeaGreen = 3050327, + colorSeashell = 16774638, + colorSienna = 10506797, + colorSilver = 12632256, + colorSkyBlue = 8900331, + colorSlateBlue = 6970061, + colorSlateGray = 7372944, + colorSnow = 16775930, + colorSpringGreen = 65407, + colorSteelBlue = 4620980, + colorTan = 13808780, + colorTeal = 32896, + colorThistle = 14204888, + colorTomato = 16737095, + colorTurquoise = 4251856, + colorViolet = 15631086, + colorVioletRed = 13639824, + colorWheat = 16113331, + colorWhite = 16777215, + colorWhiteSmoke = 16119285, + colorYellow = 16776960, + colorYellowGreen = 10145074, + colorBox2DRed = 14430514, + colorBox2DBlue = 3190463, + colorBox2DGreen = 9226532, + colorBox2DYellow = 16772748 + } - public Vec2 position; + public enum JointType : uint + { + distanceJoint = 0, + motorJoint = 1, + mouseJoint = 2, + prismaticJoint = 3, + revoluteJoint = 4, + weldJoint = 5, + wheelJoint = 6 + } - public Rot rotation; + public enum ShapeType : uint + { + circleShape = 0, + capsuleShape = 1, + segmentShape = 2, + polygonShape = 3, + smoothSegmentShape = 4, + shapeTypeCount = 5 + } - public Vec2 linearVelocity; + public enum TOIState : uint + { + toiStateUnknown = 0, + toiStateFailed = 1, + toiStateOverlapped = 2, + toiStateHit = 3, + toiStateSeparated = 4 + } - public float angularVelocity; + public const BodyType staticBody = BodyType.staticBody; - public float linearDamping; + public const BodyType kinematicBody = BodyType.kinematicBody; - public float angularDamping; + public const BodyType dynamicBody = BodyType.dynamicBody; - public float gravityScale; + public const BodyType bodyTypeCount = BodyType.bodyTypeCount; - public float sleepThreshold; + public const HexColor colorAliceBlue = HexColor.colorAliceBlue; - public void* userData; + public const HexColor colorAntiqueWhite = HexColor.colorAntiqueWhite; - public byte enableSleep; + public const HexColor colorAqua = HexColor.colorAqua; - public byte isAwake; + public const HexColor colorAquamarine = HexColor.colorAquamarine; - public byte fixedRotation; + public const HexColor colorAzure = HexColor.colorAzure; - public byte isBullet; + public const HexColor colorBeige = HexColor.colorBeige; - public byte isEnabled; + public const HexColor colorBisque = HexColor.colorBisque; - public byte automaticMass; + public const HexColor colorBlack = HexColor.colorBlack; - public byte allowFastRotation; + public const HexColor colorBlanchedAlmond = HexColor.colorBlanchedAlmond; - public int internalValue; - } + public const HexColor colorBlue = HexColor.colorBlue; - public partial struct BodyEvents - { - public BodyMoveEvent* moveEvents; + public const HexColor colorBlueViolet = HexColor.colorBlueViolet; - public int moveCount; - } + public const HexColor colorBrown = HexColor.colorBrown; - public partial struct BodyId - { - public int index1; + public const HexColor colorBurlywood = HexColor.colorBurlywood; - public ushort world0; + public const HexColor colorCadetBlue = HexColor.colorCadetBlue; - public ushort revision; - } + public const HexColor colorChartreuse = HexColor.colorChartreuse; - public partial struct BodyMoveEvent - { - public Transform transform; + public const HexColor colorChocolate = HexColor.colorChocolate; - public BodyId bodyId; + public const HexColor colorCoral = HexColor.colorCoral; - public void* userData; + public const HexColor colorCornflowerBlue = HexColor.colorCornflowerBlue; - public byte fellAsleep; - } + public const HexColor colorCornsilk = HexColor.colorCornsilk; - public partial struct Capsule - { - public Vec2 center1; + public const HexColor colorCrimson = HexColor.colorCrimson; - public Vec2 center2; + public const HexColor colorCyan = HexColor.colorCyan; - public float radius; - } + public const HexColor colorDarkBlue = HexColor.colorDarkBlue; - public partial struct CastOutput - { - public Vec2 normal; + public const HexColor colorDarkCyan = HexColor.colorDarkCyan; - public Vec2 point; + public const HexColor colorDarkGoldenrod = HexColor.colorDarkGoldenrod; - public float fraction; + public const HexColor colorDarkGray = HexColor.colorDarkGray; - public int iterations; + public const HexColor colorDarkGreen = HexColor.colorDarkGreen; - public byte hit; - } + public const HexColor colorDarkKhaki = HexColor.colorDarkKhaki; - public partial struct ChainDef - { - public void* userData; + public const HexColor colorDarkMagenta = HexColor.colorDarkMagenta; - public Vec2* points; + public const HexColor colorDarkOliveGreen = HexColor.colorDarkOliveGreen; - public int count; + public const HexColor colorDarkOrange = HexColor.colorDarkOrange; - public float friction; + public const HexColor colorDarkOrchid = HexColor.colorDarkOrchid; - public float restitution; + public const HexColor colorDarkRed = HexColor.colorDarkRed; - public Filter filter; + public const HexColor colorDarkSalmon = HexColor.colorDarkSalmon; - public byte isLoop; + public const HexColor colorDarkSeaGreen = HexColor.colorDarkSeaGreen; - public int internalValue; - } + public const HexColor colorDarkSlateBlue = HexColor.colorDarkSlateBlue; - public partial struct ChainId - { - public int index1; + public const HexColor colorDarkSlateGray = HexColor.colorDarkSlateGray; - public ushort world0; + public const HexColor colorDarkTurquoise = HexColor.colorDarkTurquoise; - public ushort revision; - } + public const HexColor colorDarkViolet = HexColor.colorDarkViolet; - public partial struct Circle - { - public Vec2 center; + public const HexColor colorDeepPink = HexColor.colorDeepPink; - public float radius; - } + public const HexColor colorDeepSkyBlue = HexColor.colorDeepSkyBlue; - public partial struct ContactBeginTouchEvent - { - public ShapeId shapeIdA; + public const HexColor colorDimGray = HexColor.colorDimGray; - public ShapeId shapeIdB; - } + public const HexColor colorDodgerBlue = HexColor.colorDodgerBlue; - public partial struct ContactData - { - public ShapeId shapeIdA; + public const HexColor colorFirebrick = HexColor.colorFirebrick; - public ShapeId shapeIdB; + public const HexColor colorFloralWhite = HexColor.colorFloralWhite; - public Manifold manifold; - } + public const HexColor colorForestGreen = HexColor.colorForestGreen; - public partial struct ContactEndTouchEvent - { - public ShapeId shapeIdA; + public const HexColor colorFuchsia = HexColor.colorFuchsia; - public ShapeId shapeIdB; - } + public const HexColor colorGainsboro = HexColor.colorGainsboro; - public partial struct ContactEvents - { - public ContactBeginTouchEvent* beginEvents; + public const HexColor colorGhostWhite = HexColor.colorGhostWhite; - public ContactEndTouchEvent* endEvents; + public const HexColor colorGold = HexColor.colorGold; - public ContactHitEvent* hitEvents; + public const HexColor colorGoldenrod = HexColor.colorGoldenrod; - public int beginCount; + public const HexColor colorGray = HexColor.colorGray; - public int endCount; + public const HexColor colorGray1 = HexColor.colorGray1; - public int hitCount; - } + public const HexColor colorGray2 = HexColor.colorGray2; - public partial struct ContactHitEvent - { - public ShapeId shapeIdA; + public const HexColor colorGray3 = HexColor.colorGray3; - public ShapeId shapeIdB; + public const HexColor colorGray4 = HexColor.colorGray4; - public Vec2 point; + public const HexColor colorGray5 = HexColor.colorGray5; - public Vec2 normal; + public const HexColor colorGray6 = HexColor.colorGray6; - public float approachSpeed; - } + public const HexColor colorGray7 = HexColor.colorGray7; - public partial struct Counters - { - public int staticBodyCount; + public const HexColor colorGray8 = HexColor.colorGray8; - public int bodyCount; + public const HexColor colorGray9 = HexColor.colorGray9; - public int shapeCount; + public const HexColor colorGreen = HexColor.colorGreen; - public int contactCount; + public const HexColor colorGreenYellow = HexColor.colorGreenYellow; - public int jointCount; + public const HexColor colorHoneydew = HexColor.colorHoneydew; - public int islandCount; + public const HexColor colorHotPink = HexColor.colorHotPink; - public int stackUsed; + public const HexColor colorIndianRed = HexColor.colorIndianRed; - public int staticTreeHeight; + public const HexColor colorIndigo = HexColor.colorIndigo; - public int treeHeight; + public const HexColor colorIvory = HexColor.colorIvory; - public int byteCount; + public const HexColor colorKhaki = HexColor.colorKhaki; - public int taskCount; + public const HexColor colorLavender = HexColor.colorLavender; - public fixed int colorCounts[12]; - } + public const HexColor colorLavenderBlush = HexColor.colorLavenderBlush; - public partial struct DebugDraw - { - public System.IntPtr DrawPolygon; // delegate* + public const HexColor colorLawnGreen = HexColor.colorLawnGreen; - public System.IntPtr DrawSolidPolygon; // delegate* + public const HexColor colorLemonChiffon = HexColor.colorLemonChiffon; - public System.IntPtr DrawCircle; // delegate* + public const HexColor colorLightBlue = HexColor.colorLightBlue; - public System.IntPtr DrawSolidCircle; // delegate* + public const HexColor colorLightCoral = HexColor.colorLightCoral; - public System.IntPtr DrawCapsule; // delegate* + public const HexColor colorLightCyan = HexColor.colorLightCyan; - public System.IntPtr DrawSolidCapsule; // delegate* + public const HexColor colorLightGoldenrod = HexColor.colorLightGoldenrod; - public System.IntPtr DrawSegment; // delegate* + public const HexColor colorLightGoldenrodYellow = HexColor.colorLightGoldenrodYellow; - public System.IntPtr DrawTransform; // delegate* + public const HexColor colorLightGray = HexColor.colorLightGray; - public System.IntPtr DrawPoint; // delegate* + public const HexColor colorLightGreen = HexColor.colorLightGreen; - public System.IntPtr DrawString; // delegate* + public const HexColor colorLightPink = HexColor.colorLightPink; - public AABB drawingBounds; + public const HexColor colorLightSalmon = HexColor.colorLightSalmon; - public byte useDrawingBounds; + public const HexColor colorLightSeaGreen = HexColor.colorLightSeaGreen; - public byte drawShapes; + public const HexColor colorLightSkyBlue = HexColor.colorLightSkyBlue; - public byte drawJoints; + public const HexColor colorLightSlateBlue = HexColor.colorLightSlateBlue; - public byte drawJointExtras; + public const HexColor colorLightSlateGray = HexColor.colorLightSlateGray; - public byte drawAABBs; + public const HexColor colorLightSteelBlue = HexColor.colorLightSteelBlue; - public byte drawMass; + public const HexColor colorLightYellow = HexColor.colorLightYellow; - public byte drawContacts; + public const HexColor colorLime = HexColor.colorLime; - public byte drawGraphColors; + public const HexColor colorLimeGreen = HexColor.colorLimeGreen; - public byte drawContactNormals; + public const HexColor colorLinen = HexColor.colorLinen; - public byte drawContactImpulses; + public const HexColor colorMagenta = HexColor.colorMagenta; - public byte drawFrictionImpulses; + public const HexColor colorMaroon = HexColor.colorMaroon; - public void* context; - } + public const HexColor colorMediumAquamarine = HexColor.colorMediumAquamarine; - public partial struct DistanceCache - { - public ushort count; + public const HexColor colorMediumBlue = HexColor.colorMediumBlue; - public fixed byte indexA[3]; + public const HexColor colorMediumOrchid = HexColor.colorMediumOrchid; - public fixed byte indexB[3]; - } + public const HexColor colorMediumPurple = HexColor.colorMediumPurple; - public partial struct DistanceInput - { - public DistanceProxy proxyA; + public const HexColor colorMediumSeaGreen = HexColor.colorMediumSeaGreen; - public DistanceProxy proxyB; + public const HexColor colorMediumSlateBlue = HexColor.colorMediumSlateBlue; - public Transform transformA; + public const HexColor colorMediumSpringGreen = HexColor.colorMediumSpringGreen; - public Transform transformB; + public const HexColor colorMediumTurquoise = HexColor.colorMediumTurquoise; - public byte useRadii; - } + public const HexColor colorMediumVioletRed = HexColor.colorMediumVioletRed; - public partial struct DistanceJointDef - { - public BodyId bodyIdA; + public const HexColor colorMidnightBlue = HexColor.colorMidnightBlue; - public BodyId bodyIdB; + public const HexColor colorMintCream = HexColor.colorMintCream; - public Vec2 localAnchorA; + public const HexColor colorMistyRose = HexColor.colorMistyRose; - public Vec2 localAnchorB; + public const HexColor colorMoccasin = HexColor.colorMoccasin; - public float length; + public const HexColor colorNavajoWhite = HexColor.colorNavajoWhite; - public byte enableSpring; + public const HexColor colorNavy = HexColor.colorNavy; - public float hertz; + public const HexColor colorNavyBlue = HexColor.colorNavyBlue; - public float dampingRatio; + public const HexColor colorOldLace = HexColor.colorOldLace; - public byte enableLimit; + public const HexColor colorOlive = HexColor.colorOlive; - public float minLength; + public const HexColor colorOliveDrab = HexColor.colorOliveDrab; - public float maxLength; + public const HexColor colorOrange = HexColor.colorOrange; - public byte enableMotor; + public const HexColor colorOrangeRed = HexColor.colorOrangeRed; - public float maxMotorForce; + public const HexColor colorOrchid = HexColor.colorOrchid; - public float motorSpeed; + public const HexColor colorPaleGoldenrod = HexColor.colorPaleGoldenrod; - public byte collideConnected; + public const HexColor colorPaleGreen = HexColor.colorPaleGreen; - public void* userData; + public const HexColor colorPaleTurquoise = HexColor.colorPaleTurquoise; - public int internalValue; - } + public const HexColor colorPaleVioletRed = HexColor.colorPaleVioletRed; - public partial struct DistanceOutput - { - public Vec2 pointA; + public const HexColor colorPapayaWhip = HexColor.colorPapayaWhip; - public Vec2 pointB; + public const HexColor colorPeachPuff = HexColor.colorPeachPuff; - public float distance; + public const HexColor colorPeru = HexColor.colorPeru; - public int iterations; + public const HexColor colorPink = HexColor.colorPink; - public int simplexCount; - } + public const HexColor colorPlum = HexColor.colorPlum; - public partial struct DistanceProxy - { - public points_FixedBuffer points; + public const HexColor colorPowderBlue = HexColor.colorPowderBlue; - public int count; + public const HexColor colorPurple = HexColor.colorPurple; - public float radius; + public const HexColor colorRebeccaPurple = HexColor.colorRebeccaPurple; - public partial struct points_FixedBuffer - { - public Vec2 Item0; + public const HexColor colorRed = HexColor.colorRed; - public Vec2 Item1; + public const HexColor colorRosyBrown = HexColor.colorRosyBrown; - public Vec2 Item2; + public const HexColor colorRoyalBlue = HexColor.colorRoyalBlue; - public Vec2 Item3; + public const HexColor colorSaddleBrown = HexColor.colorSaddleBrown; - public Vec2 Item4; + public const HexColor colorSalmon = HexColor.colorSalmon; - public Vec2 Item5; + public const HexColor colorSandyBrown = HexColor.colorSandyBrown; - public Vec2 Item6; + public const HexColor colorSeaGreen = HexColor.colorSeaGreen; - public Vec2 Item7; + public const HexColor colorSeashell = HexColor.colorSeashell; - public ref Vec2 this[int index] => ref AsSpan()[index]; + public const HexColor colorSienna = HexColor.colorSienna; - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public System.Span AsSpan() => System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref Item0, 8); - } - } + public const HexColor colorSilver = HexColor.colorSilver; - public partial struct DynamicTree - { - public TreeNode* nodes; + public const HexColor colorSkyBlue = HexColor.colorSkyBlue; - public int root; + public const HexColor colorSlateBlue = HexColor.colorSlateBlue; - public int nodeCount; + public const HexColor colorSlateGray = HexColor.colorSlateGray; - public int nodeCapacity; + public const HexColor colorSnow = HexColor.colorSnow; - public int freeList; + public const HexColor colorSpringGreen = HexColor.colorSpringGreen; - public int proxyCount; + public const HexColor colorSteelBlue = HexColor.colorSteelBlue; - public int* leafIndices; + public const HexColor colorTan = HexColor.colorTan; - public AABB* leafBoxes; + public const HexColor colorTeal = HexColor.colorTeal; - public Vec2* leafCenters; + public const HexColor colorThistle = HexColor.colorThistle; - public int* binIndices; + public const HexColor colorTomato = HexColor.colorTomato; - public int rebuildCapacity; - } + public const HexColor colorTurquoise = HexColor.colorTurquoise; - public partial struct Filter - { - public uint categoryBits; + public const HexColor colorViolet = HexColor.colorViolet; - public uint maskBits; + public const HexColor colorVioletRed = HexColor.colorVioletRed; - public int groupIndex; - } + public const HexColor colorWheat = HexColor.colorWheat; - public partial struct Hull - { - public points_FixedBuffer points; + public const HexColor colorWhite = HexColor.colorWhite; - public int count; + public const HexColor colorWhiteSmoke = HexColor.colorWhiteSmoke; - public partial struct points_FixedBuffer - { - public Vec2 Item0; + public const HexColor colorYellow = HexColor.colorYellow; - public Vec2 Item1; + public const HexColor colorYellowGreen = HexColor.colorYellowGreen; - public Vec2 Item2; + public const HexColor colorBox2DRed = HexColor.colorBox2DRed; - public Vec2 Item3; + public const HexColor colorBox2DBlue = HexColor.colorBox2DBlue; - public Vec2 Item4; + public const HexColor colorBox2DGreen = HexColor.colorBox2DGreen; - public Vec2 Item5; + public const HexColor colorBox2DYellow = HexColor.colorBox2DYellow; - public Vec2 Item6; + public const JointType distanceJoint = JointType.distanceJoint; - public Vec2 Item7; + public const JointType motorJoint = JointType.motorJoint; - public ref Vec2 this[int index] => ref AsSpan()[index]; + public const JointType mouseJoint = JointType.mouseJoint; - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public System.Span AsSpan() => System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref Item0, 8); - } - } + public const JointType prismaticJoint = JointType.prismaticJoint; - public partial struct JointId - { - public int index1; + public const JointType revoluteJoint = JointType.revoluteJoint; - public ushort world0; + public const JointType weldJoint = JointType.weldJoint; - public ushort revision; - } + public const JointType wheelJoint = JointType.wheelJoint; - public partial struct Manifold - { - public points_FixedBuffer points; + public const ShapeType circleShape = ShapeType.circleShape; - public Vec2 normal; + public const ShapeType capsuleShape = ShapeType.capsuleShape; - public int pointCount; + public const ShapeType segmentShape = ShapeType.segmentShape; - public partial struct points_FixedBuffer - { - public ManifoldPoint Item0; + public const ShapeType polygonShape = ShapeType.polygonShape; - public ManifoldPoint Item1; + public const ShapeType smoothSegmentShape = ShapeType.smoothSegmentShape; - public ref ManifoldPoint this[int index] => ref AsSpan()[index]; + public const ShapeType shapeTypeCount = ShapeType.shapeTypeCount; - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public System.Span AsSpan() => System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref Item0, 2); - } - } + public const TOIState toiStateUnknown = TOIState.toiStateUnknown; - public partial struct ManifoldPoint - { - public Vec2 point; + public const TOIState toiStateFailed = TOIState.toiStateFailed; - public Vec2 anchorA; + public const TOIState toiStateOverlapped = TOIState.toiStateOverlapped; - public Vec2 anchorB; + public const TOIState toiStateHit = TOIState.toiStateHit; - public float separation; + public const TOIState toiStateSeparated = TOIState.toiStateSeparated; - public float normalImpulse; + public partial struct Version + { + public int major; - public float tangentImpulse; + public int minor; - public float maxNormalImpulse; + public int revision; + } - public float normalVelocity; + public partial struct Timer + { + public ulong start_sec; - public ushort id; + public ulong start_usec; + } - public byte persisted; - } + public partial struct Vec2 + { + public float x; - public partial struct MassData - { - public float mass; + public float y; + } - public Vec2 center; + public partial struct Rot + { + public float c; - public float rotationalInertia; - } + public float s; + } - public partial struct Mat22 - { - public Vec2 cx; + public partial struct Transform + { + public Vec2 p; - public Vec2 cy; - } + public Rot q; + } - public partial struct MotorJointDef - { - public BodyId bodyIdA; + public partial struct Mat22 + { + public Vec2 cx; - public BodyId bodyIdB; + public Vec2 cy; + } - public Vec2 linearOffset; + public partial struct AABB + { + public Vec2 lowerBound; - public float angularOffset; + public Vec2 upperBound; + } - public float maxForce; + public partial struct Circle + { + public Vec2 center; - public float maxTorque; + public float radius; + } - public float correctionFactor; + public partial struct Capsule + { + public Vec2 center1; - public byte collideConnected; + public Vec2 center2; - public void* userData; + public float radius; + } - public int internalValue; - } + public partial struct DistanceCache + { + public ushort count; - public partial struct MouseJointDef - { - public BodyId bodyIdA; + public InlineArrays.byte_3 indexA; - public BodyId bodyIdB; + public InlineArrays.byte_3 indexB; + } - public Vec2 target; + public partial struct Polygon + { + public InlineArrays.Vec2_8 vertices; - public float hertz; + public InlineArrays.Vec2_8 normals; - public float dampingRatio; + public Vec2 centroid; - public float maxForce; + public float radius; - public byte collideConnected; + public int count; + } - public void* userData; + public partial struct Segment + { + public Vec2 point1; - public int internalValue; - } + public Vec2 point2; + } - public partial struct Polygon - { - public vertices_FixedBuffer vertices; + public partial struct SmoothSegment + { + public Vec2 ghost1; - public normals_FixedBuffer normals; + public Segment segment; - public Vec2 centroid; + public Vec2 ghost2; - public float radius; + public int chainId; + } - public int count; + public partial struct Hull + { + public InlineArrays.Vec2_8 points; - public partial struct vertices_FixedBuffer - { - public Vec2 Item0; + public int count; + } - public Vec2 Item1; + public partial struct RayCastInput + { + public Vec2 origin; - public Vec2 Item2; + public Vec2 translation; - public Vec2 Item3; + public float maxFraction; + } - public Vec2 Item4; + public partial struct ShapeCastInput + { + public InlineArrays.Vec2_8 points; - public Vec2 Item5; + public int count; - public Vec2 Item6; + public float radius; - public Vec2 Item7; + public Vec2 translation; - public ref Vec2 this[int index] => ref AsSpan()[index]; + public float maxFraction; + } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public System.Span AsSpan() => System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref Item0, 8); - } + public partial struct CastOutput + { + public Vec2 normal; - public partial struct normals_FixedBuffer - { - public Vec2 Item0; + public Vec2 point; - public Vec2 Item1; + public float fraction; - public Vec2 Item2; + public int iterations; - public Vec2 Item3; + public bool hit; + } - public Vec2 Item4; + public partial struct MassData + { + public float mass; - public Vec2 Item5; + public Vec2 center; - public Vec2 Item6; + public float rotationalInertia; + } - public Vec2 Item7; + public partial struct SegmentDistanceResult + { + public Vec2 closest1; - public ref Vec2 this[int index] => ref AsSpan()[index]; + public Vec2 closest2; - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public System.Span AsSpan() => System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref Item0, 8); - } - } + public float fraction1; - public partial struct PrismaticJointDef - { - public BodyId bodyIdA; + public float fraction2; - public BodyId bodyIdB; + public float distanceSquared; + } - public Vec2 localAnchorA; + public partial struct DistanceProxy + { + public InlineArrays.Vec2_8 points; - public Vec2 localAnchorB; + public int count; - public Vec2 localAxisA; + public float radius; + } - public float referenceAngle; + public partial struct DistanceInput + { + public DistanceProxy proxyA; - public byte enableSpring; + public DistanceProxy proxyB; - public float hertz; + public Transform transformA; - public float dampingRatio; + public Transform transformB; - public byte enableLimit; + public bool useRadii; + } - public float lowerTranslation; + public partial struct DistanceOutput + { + public Vec2 pointA; - public float upperTranslation; + public Vec2 pointB; - public byte enableMotor; + public float distance; - public float maxMotorForce; + public int iterations; - public float motorSpeed; + public int simplexCount; + } - public byte collideConnected; + public partial struct SimplexVertex + { + public Vec2 wA; - public void* userData; + public Vec2 wB; - public int internalValue; - } + public Vec2 w; - public partial struct Profile - { - public float step; + public float a; - public float pairs; + public int indexA; - public float collide; + public int indexB; + } - public float solve; + public partial struct Simplex + { + public SimplexVertex v1; - public float buildIslands; + public SimplexVertex v2; - public float solveConstraints; + public SimplexVertex v3; - public float prepareTasks; + public int count; + } - public float solverTasks; + public partial struct ShapeCastPairInput + { + public DistanceProxy proxyA; - public float prepareConstraints; + public DistanceProxy proxyB; - public float integrateVelocities; + public Transform transformA; - public float warmStart; + public Transform transformB; - public float solveVelocities; + public Vec2 translationB; - public float integratePositions; + public float maxFraction; + } - public float relaxVelocities; + public partial struct Sweep + { + public Vec2 localCenter; - public float applyRestitution; + public Vec2 c1; - public float storeImpulses; + public Vec2 c2; - public float finalizeBodies; + public Rot q1; - public float splitIslands; + public Rot q2; + } - public float sleepIslands; + public partial struct TOIInput + { + public DistanceProxy proxyA; - public float hitEvents; + public DistanceProxy proxyB; - public float broadphase; + public Sweep sweepA; - public float continuous; - } + public Sweep sweepB; - public partial struct QueryFilter - { - public uint categoryBits; + public float tMax; + } - public uint maskBits; - } + public partial struct TOIOutput + { + public TOIState state; - public partial struct RayCastInput - { - public Vec2 origin; + public float t; + } - public Vec2 translation; + public partial struct ManifoldPoint + { + public Vec2 point; - public float maxFraction; - } + public Vec2 anchorA; - public partial struct RayResult - { - public ShapeId shapeId; + public Vec2 anchorB; - public Vec2 point; + public float separation; - public Vec2 normal; + public float normalImpulse; - public float fraction; + public float tangentImpulse; - public byte hit; - } + public float maxNormalImpulse; - public partial struct RevoluteJointDef - { - public BodyId bodyIdA; + public float normalVelocity; - public BodyId bodyIdB; + public ushort id; - public Vec2 localAnchorA; + public bool persisted; + } - public Vec2 localAnchorB; + public partial struct Manifold + { + public InlineArrays.ManifoldPoint_2 points; - public float referenceAngle; + public Vec2 normal; - public byte enableSpring; + public int pointCount; + } - public float hertz; + public partial struct TreeNode + { + public AABB aabb; - public float dampingRatio; + public uint categoryBits; - public byte enableLimit; + public TreeNode.AnonymousRecord_collision_L608_C2 TreeNode_AnonymousRecord_collision_L608_C2_Field; - public float lowerAngle; + public int child1; - public float upperAngle; + public int child2; - public byte enableMotor; + public int userData; - public float maxMotorTorque; + public short height; - public float motorSpeed; + public bool enlarged; - public float drawSize; + public InlineArrays.byte_9 pad; - public byte collideConnected; + public ref int parent => ref TreeNode_AnonymousRecord_collision_L608_C2_Field.parent; - public void* userData; + public ref int next => ref TreeNode_AnonymousRecord_collision_L608_C2_Field.next; + } - public int internalValue; - } + public partial struct TreeNode + { + [StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)] + public partial struct AnonymousRecord_collision_L608_C2 + { + [System.Runtime.InteropServices.FieldOffset(0)] + public int parent; + + [System.Runtime.InteropServices.FieldOffset(0)] + public int next; + } + } - public partial struct Rot - { - public float c; + public partial struct DynamicTree + { + public TreeNode* nodes; - public float s; - } + public int root; - public partial struct Segment - { - public Vec2 point1; + public int nodeCount; - public Vec2 point2; - } + public int nodeCapacity; - public partial struct SegmentDistanceResult - { - public Vec2 closest1; + public int freeList; - public Vec2 closest2; + public int proxyCount; - public float fraction1; + public int* leafIndices; - public float fraction2; + public AABB* leafBoxes; - public float distanceSquared; - } + public Vec2* leafCenters; - public partial struct SensorBeginTouchEvent - { - public ShapeId sensorShapeId; + public int* binIndices; - public ShapeId visitorShapeId; - } + public int rebuildCapacity; + } - public partial struct SensorEndTouchEvent - { - public ShapeId sensorShapeId; + public partial struct WorldId + { + public ushort index1; - public ShapeId visitorShapeId; - } + public ushort revision; + } - public partial struct SensorEvents - { - public SensorBeginTouchEvent* beginEvents; + public partial struct BodyId + { + public int index1; - public SensorEndTouchEvent* endEvents; + public ushort world0; - public int beginCount; + public ushort revision; + } - public int endCount; - } + public partial struct ShapeId + { + public int index1; - public partial struct ShapeCastInput - { - public points_FixedBuffer points; + public ushort world0; - public int count; + public ushort revision; + } - public float radius; + public partial struct JointId + { + public int index1; - public Vec2 translation; + public ushort world0; - public float maxFraction; + public ushort revision; + } - public partial struct points_FixedBuffer - { - public Vec2 Item0; + public partial struct ChainId + { + public int index1; - public Vec2 Item1; + public ushort world0; - public Vec2 Item2; + public ushort revision; + } - public Vec2 Item3; + public partial struct RayResult + { + public ShapeId shapeId; - public Vec2 Item4; + public Vec2 point; - public Vec2 Item5; + public Vec2 normal; - public Vec2 Item6; + public float fraction; - public Vec2 Item7; + public bool hit; + } - public ref Vec2 this[int index] => ref AsSpan()[index]; + public partial struct WorldDef + { + public Vec2 gravity; - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - public System.Span AsSpan() => System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref Item0, 8); - } - } + public float restitutionThreshold; - public partial struct ShapeCastPairInput - { - public DistanceProxy proxyA; + public float contactPushoutVelocity; - public DistanceProxy proxyB; + public float hitEventThreshold; - public Transform transformA; + public float contactHertz; - public Transform transformB; + public float contactDampingRatio; - public Vec2 translationB; + public float jointHertz; - public float maxFraction; - } + public float jointDampingRatio; - public partial struct ShapeDef - { - public void* userData; + public float maximumLinearVelocity; - public float friction; + public bool enableSleep; - public float restitution; + public bool enableContinous; - public float density; + public int workerCount; - public Filter filter; + public delegate* unmanaged , int, int, void*, void*, void*> enqueueTask; - public uint customColor; + public delegate* unmanaged finishTask; - public byte isSensor; + public void* userTaskContext; - public byte enableSensorEvents; + public int internalValue; + } - public byte enableContactEvents; + public partial struct BodyDef + { + public BodyType type; - public byte enableHitEvents; + public Vec2 position; - public byte enablePreSolveEvents; + public Rot rotation; - public byte forceContactCreation; + public Vec2 linearVelocity; - public int internalValue; - } + public float angularVelocity; - public partial struct ShapeId - { - public int index1; + public float linearDamping; - public ushort world0; + public float angularDamping; - public ushort revision; - } + public float gravityScale; - public partial struct Simplex - { - public SimplexVertex v1; + public float sleepThreshold; - public SimplexVertex v2; + public void* userData; - public SimplexVertex v3; + public bool enableSleep; - public int count; - } + public bool isAwake; - public partial struct SimplexVertex - { - public Vec2 wA; + public bool fixedRotation; - public Vec2 wB; + public bool isBullet; - public Vec2 w; + public bool isEnabled; - public float a; + public bool automaticMass; - public int indexA; + public bool allowFastRotation; - public int indexB; - } + public int internalValue; + } - public partial struct SmoothSegment - { - public Vec2 ghost1; + public partial struct Filter + { + public uint categoryBits; - public Segment segment; + public uint maskBits; - public Vec2 ghost2; + public int groupIndex; + } - public int chainId; - } + public partial struct QueryFilter + { + public uint categoryBits; - public partial struct Sweep - { - public Vec2 localCenter; + public uint maskBits; + } - public Vec2 c1; + public partial struct ShapeDef + { + public void* userData; - public Vec2 c2; + public float friction; - public Rot q1; + public float restitution; - public Rot q2; - } + public float density; - public partial struct Timer - { - public ulong start_sec; + public Filter filter; - public ulong start_usec; - } + public uint customColor; - public partial struct TOIInput - { - public DistanceProxy proxyA; + public bool isSensor; - public DistanceProxy proxyB; + public bool enableSensorEvents; - public Sweep sweepA; + public bool enableContactEvents; - public Sweep sweepB; + public bool enableHitEvents; - public float tMax; - } + public bool enablePreSolveEvents; - public partial struct TOIOutput - { - public TOIState state; + public bool forceContactCreation; - public float t; - } + public int internalValue; + } - public partial struct Transform - { - public Vec2 p; + public partial struct ChainDef + { + public void* userData; - public Rot q; - } + public Vec2* points; - public partial struct TreeNode - { - public AABB aabb; + public int count; - public uint categoryBits; + public float friction; - public AnonymousRecord_collision_L608_C2 AnonymousRecord_collision_L608_C2_Field; + public float restitution; - public int child1; + public Filter filter; - public int child2; + public bool isLoop; - public int userData; + public int internalValue; + } - public short height; + public partial struct Profile + { + public float step; - public byte enlarged; + public float pairs; - public fixed byte pad[9]; + public float collide; - public ref int parent => ref AnonymousRecord_collision_L608_C2_Field.parent; + public float solve; - public ref int next => ref AnonymousRecord_collision_L608_C2_Field.next; + public float buildIslands; - [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)] - public partial struct AnonymousRecord_collision_L608_C2 - { - [System.Runtime.InteropServices.FieldOffset(0)] - public int parent; + public float solveConstraints; - [System.Runtime.InteropServices.FieldOffset(0)] - public int next; - } - } + public float prepareTasks; - public partial struct Vec2 - { - public float x; + public float solverTasks; - public float y; - } + public float prepareConstraints; - public partial struct Version - { - public int major; + public float integrateVelocities; - public int minor; + public float warmStart; - public int revision; - } + public float solveVelocities; - public partial struct WeldJointDef - { - public BodyId bodyIdA; + public float integratePositions; - public BodyId bodyIdB; + public float relaxVelocities; - public Vec2 localAnchorA; + public float applyRestitution; - public Vec2 localAnchorB; + public float storeImpulses; - public float referenceAngle; + public float finalizeBodies; - public float linearHertz; + public float splitIslands; - public float angularHertz; + public float sleepIslands; - public float linearDampingRatio; + public float hitEvents; - public float angularDampingRatio; + public float broadphase; - public byte collideConnected; + public float continuous; + } - public void* userData; + public partial struct Counters + { + public int staticBodyCount; - public int internalValue; - } + public int bodyCount; - public partial struct WheelJointDef - { - public BodyId bodyIdA; + public int shapeCount; - public BodyId bodyIdB; + public int contactCount; - public Vec2 localAnchorA; + public int jointCount; - public Vec2 localAnchorB; + public int islandCount; - public Vec2 localAxisA; + public int stackUsed; - public byte enableSpring; + public int staticTreeHeight; - public float hertz; + public int treeHeight; - public float dampingRatio; + public int byteCount; - public byte enableLimit; + public int taskCount; - public float lowerTranslation; + public InlineArrays.int_12 colorCounts; + } - public float upperTranslation; + public partial struct DistanceJointDef + { + public BodyId bodyIdA; - public byte enableMotor; + public BodyId bodyIdB; - public float maxMotorTorque; + public Vec2 localAnchorA; - public float motorSpeed; + public Vec2 localAnchorB; - public byte collideConnected; + public float length; - public void* userData; + public bool enableSpring; - public int internalValue; - } + public float hertz; - public partial struct WorldDef - { - public Vec2 gravity; + public float dampingRatio; - public float restitutionThreshold; + public bool enableLimit; - public float contactPushoutVelocity; + public float minLength; - public float hitEventThreshold; + public float maxLength; - public float contactHertz; + public bool enableMotor; - public float contactDampingRatio; + public float maxMotorForce; - public float jointHertz; + public float motorSpeed; - public float jointDampingRatio; + public bool collideConnected; - public float maximumLinearVelocity; + public void* userData; - public byte enableSleep; + public int internalValue; + } - public byte enableContinous; + public partial struct MotorJointDef + { + public BodyId bodyIdA; - public int workerCount; + public BodyId bodyIdB; - public System.IntPtr enqueueTask; // delegate* + public Vec2 linearOffset; - public System.IntPtr finishTask; // delegate* + public float angularOffset; - public void* userTaskContext; + public float maxForce; - public int internalValue; - } + public float maxTorque; - public partial struct WorldId - { - public ushort index1; + public float correctionFactor; - public ushort revision; - } + public bool collideConnected; - public enum BodyType : uint - { - staticBody = 0, - kinematicBody = 1, - dynamicBody = 2, - bodyTypeCount = 3 - } - - public enum HexColor : uint - { - colorAliceBlue = 15792383, - colorAntiqueWhite = 16444375, - colorAqua = 65535, - colorAquamarine = 8388564, - colorAzure = 15794175, - colorBeige = 16119260, - colorBisque = 16770244, - colorBlack = 0, - colorBlanchedAlmond = 16772045, - colorBlue = 255, - colorBlueViolet = 9055202, - colorBrown = 10824234, - colorBurlywood = 14596231, - colorCadetBlue = 6266528, - colorChartreuse = 8388352, - colorChocolate = 13789470, - colorCoral = 16744272, - colorCornflowerBlue = 6591981, - colorCornsilk = 16775388, - colorCrimson = 14423100, - colorCyan = 65535, - colorDarkBlue = 139, - colorDarkCyan = 35723, - colorDarkGoldenrod = 12092939, - colorDarkGray = 11119017, - colorDarkGreen = 25600, - colorDarkKhaki = 12433259, - colorDarkMagenta = 9109643, - colorDarkOliveGreen = 5597999, - colorDarkOrange = 16747520, - colorDarkOrchid = 10040012, - colorDarkRed = 9109504, - colorDarkSalmon = 15308410, - colorDarkSeaGreen = 9419919, - colorDarkSlateBlue = 4734347, - colorDarkSlateGray = 3100495, - colorDarkTurquoise = 52945, - colorDarkViolet = 9699539, - colorDeepPink = 16716947, - colorDeepSkyBlue = 49151, - colorDimGray = 6908265, - colorDodgerBlue = 2003199, - colorFirebrick = 11674146, - colorFloralWhite = 16775920, - colorForestGreen = 2263842, - colorFuchsia = 16711935, - colorGainsboro = 14474460, - colorGhostWhite = 16316671, - colorGold = 16766720, - colorGoldenrod = 14329120, - colorGray = 12500670, - colorGray1 = 1710618, - colorGray2 = 3355443, - colorGray3 = 5066061, - colorGray4 = 6710886, - colorGray5 = 8355711, - colorGray6 = 10066329, - colorGray7 = 11776947, - colorGray8 = 13421772, - colorGray9 = 15066597, - colorGreen = 65280, - colorGreenYellow = 11403055, - colorHoneydew = 15794160, - colorHotPink = 16738740, - colorIndianRed = 13458524, - colorIndigo = 4915330, - colorIvory = 16777200, - colorKhaki = 15787660, - colorLavender = 15132410, - colorLavenderBlush = 16773365, - colorLawnGreen = 8190976, - colorLemonChiffon = 16775885, - colorLightBlue = 11393254, - colorLightCoral = 15761536, - colorLightCyan = 14745599, - colorLightGoldenrod = 15654274, - colorLightGoldenrodYellow = 16448210, - colorLightGray = 13882323, - colorLightGreen = 9498256, - colorLightPink = 16758465, - colorLightSalmon = 16752762, - colorLightSeaGreen = 2142890, - colorLightSkyBlue = 8900346, - colorLightSlateBlue = 8679679, - colorLightSlateGray = 7833753, - colorLightSteelBlue = 11584734, - colorLightYellow = 16777184, - colorLime = 65280, - colorLimeGreen = 3329330, - colorLinen = 16445670, - colorMagenta = 16711935, - colorMaroon = 11546720, - colorMediumAquamarine = 6737322, - colorMediumBlue = 205, - colorMediumOrchid = 12211667, - colorMediumPurple = 9662683, - colorMediumSeaGreen = 3978097, - colorMediumSlateBlue = 8087790, - colorMediumSpringGreen = 64154, - colorMediumTurquoise = 4772300, - colorMediumVioletRed = 13047173, - colorMidnightBlue = 1644912, - colorMintCream = 16121850, - colorMistyRose = 16770273, - colorMoccasin = 16770229, - colorNavajoWhite = 16768685, - colorNavy = 128, - colorNavyBlue = 128, - colorOldLace = 16643558, - colorOlive = 8421376, - colorOliveDrab = 7048739, - colorOrange = 16753920, - colorOrangeRed = 16729344, - colorOrchid = 14315734, - colorPaleGoldenrod = 15657130, - colorPaleGreen = 10025880, - colorPaleTurquoise = 11529966, - colorPaleVioletRed = 14381203, - colorPapayaWhip = 16773077, - colorPeachPuff = 16767673, - colorPeru = 13468991, - colorPink = 16761035, - colorPlum = 14524637, - colorPowderBlue = 11591910, - colorPurple = 10494192, - colorRebeccaPurple = 6697881, - colorRed = 16711680, - colorRosyBrown = 12357519, - colorRoyalBlue = 4286945, - colorSaddleBrown = 9127187, - colorSalmon = 16416882, - colorSandyBrown = 16032864, - colorSeaGreen = 3050327, - colorSeashell = 16774638, - colorSienna = 10506797, - colorSilver = 12632256, - colorSkyBlue = 8900331, - colorSlateBlue = 6970061, - colorSlateGray = 7372944, - colorSnow = 16775930, - colorSpringGreen = 65407, - colorSteelBlue = 4620980, - colorTan = 13808780, - colorTeal = 32896, - colorThistle = 14204888, - colorTomato = 16737095, - colorTurquoise = 4251856, - colorViolet = 15631086, - colorVioletRed = 13639824, - colorWheat = 16113331, - colorWhite = 16777215, - colorWhiteSmoke = 16119285, - colorYellow = 16776960, - colorYellowGreen = 10145074, - colorBox2DRed = 14430514, - colorBox2DBlue = 3190463, - colorBox2DGreen = 9226532, - colorBox2DYellow = 16772748 - } - - public enum JointType : uint - { - distanceJoint = 0, - motorJoint = 1, - mouseJoint = 2, - prismaticJoint = 3, - revoluteJoint = 4, - weldJoint = 5, - wheelJoint = 6 - } - - public enum ShapeType : uint - { - circleShape = 0, - capsuleShape = 1, - segmentShape = 2, - polygonShape = 3, - smoothSegmentShape = 4, - shapeTypeCount = 5 - } + public void* userData; - public enum TOIState : uint - { - toiStateUnknown = 0, - toiStateFailed = 1, - toiStateOverlapped = 2, - toiStateHit = 3, - toiStateSeparated = 4 - } + public int internalValue; + } - public const BodyType staticBody = BodyType.staticBody; + public partial struct MouseJointDef + { + public BodyId bodyIdA; - public const BodyType kinematicBody = BodyType.kinematicBody; + public BodyId bodyIdB; - public const BodyType dynamicBody = BodyType.dynamicBody; + public Vec2 target; - public const BodyType bodyTypeCount = BodyType.bodyTypeCount; + public float hertz; - public const HexColor colorAliceBlue = HexColor.colorAliceBlue; + public float dampingRatio; - public const HexColor colorAntiqueWhite = HexColor.colorAntiqueWhite; + public float maxForce; - public const HexColor colorAqua = HexColor.colorAqua; + public bool collideConnected; - public const HexColor colorAquamarine = HexColor.colorAquamarine; + public void* userData; - public const HexColor colorAzure = HexColor.colorAzure; + public int internalValue; + } + + public partial struct PrismaticJointDef + { + public BodyId bodyIdA; + + public BodyId bodyIdB; + + public Vec2 localAnchorA; + + public Vec2 localAnchorB; + + public Vec2 localAxisA; + + public float referenceAngle; + + public bool enableSpring; + + public float hertz; + + public float dampingRatio; + + public bool enableLimit; + + public float lowerTranslation; + + public float upperTranslation; + + public bool enableMotor; + + public float maxMotorForce; + + public float motorSpeed; - public const HexColor colorBeige = HexColor.colorBeige; + public bool collideConnected; - public const HexColor colorBisque = HexColor.colorBisque; + public void* userData; - public const HexColor colorBlack = HexColor.colorBlack; + public int internalValue; + } + + public partial struct RevoluteJointDef + { + public BodyId bodyIdA; - public const HexColor colorBlanchedAlmond = HexColor.colorBlanchedAlmond; + public BodyId bodyIdB; - public const HexColor colorBlue = HexColor.colorBlue; + public Vec2 localAnchorA; - public const HexColor colorBlueViolet = HexColor.colorBlueViolet; + public Vec2 localAnchorB; - public const HexColor colorBrown = HexColor.colorBrown; + public float referenceAngle; - public const HexColor colorBurlywood = HexColor.colorBurlywood; + public bool enableSpring; - public const HexColor colorCadetBlue = HexColor.colorCadetBlue; + public float hertz; - public const HexColor colorChartreuse = HexColor.colorChartreuse; + public float dampingRatio; - public const HexColor colorChocolate = HexColor.colorChocolate; + public bool enableLimit; - public const HexColor colorCoral = HexColor.colorCoral; + public float lowerAngle; - public const HexColor colorCornflowerBlue = HexColor.colorCornflowerBlue; + public float upperAngle; - public const HexColor colorCornsilk = HexColor.colorCornsilk; + public bool enableMotor; - public const HexColor colorCrimson = HexColor.colorCrimson; + public float maxMotorTorque; - public const HexColor colorCyan = HexColor.colorCyan; + public float motorSpeed; - public const HexColor colorDarkBlue = HexColor.colorDarkBlue; + public float drawSize; - public const HexColor colorDarkCyan = HexColor.colorDarkCyan; + public bool collideConnected; - public const HexColor colorDarkGoldenrod = HexColor.colorDarkGoldenrod; + public void* userData; - public const HexColor colorDarkGray = HexColor.colorDarkGray; + public int internalValue; + } - public const HexColor colorDarkGreen = HexColor.colorDarkGreen; + public partial struct WeldJointDef + { + public BodyId bodyIdA; - public const HexColor colorDarkKhaki = HexColor.colorDarkKhaki; + public BodyId bodyIdB; - public const HexColor colorDarkMagenta = HexColor.colorDarkMagenta; + public Vec2 localAnchorA; - public const HexColor colorDarkOliveGreen = HexColor.colorDarkOliveGreen; + public Vec2 localAnchorB; - public const HexColor colorDarkOrange = HexColor.colorDarkOrange; + public float referenceAngle; - public const HexColor colorDarkOrchid = HexColor.colorDarkOrchid; + public float linearHertz; - public const HexColor colorDarkRed = HexColor.colorDarkRed; + public float angularHertz; - public const HexColor colorDarkSalmon = HexColor.colorDarkSalmon; + public float linearDampingRatio; - public const HexColor colorDarkSeaGreen = HexColor.colorDarkSeaGreen; + public float angularDampingRatio; - public const HexColor colorDarkSlateBlue = HexColor.colorDarkSlateBlue; + public bool collideConnected; - public const HexColor colorDarkSlateGray = HexColor.colorDarkSlateGray; + public void* userData; - public const HexColor colorDarkTurquoise = HexColor.colorDarkTurquoise; + public int internalValue; + } - public const HexColor colorDarkViolet = HexColor.colorDarkViolet; + public partial struct WheelJointDef + { + public BodyId bodyIdA; - public const HexColor colorDeepPink = HexColor.colorDeepPink; + public BodyId bodyIdB; - public const HexColor colorDeepSkyBlue = HexColor.colorDeepSkyBlue; + public Vec2 localAnchorA; - public const HexColor colorDimGray = HexColor.colorDimGray; + public Vec2 localAnchorB; - public const HexColor colorDodgerBlue = HexColor.colorDodgerBlue; + public Vec2 localAxisA; - public const HexColor colorFirebrick = HexColor.colorFirebrick; + public bool enableSpring; - public const HexColor colorFloralWhite = HexColor.colorFloralWhite; + public float hertz; - public const HexColor colorForestGreen = HexColor.colorForestGreen; + public float dampingRatio; - public const HexColor colorFuchsia = HexColor.colorFuchsia; + public bool enableLimit; - public const HexColor colorGainsboro = HexColor.colorGainsboro; + public float lowerTranslation; - public const HexColor colorGhostWhite = HexColor.colorGhostWhite; + public float upperTranslation; - public const HexColor colorGold = HexColor.colorGold; + public bool enableMotor; - public const HexColor colorGoldenrod = HexColor.colorGoldenrod; + public float maxMotorTorque; - public const HexColor colorGray = HexColor.colorGray; + public float motorSpeed; - public const HexColor colorGray1 = HexColor.colorGray1; + public bool collideConnected; - public const HexColor colorGray2 = HexColor.colorGray2; + public void* userData; - public const HexColor colorGray3 = HexColor.colorGray3; + public int internalValue; + } - public const HexColor colorGray4 = HexColor.colorGray4; + public partial struct SensorBeginTouchEvent + { + public ShapeId sensorShapeId; - public const HexColor colorGray5 = HexColor.colorGray5; + public ShapeId visitorShapeId; + } - public const HexColor colorGray6 = HexColor.colorGray6; + public partial struct SensorEndTouchEvent + { + public ShapeId sensorShapeId; - public const HexColor colorGray7 = HexColor.colorGray7; + public ShapeId visitorShapeId; + } - public const HexColor colorGray8 = HexColor.colorGray8; + public partial struct SensorEvents + { + public SensorBeginTouchEvent* beginEvents; - public const HexColor colorGray9 = HexColor.colorGray9; + public SensorEndTouchEvent* endEvents; - public const HexColor colorGreen = HexColor.colorGreen; + public int beginCount; - public const HexColor colorGreenYellow = HexColor.colorGreenYellow; + public int endCount; + } - public const HexColor colorHoneydew = HexColor.colorHoneydew; + public partial struct ContactBeginTouchEvent + { + public ShapeId shapeIdA; - public const HexColor colorHotPink = HexColor.colorHotPink; + public ShapeId shapeIdB; + } - public const HexColor colorIndianRed = HexColor.colorIndianRed; + public partial struct ContactEndTouchEvent + { + public ShapeId shapeIdA; - public const HexColor colorIndigo = HexColor.colorIndigo; + public ShapeId shapeIdB; + } - public const HexColor colorIvory = HexColor.colorIvory; + public partial struct ContactHitEvent + { + public ShapeId shapeIdA; - public const HexColor colorKhaki = HexColor.colorKhaki; + public ShapeId shapeIdB; - public const HexColor colorLavender = HexColor.colorLavender; + public Vec2 point; - public const HexColor colorLavenderBlush = HexColor.colorLavenderBlush; + public Vec2 normal; - public const HexColor colorLawnGreen = HexColor.colorLawnGreen; + public float approachSpeed; + } - public const HexColor colorLemonChiffon = HexColor.colorLemonChiffon; + public partial struct ContactEvents + { + public ContactBeginTouchEvent* beginEvents; - public const HexColor colorLightBlue = HexColor.colorLightBlue; + public ContactEndTouchEvent* endEvents; - public const HexColor colorLightCoral = HexColor.colorLightCoral; + public ContactHitEvent* hitEvents; - public const HexColor colorLightCyan = HexColor.colorLightCyan; + public int beginCount; - public const HexColor colorLightGoldenrod = HexColor.colorLightGoldenrod; + public int endCount; - public const HexColor colorLightGoldenrodYellow = HexColor.colorLightGoldenrodYellow; + public int hitCount; + } - public const HexColor colorLightGray = HexColor.colorLightGray; + public partial struct BodyMoveEvent + { + public Transform transform; - public const HexColor colorLightGreen = HexColor.colorLightGreen; + public BodyId bodyId; - public const HexColor colorLightPink = HexColor.colorLightPink; + public void* userData; - public const HexColor colorLightSalmon = HexColor.colorLightSalmon; + public bool fellAsleep; + } - public const HexColor colorLightSeaGreen = HexColor.colorLightSeaGreen; + public partial struct BodyEvents + { + public BodyMoveEvent* moveEvents; - public const HexColor colorLightSkyBlue = HexColor.colorLightSkyBlue; + public int moveCount; + } - public const HexColor colorLightSlateBlue = HexColor.colorLightSlateBlue; + public partial struct ContactData + { + public ShapeId shapeIdA; - public const HexColor colorLightSlateGray = HexColor.colorLightSlateGray; + public ShapeId shapeIdB; - public const HexColor colorLightSteelBlue = HexColor.colorLightSteelBlue; + public Manifold manifold; + } - public const HexColor colorLightYellow = HexColor.colorLightYellow; + public partial struct DebugDraw + { + public delegate* unmanaged DrawPolygon; - public const HexColor colorLime = HexColor.colorLime; + public delegate* unmanaged DrawSolidPolygon; - public const HexColor colorLimeGreen = HexColor.colorLimeGreen; + public delegate* unmanaged DrawCircle; - public const HexColor colorLinen = HexColor.colorLinen; + public delegate* unmanaged DrawSolidCircle; - public const HexColor colorMagenta = HexColor.colorMagenta; + public delegate* unmanaged DrawCapsule; - public const HexColor colorMaroon = HexColor.colorMaroon; + public delegate* unmanaged DrawSolidCapsule; - public const HexColor colorMediumAquamarine = HexColor.colorMediumAquamarine; + public delegate* unmanaged DrawSegment; - public const HexColor colorMediumBlue = HexColor.colorMediumBlue; + public delegate* unmanaged DrawTransform; - public const HexColor colorMediumOrchid = HexColor.colorMediumOrchid; + public delegate* unmanaged DrawPoint; - public const HexColor colorMediumPurple = HexColor.colorMediumPurple; + public delegate* unmanaged DrawString; - public const HexColor colorMediumSeaGreen = HexColor.colorMediumSeaGreen; + public AABB drawingBounds; - public const HexColor colorMediumSlateBlue = HexColor.colorMediumSlateBlue; + public bool useDrawingBounds; - public const HexColor colorMediumSpringGreen = HexColor.colorMediumSpringGreen; + public bool drawShapes; - public const HexColor colorMediumTurquoise = HexColor.colorMediumTurquoise; + public bool drawJoints; - public const HexColor colorMediumVioletRed = HexColor.colorMediumVioletRed; + public bool drawJointExtras; - public const HexColor colorMidnightBlue = HexColor.colorMidnightBlue; + public bool drawAABBs; - public const HexColor colorMintCream = HexColor.colorMintCream; + public bool drawMass; - public const HexColor colorMistyRose = HexColor.colorMistyRose; + public bool drawContacts; - public const HexColor colorMoccasin = HexColor.colorMoccasin; + public bool drawGraphColors; - public const HexColor colorNavajoWhite = HexColor.colorNavajoWhite; + public bool drawContactNormals; - public const HexColor colorNavy = HexColor.colorNavy; + public bool drawContactImpulses; - public const HexColor colorNavyBlue = HexColor.colorNavyBlue; + public bool drawFrictionImpulses; - public const HexColor colorOldLace = HexColor.colorOldLace; + public void* context; + } - public const HexColor colorOlive = HexColor.colorOlive; + public partial struct InlineArrays + { + [InlineArray(8)] + public partial struct Vec2_8 + { + public Vec2 Item0; + } + } - public const HexColor colorOliveDrab = HexColor.colorOliveDrab; + public partial struct InlineArrays + { + [InlineArray(3)] + public partial struct byte_3 + { + public byte Item0; + } + } - public const HexColor colorOrange = HexColor.colorOrange; + public partial struct InlineArrays + { + [InlineArray(2)] + public partial struct ManifoldPoint_2 + { + public ManifoldPoint Item0; + } + } - public const HexColor colorOrangeRed = HexColor.colorOrangeRed; + public partial struct InlineArrays + { + [InlineArray(9)] + public partial struct byte_9 + { + public byte Item0; + } + } - public const HexColor colorOrchid = HexColor.colorOrchid; + public partial struct InlineArrays + { + [InlineArray(12)] + public partial struct int_12 + { + public int Item0; + } + } - public const HexColor colorPaleGoldenrod = HexColor.colorPaleGoldenrod; + public const int defaultCategoryBits = 1; - public const HexColor colorPaleGreen = HexColor.colorPaleGreen; + public const uint defaultMaskBits = 4294967295; - public const HexColor colorPaleTurquoise = HexColor.colorPaleTurquoise; + public const int maxPolygonVertices = 8; - public const HexColor colorPaleVioletRed = HexColor.colorPaleVioletRed; + public const float pi = 3.1415927f; - public const HexColor colorPapayaWhip = HexColor.colorPapayaWhip; + public partial struct Version : IEquatable + { + public bool Equals(Version other) + { + fixed (Version* __self = &this) + { + return new Span(__self, sizeof(Version)).SequenceEqual(new Span(&other, sizeof(Version))); + } + } - public const HexColor colorPeachPuff = HexColor.colorPeachPuff; + public override bool Equals(object? obj) + { + return obj is Version other && Equals(other); + } - public const HexColor colorPeru = HexColor.colorPeru; + public static bool operator ==(Version left, Version right) + { + return left.Equals(right); + } - public const HexColor colorPink = HexColor.colorPink; + public static bool operator !=(Version left, Version right) + { + return !(left == right); + } - public const HexColor colorPlum = HexColor.colorPlum; + public override int GetHashCode() + { + fixed (Version* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Version))); + return hash.ToHashCode(); + } + } + } - public const HexColor colorPowderBlue = HexColor.colorPowderBlue; + public partial struct Timer : IEquatable + { + public bool Equals(Timer other) + { + fixed (Timer* __self = &this) + { + return new Span(__self, sizeof(Timer)).SequenceEqual(new Span(&other, sizeof(Timer))); + } + } - public const HexColor colorPurple = HexColor.colorPurple; + public override bool Equals(object? obj) + { + return obj is Timer other && Equals(other); + } - public const HexColor colorRebeccaPurple = HexColor.colorRebeccaPurple; + public static bool operator ==(Timer left, Timer right) + { + return left.Equals(right); + } - public const HexColor colorRed = HexColor.colorRed; + public static bool operator !=(Timer left, Timer right) + { + return !(left == right); + } - public const HexColor colorRosyBrown = HexColor.colorRosyBrown; + public override int GetHashCode() + { + fixed (Timer* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Timer))); + return hash.ToHashCode(); + } + } + } - public const HexColor colorRoyalBlue = HexColor.colorRoyalBlue; + public partial struct Vec2 : IEquatable + { + public bool Equals(Vec2 other) + { + fixed (Vec2* __self = &this) + { + return new Span(__self, sizeof(Vec2)).SequenceEqual(new Span(&other, sizeof(Vec2))); + } + } - public const HexColor colorSaddleBrown = HexColor.colorSaddleBrown; + public override bool Equals(object? obj) + { + return obj is Vec2 other && Equals(other); + } - public const HexColor colorSalmon = HexColor.colorSalmon; + public static bool operator ==(Vec2 left, Vec2 right) + { + return left.Equals(right); + } - public const HexColor colorSandyBrown = HexColor.colorSandyBrown; + public static bool operator !=(Vec2 left, Vec2 right) + { + return !(left == right); + } - public const HexColor colorSeaGreen = HexColor.colorSeaGreen; + public override int GetHashCode() + { + fixed (Vec2* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Vec2))); + return hash.ToHashCode(); + } + } + } - public const HexColor colorSeashell = HexColor.colorSeashell; + public partial struct Rot : IEquatable + { + public bool Equals(Rot other) + { + fixed (Rot* __self = &this) + { + return new Span(__self, sizeof(Rot)).SequenceEqual(new Span(&other, sizeof(Rot))); + } + } - public const HexColor colorSienna = HexColor.colorSienna; + public override bool Equals(object? obj) + { + return obj is Rot other && Equals(other); + } - public const HexColor colorSilver = HexColor.colorSilver; + public static bool operator ==(Rot left, Rot right) + { + return left.Equals(right); + } - public const HexColor colorSkyBlue = HexColor.colorSkyBlue; + public static bool operator !=(Rot left, Rot right) + { + return !(left == right); + } - public const HexColor colorSlateBlue = HexColor.colorSlateBlue; + public override int GetHashCode() + { + fixed (Rot* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Rot))); + return hash.ToHashCode(); + } + } + } - public const HexColor colorSlateGray = HexColor.colorSlateGray; + public partial struct Transform : IEquatable + { + public bool Equals(Transform other) + { + fixed (Transform* __self = &this) + { + return new Span(__self, sizeof(Transform)).SequenceEqual(new Span(&other, sizeof(Transform))); + } + } - public const HexColor colorSnow = HexColor.colorSnow; + public override bool Equals(object? obj) + { + return obj is Transform other && Equals(other); + } - public const HexColor colorSpringGreen = HexColor.colorSpringGreen; + public static bool operator ==(Transform left, Transform right) + { + return left.Equals(right); + } - public const HexColor colorSteelBlue = HexColor.colorSteelBlue; + public static bool operator !=(Transform left, Transform right) + { + return !(left == right); + } - public const HexColor colorTan = HexColor.colorTan; + public override int GetHashCode() + { + fixed (Transform* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Transform))); + return hash.ToHashCode(); + } + } + } - public const HexColor colorTeal = HexColor.colorTeal; + public partial struct Mat22 : IEquatable + { + public bool Equals(Mat22 other) + { + fixed (Mat22* __self = &this) + { + return new Span(__self, sizeof(Mat22)).SequenceEqual(new Span(&other, sizeof(Mat22))); + } + } - public const HexColor colorThistle = HexColor.colorThistle; + public override bool Equals(object? obj) + { + return obj is Mat22 other && Equals(other); + } - public const HexColor colorTomato = HexColor.colorTomato; + public static bool operator ==(Mat22 left, Mat22 right) + { + return left.Equals(right); + } - public const HexColor colorTurquoise = HexColor.colorTurquoise; + public static bool operator !=(Mat22 left, Mat22 right) + { + return !(left == right); + } - public const HexColor colorViolet = HexColor.colorViolet; + public override int GetHashCode() + { + fixed (Mat22* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Mat22))); + return hash.ToHashCode(); + } + } + } - public const HexColor colorVioletRed = HexColor.colorVioletRed; + public partial struct AABB : IEquatable + { + public bool Equals(AABB other) + { + fixed (AABB* __self = &this) + { + return new Span(__self, sizeof(AABB)).SequenceEqual(new Span(&other, sizeof(AABB))); + } + } - public const HexColor colorWheat = HexColor.colorWheat; + public override bool Equals(object? obj) + { + return obj is AABB other && Equals(other); + } - public const HexColor colorWhite = HexColor.colorWhite; + public static bool operator ==(AABB left, AABB right) + { + return left.Equals(right); + } - public const HexColor colorWhiteSmoke = HexColor.colorWhiteSmoke; + public static bool operator !=(AABB left, AABB right) + { + return !(left == right); + } - public const HexColor colorYellow = HexColor.colorYellow; + public override int GetHashCode() + { + fixed (AABB* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(AABB))); + return hash.ToHashCode(); + } + } + } - public const HexColor colorYellowGreen = HexColor.colorYellowGreen; + public partial struct Circle : IEquatable + { + public bool Equals(Circle other) + { + fixed (Circle* __self = &this) + { + return new Span(__self, sizeof(Circle)).SequenceEqual(new Span(&other, sizeof(Circle))); + } + } - public const HexColor colorBox2DRed = HexColor.colorBox2DRed; + public override bool Equals(object? obj) + { + return obj is Circle other && Equals(other); + } - public const HexColor colorBox2DBlue = HexColor.colorBox2DBlue; + public static bool operator ==(Circle left, Circle right) + { + return left.Equals(right); + } - public const HexColor colorBox2DGreen = HexColor.colorBox2DGreen; + public static bool operator !=(Circle left, Circle right) + { + return !(left == right); + } - public const HexColor colorBox2DYellow = HexColor.colorBox2DYellow; + public override int GetHashCode() + { + fixed (Circle* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Circle))); + return hash.ToHashCode(); + } + } + } - public const JointType distanceJoint = JointType.distanceJoint; + public partial struct Capsule : IEquatable + { + public bool Equals(Capsule other) + { + fixed (Capsule* __self = &this) + { + return new Span(__self, sizeof(Capsule)).SequenceEqual(new Span(&other, sizeof(Capsule))); + } + } - public const JointType motorJoint = JointType.motorJoint; + public override bool Equals(object? obj) + { + return obj is Capsule other && Equals(other); + } - public const JointType mouseJoint = JointType.mouseJoint; + public static bool operator ==(Capsule left, Capsule right) + { + return left.Equals(right); + } - public const JointType prismaticJoint = JointType.prismaticJoint; + public static bool operator !=(Capsule left, Capsule right) + { + return !(left == right); + } - public const JointType revoluteJoint = JointType.revoluteJoint; + public override int GetHashCode() + { + fixed (Capsule* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Capsule))); + return hash.ToHashCode(); + } + } + } - public const JointType weldJoint = JointType.weldJoint; + public partial struct DistanceCache : IEquatable + { + public bool Equals(DistanceCache other) + { + fixed (DistanceCache* __self = &this) + { + return new Span(__self, sizeof(DistanceCache)).SequenceEqual(new Span(&other, sizeof(DistanceCache))); + } + } - public const JointType wheelJoint = JointType.wheelJoint; + public override bool Equals(object? obj) + { + return obj is DistanceCache other && Equals(other); + } - public const ShapeType circleShape = ShapeType.circleShape; + public static bool operator ==(DistanceCache left, DistanceCache right) + { + return left.Equals(right); + } - public const ShapeType capsuleShape = ShapeType.capsuleShape; + public static bool operator !=(DistanceCache left, DistanceCache right) + { + return !(left == right); + } - public const ShapeType segmentShape = ShapeType.segmentShape; + public override int GetHashCode() + { + fixed (DistanceCache* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(DistanceCache))); + return hash.ToHashCode(); + } + } + } - public const ShapeType polygonShape = ShapeType.polygonShape; + public partial struct Polygon : IEquatable + { + public bool Equals(Polygon other) + { + fixed (Polygon* __self = &this) + { + return new Span(__self, sizeof(Polygon)).SequenceEqual(new Span(&other, sizeof(Polygon))); + } + } - public const ShapeType smoothSegmentShape = ShapeType.smoothSegmentShape; + public override bool Equals(object? obj) + { + return obj is Polygon other && Equals(other); + } - public const ShapeType shapeTypeCount = ShapeType.shapeTypeCount; + public static bool operator ==(Polygon left, Polygon right) + { + return left.Equals(right); + } - public const TOIState toiStateUnknown = TOIState.toiStateUnknown; + public static bool operator !=(Polygon left, Polygon right) + { + return !(left == right); + } - public const TOIState toiStateFailed = TOIState.toiStateFailed; + public override int GetHashCode() + { + fixed (Polygon* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Polygon))); + return hash.ToHashCode(); + } + } + } - public const TOIState toiStateOverlapped = TOIState.toiStateOverlapped; + public partial struct Segment : IEquatable + { + public bool Equals(Segment other) + { + fixed (Segment* __self = &this) + { + return new Span(__self, sizeof(Segment)).SequenceEqual(new Span(&other, sizeof(Segment))); + } + } - public const TOIState toiStateHit = TOIState.toiStateHit; + public override bool Equals(object? obj) + { + return obj is Segment other && Equals(other); + } - public const TOIState toiStateSeparated = TOIState.toiStateSeparated; + public static bool operator ==(Segment left, Segment right) + { + return left.Equals(right); + } - public const int defaultCategoryBits = 1; + public static bool operator !=(Segment left, Segment right) + { + return !(left == right); + } - public const uint defaultMaskBits = 4294967295; + public override int GetHashCode() + { + fixed (Segment* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Segment))); + return hash.ToHashCode(); + } + } + } - public const int maxPolygonVertices = 8; + public partial struct SmoothSegment : IEquatable + { + public bool Equals(SmoothSegment other) + { + fixed (SmoothSegment* __self = &this) + { + return new Span(__self, sizeof(SmoothSegment)).SequenceEqual(new Span(&other, sizeof(SmoothSegment))); + } + } - public const float pi = 3.1415927f; + public override bool Equals(object? obj) + { + return obj is SmoothSegment other && Equals(other); + } - public partial class BindgenInternal - { - public const string DllImportPath = "box2d"; + public static bool operator ==(SmoothSegment left, SmoothSegment right) + { + return left.Equals(right); + } - static BindgenInternal() - { - DllFilePaths = new System.Collections.Generic.List - { - "box2d", - "libbox2d", - "runtimes/linux-x64/native/libbox2d", - "runtimes/linux-arm64/native/libbox2d", - "runtimes/osx-x64/native/libbox2d", - "runtimes/osx-arm64/native/libbox2d", - "runtimes/win-x64/native/box2d", - "runtimes/win-arm64/native/box2d" - }; - } + public static bool operator !=(SmoothSegment left, SmoothSegment right) + { + return !(left == right); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "SYSLIB1054")] - public partial class BindgenInternal - { - public static readonly System.Collections.Generic.List DllFilePaths; + public override int GetHashCode() + { + fixed (SmoothSegment* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(SmoothSegment))); + return hash.ToHashCode(); + } + } + } - public static System.IntPtr LibraryHandle = System.IntPtr.Zero; + public partial struct Hull : IEquatable + { + public bool Equals(Hull other) + { + fixed (Hull* __self = &this) + { + return new Span(__self, sizeof(Hull)).SequenceEqual(new Span(&other, sizeof(Hull))); + } + } - public static readonly object Lock = new object (); + public override bool Equals(object? obj) + { + return obj is Hull other && Equals(other); + } - public static bool IsLinux => System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux); + public static bool operator ==(Hull left, Hull right) + { + return left.Equals(right); + } - public static bool IsOsx => System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX); + public static bool operator !=(Hull left, Hull right) + { + return !(left == right); + } - public static bool IsWindows => System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows); + public override int GetHashCode() + { + fixed (Hull* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Hull))); + return hash.ToHashCode(); + } + } + } - [System.Runtime.InteropServices.DllImport("libc", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "dlopen")] - public static extern System.IntPtr LoadLibraryLinux(string? path, int flags); + public partial struct RayCastInput : IEquatable + { + public bool Equals(RayCastInput other) + { + fixed (RayCastInput* __self = &this) + { + return new Span(__self, sizeof(RayCastInput)).SequenceEqual(new Span(&other, sizeof(RayCastInput))); + } + } - [System.Runtime.InteropServices.DllImport("libdl", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "dlopen")] - public static extern System.IntPtr LoadLibraryOsx(string? path, int flags); + public override bool Equals(object? obj) + { + return obj is RayCastInput other && Equals(other); + } - [System.Runtime.InteropServices.DllImport("kernel32", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "LoadLibrary")] - public static extern System.IntPtr LoadLibraryWindows(string path); + public static bool operator ==(RayCastInput left, RayCastInput right) + { + return left.Equals(right); + } - [System.Runtime.InteropServices.DllImport("kernel32", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "GetModuleHandle")] - public static extern System.IntPtr GetModuleHandle(string? name); + public static bool operator !=(RayCastInput left, RayCastInput right) + { + return !(left == right); + } - [System.Runtime.InteropServices.DllImport("libc", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "dlsym")] - public static extern System.IntPtr GetExportLinux(System.IntPtr handle, string name); + public override int GetHashCode() + { + fixed (RayCastInput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(RayCastInput))); + return hash.ToHashCode(); + } + } + } - [System.Runtime.InteropServices.DllImport("libdl", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "dlsym")] - public static extern System.IntPtr GetExportOsx(System.IntPtr handle, string name); + public partial struct ShapeCastInput : IEquatable + { + public bool Equals(ShapeCastInput other) + { + fixed (ShapeCastInput* __self = &this) + { + return new Span(__self, sizeof(ShapeCastInput)).SequenceEqual(new Span(&other, sizeof(ShapeCastInput))); + } + } - [System.Runtime.InteropServices.DllImport("kernel32", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "GetProcAddress")] - public static extern System.IntPtr GetExportWindows(System.IntPtr handle, string name); + public override bool Equals(object? obj) + { + return obj is ShapeCastInput other && Equals(other); + } - [System.Runtime.InteropServices.DllImport("libc", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "dlerror")] - public static extern byte* GetLastErrorLinux(); + public static bool operator ==(ShapeCastInput left, ShapeCastInput right) + { + return left.Equals(right); + } - [System.Runtime.InteropServices.DllImport("libdl", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "dlerror")] - public static extern byte* GetLastErrorOsx(); + public static bool operator !=(ShapeCastInput left, ShapeCastInput right) + { + return !(left == right); + } - [System.Runtime.InteropServices.DllImport("kernel32", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall, CharSet = System.Runtime.InteropServices.CharSet.Ansi, EntryPoint = "GetLastError")] - public static extern int GetLastErrorWindows(); + public override int GetHashCode() + { + fixed (ShapeCastInput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ShapeCastInput))); + return hash.ToHashCode(); + } + } + } - public static bool TryLoad(string path, out System.IntPtr handle) - { -#if NETCOREAPP3_0_OR_GREATER - return System.Runtime.InteropServices.NativeLibrary.TryLoad(path, System.Reflection.Assembly.GetExecutingAssembly(), null, out handle); -#else - handle = System.IntPtr.Zero; - if (IsLinux) - handle = LoadLibraryLinux(path, 0x101); - else if (IsOsx) - handle = LoadLibraryOsx(path, 0x101); - else if (IsWindows) - handle = LoadLibraryWindows(path); - return handle != System.IntPtr.Zero; -#endif - } + public partial struct CastOutput : IEquatable + { + public bool Equals(CastOutput other) + { + fixed (CastOutput* __self = &this) + { + return new Span(__self, sizeof(CastOutput)).SequenceEqual(new Span(&other, sizeof(CastOutput))); + } + } - public static System.IntPtr GetExport(string symbol) - { -#if NETCOREAPP3_0_OR_GREATER - return System.Runtime.InteropServices.NativeLibrary.GetExport(LibraryHandle, symbol); -#else - if (IsLinux) - { - GetLastErrorLinux(); - System.IntPtr handle = GetExportLinux(LibraryHandle, symbol); - if (handle != System.IntPtr.Zero) - return handle; - byte* errorResult = GetLastErrorLinux(); - if (errorResult == null) - return handle; - string errorMessage = System.Runtime.InteropServices.Marshal.PtrToStringAnsi((System.IntPtr)errorResult)!; - throw new System.EntryPointNotFoundException(errorMessage); - } - - if (IsOsx) - { - GetLastErrorOsx(); - System.IntPtr handle = GetExportOsx(LibraryHandle, symbol); - if (handle != System.IntPtr.Zero) - return handle; - byte* errorResult = GetLastErrorOsx(); - if (errorResult == null) - return handle; - string errorMessage = System.Runtime.InteropServices.Marshal.PtrToStringAnsi((System.IntPtr)errorResult)!; - throw new System.EntryPointNotFoundException(errorMessage); - } - - if (IsWindows) - { - System.IntPtr handle = GetExportWindows(LibraryHandle, symbol); - if (handle != System.IntPtr.Zero) - return handle; - int errorCode = GetLastErrorWindows(); - string errorMessage = new System.ComponentModel.Win32Exception(errorCode).Message; - throw new System.EntryPointNotFoundException($"{errorMessage} \"{symbol}\" not found."); - } - - throw new System.InvalidOperationException($"Failed to export symbol \"{symbol}\" from dll. Platform is not linux, mac, or windows."); -#endif - } + public override bool Equals(object? obj) + { + return obj is CastOutput other && Equals(other); + } - public static void ResolveLibrary() - { - System.IntPtr handle = default; -#if NETCOREAPP3_0_OR_GREATER - foreach (string dllFilePath in DllFilePaths) - { - if (TryLoad(dllFilePath, out handle)) - goto Return; - } -#else - string fileExtension; - if (IsLinux) - fileExtension = ".so"; - else if (IsOsx) - fileExtension = ".dylib"; - else if (IsWindows) - fileExtension = ".dll"; - else - throw new System.InvalidOperationException("Can't determine native library file extension for the current system."); - foreach (string dllFilePath in DllFilePaths) - { - string fileName = System.IO.Path.GetFileName(dllFilePath); - string parentDir = $"{dllFilePath}/.."; - string exeDir = System.IO.Path.GetFullPath(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)!); - string searchDir = System.IO.Path.IsPathRooted(dllFilePath) ? System.IO.Path.GetFullPath(parentDir) + "/" : System.IO.Path.GetFullPath($"{exeDir}/{parentDir}") + "/"; - if (TryLoad($"{searchDir}{fileName}", out handle)) - goto Return; - if (TryLoad($"{searchDir}{fileName}{fileExtension}", out handle)) - goto Return; - if (TryLoad($"{searchDir}lib{fileName}", out handle)) - goto Return; - if (TryLoad($"{searchDir}lib{fileName}{fileExtension}", out handle)) - goto Return; - if (!fileName.StartsWith("lib") || fileName == "lib") - continue; - string unprefixed = fileName.Substring(4); - if (TryLoad($"{searchDir}{unprefixed}", out handle)) - goto Return; - if (TryLoad($"{searchDir}{unprefixed}{fileExtension}", out handle)) - goto Return; - } - -#endif -#if NET7_0_OR_GREATER - handle = System.Runtime.InteropServices.NativeLibrary.GetMainProgramHandle(); -#else - if (IsLinux) - handle = LoadLibraryLinux(null, 0x101); - else if (IsOsx) - handle = LoadLibraryOsx(null, 0x101); - else if (IsWindows) - handle = GetModuleHandle(null); -#endif - Return: - LibraryHandle = handle; - } + public static bool operator ==(CastOutput left, CastOutput right) + { + return left.Equals(right); + } - public static void* LoadDllSymbol(string variableSymbol, out void* field) - { - lock (Lock) - { - if (LibraryHandle == System.IntPtr.Zero) - ResolveLibrary(); - return field = (void*)GetExport(variableSymbol); - } - } + public static bool operator !=(CastOutput left, CastOutput right) + { + return !(left == right); } + + public override int GetHashCode() + { + fixed (CastOutput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(CastOutput))); + return hash.ToHashCode(); + } + } } -} -#pragma warning restore CS9084 -#nullable disable + + public partial struct MassData : IEquatable + { + public bool Equals(MassData other) + { + fixed (MassData* __self = &this) + { + return new Span(__self, sizeof(MassData)).SequenceEqual(new Span(&other, sizeof(MassData))); + } + } + + public override bool Equals(object? obj) + { + return obj is MassData other && Equals(other); + } + + public static bool operator ==(MassData left, MassData right) + { + return left.Equals(right); + } + + public static bool operator !=(MassData left, MassData right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (MassData* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(MassData))); + return hash.ToHashCode(); + } + } + } + + public partial struct SegmentDistanceResult : IEquatable + { + public bool Equals(SegmentDistanceResult other) + { + fixed (SegmentDistanceResult* __self = &this) + { + return new Span(__self, sizeof(SegmentDistanceResult)).SequenceEqual(new Span(&other, sizeof(SegmentDistanceResult))); + } + } + + public override bool Equals(object? obj) + { + return obj is SegmentDistanceResult other && Equals(other); + } + + public static bool operator ==(SegmentDistanceResult left, SegmentDistanceResult right) + { + return left.Equals(right); + } + + public static bool operator !=(SegmentDistanceResult left, SegmentDistanceResult right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (SegmentDistanceResult* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(SegmentDistanceResult))); + return hash.ToHashCode(); + } + } + } + + public partial struct DistanceProxy : IEquatable + { + public bool Equals(DistanceProxy other) + { + fixed (DistanceProxy* __self = &this) + { + return new Span(__self, sizeof(DistanceProxy)).SequenceEqual(new Span(&other, sizeof(DistanceProxy))); + } + } + + public override bool Equals(object? obj) + { + return obj is DistanceProxy other && Equals(other); + } + + public static bool operator ==(DistanceProxy left, DistanceProxy right) + { + return left.Equals(right); + } + + public static bool operator !=(DistanceProxy left, DistanceProxy right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (DistanceProxy* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(DistanceProxy))); + return hash.ToHashCode(); + } + } + } + + public partial struct DistanceInput : IEquatable + { + public bool Equals(DistanceInput other) + { + fixed (DistanceInput* __self = &this) + { + return new Span(__self, sizeof(DistanceInput)).SequenceEqual(new Span(&other, sizeof(DistanceInput))); + } + } + + public override bool Equals(object? obj) + { + return obj is DistanceInput other && Equals(other); + } + + public static bool operator ==(DistanceInput left, DistanceInput right) + { + return left.Equals(right); + } + + public static bool operator !=(DistanceInput left, DistanceInput right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (DistanceInput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(DistanceInput))); + return hash.ToHashCode(); + } + } + } + + public partial struct DistanceOutput : IEquatable + { + public bool Equals(DistanceOutput other) + { + fixed (DistanceOutput* __self = &this) + { + return new Span(__self, sizeof(DistanceOutput)).SequenceEqual(new Span(&other, sizeof(DistanceOutput))); + } + } + + public override bool Equals(object? obj) + { + return obj is DistanceOutput other && Equals(other); + } + + public static bool operator ==(DistanceOutput left, DistanceOutput right) + { + return left.Equals(right); + } + + public static bool operator !=(DistanceOutput left, DistanceOutput right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (DistanceOutput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(DistanceOutput))); + return hash.ToHashCode(); + } + } + } + + public partial struct SimplexVertex : IEquatable + { + public bool Equals(SimplexVertex other) + { + fixed (SimplexVertex* __self = &this) + { + return new Span(__self, sizeof(SimplexVertex)).SequenceEqual(new Span(&other, sizeof(SimplexVertex))); + } + } + + public override bool Equals(object? obj) + { + return obj is SimplexVertex other && Equals(other); + } + + public static bool operator ==(SimplexVertex left, SimplexVertex right) + { + return left.Equals(right); + } + + public static bool operator !=(SimplexVertex left, SimplexVertex right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (SimplexVertex* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(SimplexVertex))); + return hash.ToHashCode(); + } + } + } + + public partial struct Simplex : IEquatable + { + public bool Equals(Simplex other) + { + fixed (Simplex* __self = &this) + { + return new Span(__self, sizeof(Simplex)).SequenceEqual(new Span(&other, sizeof(Simplex))); + } + } + + public override bool Equals(object? obj) + { + return obj is Simplex other && Equals(other); + } + + public static bool operator ==(Simplex left, Simplex right) + { + return left.Equals(right); + } + + public static bool operator !=(Simplex left, Simplex right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (Simplex* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Simplex))); + return hash.ToHashCode(); + } + } + } + + public partial struct ShapeCastPairInput : IEquatable + { + public bool Equals(ShapeCastPairInput other) + { + fixed (ShapeCastPairInput* __self = &this) + { + return new Span(__self, sizeof(ShapeCastPairInput)).SequenceEqual(new Span(&other, sizeof(ShapeCastPairInput))); + } + } + + public override bool Equals(object? obj) + { + return obj is ShapeCastPairInput other && Equals(other); + } + + public static bool operator ==(ShapeCastPairInput left, ShapeCastPairInput right) + { + return left.Equals(right); + } + + public static bool operator !=(ShapeCastPairInput left, ShapeCastPairInput right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ShapeCastPairInput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ShapeCastPairInput))); + return hash.ToHashCode(); + } + } + } + + public partial struct Sweep : IEquatable + { + public bool Equals(Sweep other) + { + fixed (Sweep* __self = &this) + { + return new Span(__self, sizeof(Sweep)).SequenceEqual(new Span(&other, sizeof(Sweep))); + } + } + + public override bool Equals(object? obj) + { + return obj is Sweep other && Equals(other); + } + + public static bool operator ==(Sweep left, Sweep right) + { + return left.Equals(right); + } + + public static bool operator !=(Sweep left, Sweep right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (Sweep* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Sweep))); + return hash.ToHashCode(); + } + } + } + + public partial struct TOIInput : IEquatable + { + public bool Equals(TOIInput other) + { + fixed (TOIInput* __self = &this) + { + return new Span(__self, sizeof(TOIInput)).SequenceEqual(new Span(&other, sizeof(TOIInput))); + } + } + + public override bool Equals(object? obj) + { + return obj is TOIInput other && Equals(other); + } + + public static bool operator ==(TOIInput left, TOIInput right) + { + return left.Equals(right); + } + + public static bool operator !=(TOIInput left, TOIInput right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (TOIInput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(TOIInput))); + return hash.ToHashCode(); + } + } + } + + public partial struct TOIOutput : IEquatable + { + public bool Equals(TOIOutput other) + { + fixed (TOIOutput* __self = &this) + { + return new Span(__self, sizeof(TOIOutput)).SequenceEqual(new Span(&other, sizeof(TOIOutput))); + } + } + + public override bool Equals(object? obj) + { + return obj is TOIOutput other && Equals(other); + } + + public static bool operator ==(TOIOutput left, TOIOutput right) + { + return left.Equals(right); + } + + public static bool operator !=(TOIOutput left, TOIOutput right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (TOIOutput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(TOIOutput))); + return hash.ToHashCode(); + } + } + } + + public partial struct ManifoldPoint : IEquatable + { + public bool Equals(ManifoldPoint other) + { + fixed (ManifoldPoint* __self = &this) + { + return new Span(__self, sizeof(ManifoldPoint)).SequenceEqual(new Span(&other, sizeof(ManifoldPoint))); + } + } + + public override bool Equals(object? obj) + { + return obj is ManifoldPoint other && Equals(other); + } + + public static bool operator ==(ManifoldPoint left, ManifoldPoint right) + { + return left.Equals(right); + } + + public static bool operator !=(ManifoldPoint left, ManifoldPoint right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ManifoldPoint* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ManifoldPoint))); + return hash.ToHashCode(); + } + } + } + + public partial struct Manifold : IEquatable + { + public bool Equals(Manifold other) + { + fixed (Manifold* __self = &this) + { + return new Span(__self, sizeof(Manifold)).SequenceEqual(new Span(&other, sizeof(Manifold))); + } + } + + public override bool Equals(object? obj) + { + return obj is Manifold other && Equals(other); + } + + public static bool operator ==(Manifold left, Manifold right) + { + return left.Equals(right); + } + + public static bool operator !=(Manifold left, Manifold right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (Manifold* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Manifold))); + return hash.ToHashCode(); + } + } + } + + public partial struct TreeNode : IEquatable + { + public bool Equals(TreeNode other) + { + fixed (TreeNode* __self = &this) + { + return new Span(__self, sizeof(TreeNode)).SequenceEqual(new Span(&other, sizeof(TreeNode))); + } + } + + public override bool Equals(object? obj) + { + return obj is TreeNode other && Equals(other); + } + + public static bool operator ==(TreeNode left, TreeNode right) + { + return left.Equals(right); + } + + public static bool operator !=(TreeNode left, TreeNode right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (TreeNode* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(TreeNode))); + return hash.ToHashCode(); + } + } + } + + public partial struct TreeNode + { + public partial struct AnonymousRecord_collision_L608_C2 : IEquatable + { + public bool Equals(AnonymousRecord_collision_L608_C2 other) + { + fixed (AnonymousRecord_collision_L608_C2* __self = &this) + { + return new Span(__self, sizeof(AnonymousRecord_collision_L608_C2)).SequenceEqual(new Span(&other, sizeof(AnonymousRecord_collision_L608_C2))); + } + } + + public override bool Equals(object? obj) + { + return obj is AnonymousRecord_collision_L608_C2 other && Equals(other); + } + + public static bool operator ==(AnonymousRecord_collision_L608_C2 left, AnonymousRecord_collision_L608_C2 right) + { + return left.Equals(right); + } + + public static bool operator !=(AnonymousRecord_collision_L608_C2 left, AnonymousRecord_collision_L608_C2 right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (AnonymousRecord_collision_L608_C2* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(AnonymousRecord_collision_L608_C2))); + return hash.ToHashCode(); + } + } + } + } + + public partial struct DynamicTree : IEquatable + { + public bool Equals(DynamicTree other) + { + fixed (DynamicTree* __self = &this) + { + return new Span(__self, sizeof(DynamicTree)).SequenceEqual(new Span(&other, sizeof(DynamicTree))); + } + } + + public override bool Equals(object? obj) + { + return obj is DynamicTree other && Equals(other); + } + + public static bool operator ==(DynamicTree left, DynamicTree right) + { + return left.Equals(right); + } + + public static bool operator !=(DynamicTree left, DynamicTree right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (DynamicTree* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(DynamicTree))); + return hash.ToHashCode(); + } + } + } + + public partial struct WorldId : IEquatable + { + public bool Equals(WorldId other) + { + fixed (WorldId* __self = &this) + { + return new Span(__self, sizeof(WorldId)).SequenceEqual(new Span(&other, sizeof(WorldId))); + } + } + + public override bool Equals(object? obj) + { + return obj is WorldId other && Equals(other); + } + + public static bool operator ==(WorldId left, WorldId right) + { + return left.Equals(right); + } + + public static bool operator !=(WorldId left, WorldId right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (WorldId* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(WorldId))); + return hash.ToHashCode(); + } + } + } + + public partial struct BodyId : IEquatable + { + public bool Equals(BodyId other) + { + fixed (BodyId* __self = &this) + { + return new Span(__self, sizeof(BodyId)).SequenceEqual(new Span(&other, sizeof(BodyId))); + } + } + + public override bool Equals(object? obj) + { + return obj is BodyId other && Equals(other); + } + + public static bool operator ==(BodyId left, BodyId right) + { + return left.Equals(right); + } + + public static bool operator !=(BodyId left, BodyId right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (BodyId* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(BodyId))); + return hash.ToHashCode(); + } + } + } + + public partial struct ShapeId : IEquatable + { + public bool Equals(ShapeId other) + { + fixed (ShapeId* __self = &this) + { + return new Span(__self, sizeof(ShapeId)).SequenceEqual(new Span(&other, sizeof(ShapeId))); + } + } + + public override bool Equals(object? obj) + { + return obj is ShapeId other && Equals(other); + } + + public static bool operator ==(ShapeId left, ShapeId right) + { + return left.Equals(right); + } + + public static bool operator !=(ShapeId left, ShapeId right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ShapeId* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ShapeId))); + return hash.ToHashCode(); + } + } + } + + public partial struct JointId : IEquatable + { + public bool Equals(JointId other) + { + fixed (JointId* __self = &this) + { + return new Span(__self, sizeof(JointId)).SequenceEqual(new Span(&other, sizeof(JointId))); + } + } + + public override bool Equals(object? obj) + { + return obj is JointId other && Equals(other); + } + + public static bool operator ==(JointId left, JointId right) + { + return left.Equals(right); + } + + public static bool operator !=(JointId left, JointId right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (JointId* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(JointId))); + return hash.ToHashCode(); + } + } + } + + public partial struct ChainId : IEquatable + { + public bool Equals(ChainId other) + { + fixed (ChainId* __self = &this) + { + return new Span(__self, sizeof(ChainId)).SequenceEqual(new Span(&other, sizeof(ChainId))); + } + } + + public override bool Equals(object? obj) + { + return obj is ChainId other && Equals(other); + } + + public static bool operator ==(ChainId left, ChainId right) + { + return left.Equals(right); + } + + public static bool operator !=(ChainId left, ChainId right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ChainId* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ChainId))); + return hash.ToHashCode(); + } + } + } + + public partial struct RayResult : IEquatable + { + public bool Equals(RayResult other) + { + fixed (RayResult* __self = &this) + { + return new Span(__self, sizeof(RayResult)).SequenceEqual(new Span(&other, sizeof(RayResult))); + } + } + + public override bool Equals(object? obj) + { + return obj is RayResult other && Equals(other); + } + + public static bool operator ==(RayResult left, RayResult right) + { + return left.Equals(right); + } + + public static bool operator !=(RayResult left, RayResult right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (RayResult* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(RayResult))); + return hash.ToHashCode(); + } + } + } + + public partial struct WorldDef : IEquatable + { + public bool Equals(WorldDef other) + { + fixed (WorldDef* __self = &this) + { + return new Span(__self, sizeof(WorldDef)).SequenceEqual(new Span(&other, sizeof(WorldDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is WorldDef other && Equals(other); + } + + public static bool operator ==(WorldDef left, WorldDef right) + { + return left.Equals(right); + } + + public static bool operator !=(WorldDef left, WorldDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (WorldDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(WorldDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct BodyDef : IEquatable + { + public bool Equals(BodyDef other) + { + fixed (BodyDef* __self = &this) + { + return new Span(__self, sizeof(BodyDef)).SequenceEqual(new Span(&other, sizeof(BodyDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is BodyDef other && Equals(other); + } + + public static bool operator ==(BodyDef left, BodyDef right) + { + return left.Equals(right); + } + + public static bool operator !=(BodyDef left, BodyDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (BodyDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(BodyDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct Filter : IEquatable + { + public bool Equals(Filter other) + { + fixed (Filter* __self = &this) + { + return new Span(__self, sizeof(Filter)).SequenceEqual(new Span(&other, sizeof(Filter))); + } + } + + public override bool Equals(object? obj) + { + return obj is Filter other && Equals(other); + } + + public static bool operator ==(Filter left, Filter right) + { + return left.Equals(right); + } + + public static bool operator !=(Filter left, Filter right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (Filter* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Filter))); + return hash.ToHashCode(); + } + } + } + + public partial struct QueryFilter : IEquatable + { + public bool Equals(QueryFilter other) + { + fixed (QueryFilter* __self = &this) + { + return new Span(__self, sizeof(QueryFilter)).SequenceEqual(new Span(&other, sizeof(QueryFilter))); + } + } + + public override bool Equals(object? obj) + { + return obj is QueryFilter other && Equals(other); + } + + public static bool operator ==(QueryFilter left, QueryFilter right) + { + return left.Equals(right); + } + + public static bool operator !=(QueryFilter left, QueryFilter right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (QueryFilter* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(QueryFilter))); + return hash.ToHashCode(); + } + } + } + + public partial struct ShapeDef : IEquatable + { + public bool Equals(ShapeDef other) + { + fixed (ShapeDef* __self = &this) + { + return new Span(__self, sizeof(ShapeDef)).SequenceEqual(new Span(&other, sizeof(ShapeDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is ShapeDef other && Equals(other); + } + + public static bool operator ==(ShapeDef left, ShapeDef right) + { + return left.Equals(right); + } + + public static bool operator !=(ShapeDef left, ShapeDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ShapeDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ShapeDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct ChainDef : IEquatable + { + public bool Equals(ChainDef other) + { + fixed (ChainDef* __self = &this) + { + return new Span(__self, sizeof(ChainDef)).SequenceEqual(new Span(&other, sizeof(ChainDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is ChainDef other && Equals(other); + } + + public static bool operator ==(ChainDef left, ChainDef right) + { + return left.Equals(right); + } + + public static bool operator !=(ChainDef left, ChainDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ChainDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ChainDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct Profile : IEquatable + { + public bool Equals(Profile other) + { + fixed (Profile* __self = &this) + { + return new Span(__self, sizeof(Profile)).SequenceEqual(new Span(&other, sizeof(Profile))); + } + } + + public override bool Equals(object? obj) + { + return obj is Profile other && Equals(other); + } + + public static bool operator ==(Profile left, Profile right) + { + return left.Equals(right); + } + + public static bool operator !=(Profile left, Profile right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (Profile* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Profile))); + return hash.ToHashCode(); + } + } + } + + public partial struct Counters : IEquatable + { + public bool Equals(Counters other) + { + fixed (Counters* __self = &this) + { + return new Span(__self, sizeof(Counters)).SequenceEqual(new Span(&other, sizeof(Counters))); + } + } + + public override bool Equals(object? obj) + { + return obj is Counters other && Equals(other); + } + + public static bool operator ==(Counters left, Counters right) + { + return left.Equals(right); + } + + public static bool operator !=(Counters left, Counters right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (Counters* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Counters))); + return hash.ToHashCode(); + } + } + } + + public partial struct DistanceJointDef : IEquatable + { + public bool Equals(DistanceJointDef other) + { + fixed (DistanceJointDef* __self = &this) + { + return new Span(__self, sizeof(DistanceJointDef)).SequenceEqual(new Span(&other, sizeof(DistanceJointDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is DistanceJointDef other && Equals(other); + } + + public static bool operator ==(DistanceJointDef left, DistanceJointDef right) + { + return left.Equals(right); + } + + public static bool operator !=(DistanceJointDef left, DistanceJointDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (DistanceJointDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(DistanceJointDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct MotorJointDef : IEquatable + { + public bool Equals(MotorJointDef other) + { + fixed (MotorJointDef* __self = &this) + { + return new Span(__self, sizeof(MotorJointDef)).SequenceEqual(new Span(&other, sizeof(MotorJointDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is MotorJointDef other && Equals(other); + } + + public static bool operator ==(MotorJointDef left, MotorJointDef right) + { + return left.Equals(right); + } + + public static bool operator !=(MotorJointDef left, MotorJointDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (MotorJointDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(MotorJointDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct MouseJointDef : IEquatable + { + public bool Equals(MouseJointDef other) + { + fixed (MouseJointDef* __self = &this) + { + return new Span(__self, sizeof(MouseJointDef)).SequenceEqual(new Span(&other, sizeof(MouseJointDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is MouseJointDef other && Equals(other); + } + + public static bool operator ==(MouseJointDef left, MouseJointDef right) + { + return left.Equals(right); + } + + public static bool operator !=(MouseJointDef left, MouseJointDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (MouseJointDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(MouseJointDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct PrismaticJointDef : IEquatable + { + public bool Equals(PrismaticJointDef other) + { + fixed (PrismaticJointDef* __self = &this) + { + return new Span(__self, sizeof(PrismaticJointDef)).SequenceEqual(new Span(&other, sizeof(PrismaticJointDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is PrismaticJointDef other && Equals(other); + } + + public static bool operator ==(PrismaticJointDef left, PrismaticJointDef right) + { + return left.Equals(right); + } + + public static bool operator !=(PrismaticJointDef left, PrismaticJointDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (PrismaticJointDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(PrismaticJointDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct RevoluteJointDef : IEquatable + { + public bool Equals(RevoluteJointDef other) + { + fixed (RevoluteJointDef* __self = &this) + { + return new Span(__self, sizeof(RevoluteJointDef)).SequenceEqual(new Span(&other, sizeof(RevoluteJointDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is RevoluteJointDef other && Equals(other); + } + + public static bool operator ==(RevoluteJointDef left, RevoluteJointDef right) + { + return left.Equals(right); + } + + public static bool operator !=(RevoluteJointDef left, RevoluteJointDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (RevoluteJointDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(RevoluteJointDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct WeldJointDef : IEquatable + { + public bool Equals(WeldJointDef other) + { + fixed (WeldJointDef* __self = &this) + { + return new Span(__self, sizeof(WeldJointDef)).SequenceEqual(new Span(&other, sizeof(WeldJointDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is WeldJointDef other && Equals(other); + } + + public static bool operator ==(WeldJointDef left, WeldJointDef right) + { + return left.Equals(right); + } + + public static bool operator !=(WeldJointDef left, WeldJointDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (WeldJointDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(WeldJointDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct WheelJointDef : IEquatable + { + public bool Equals(WheelJointDef other) + { + fixed (WheelJointDef* __self = &this) + { + return new Span(__self, sizeof(WheelJointDef)).SequenceEqual(new Span(&other, sizeof(WheelJointDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is WheelJointDef other && Equals(other); + } + + public static bool operator ==(WheelJointDef left, WheelJointDef right) + { + return left.Equals(right); + } + + public static bool operator !=(WheelJointDef left, WheelJointDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (WheelJointDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(WheelJointDef))); + return hash.ToHashCode(); + } + } + } + + public partial struct SensorBeginTouchEvent : IEquatable + { + public bool Equals(SensorBeginTouchEvent other) + { + fixed (SensorBeginTouchEvent* __self = &this) + { + return new Span(__self, sizeof(SensorBeginTouchEvent)).SequenceEqual(new Span(&other, sizeof(SensorBeginTouchEvent))); + } + } + + public override bool Equals(object? obj) + { + return obj is SensorBeginTouchEvent other && Equals(other); + } + + public static bool operator ==(SensorBeginTouchEvent left, SensorBeginTouchEvent right) + { + return left.Equals(right); + } + + public static bool operator !=(SensorBeginTouchEvent left, SensorBeginTouchEvent right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (SensorBeginTouchEvent* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(SensorBeginTouchEvent))); + return hash.ToHashCode(); + } + } + } + + public partial struct SensorEndTouchEvent : IEquatable + { + public bool Equals(SensorEndTouchEvent other) + { + fixed (SensorEndTouchEvent* __self = &this) + { + return new Span(__self, sizeof(SensorEndTouchEvent)).SequenceEqual(new Span(&other, sizeof(SensorEndTouchEvent))); + } + } + + public override bool Equals(object? obj) + { + return obj is SensorEndTouchEvent other && Equals(other); + } + + public static bool operator ==(SensorEndTouchEvent left, SensorEndTouchEvent right) + { + return left.Equals(right); + } + + public static bool operator !=(SensorEndTouchEvent left, SensorEndTouchEvent right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (SensorEndTouchEvent* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(SensorEndTouchEvent))); + return hash.ToHashCode(); + } + } + } + + public partial struct SensorEvents : IEquatable + { + public bool Equals(SensorEvents other) + { + fixed (SensorEvents* __self = &this) + { + return new Span(__self, sizeof(SensorEvents)).SequenceEqual(new Span(&other, sizeof(SensorEvents))); + } + } + + public override bool Equals(object? obj) + { + return obj is SensorEvents other && Equals(other); + } + + public static bool operator ==(SensorEvents left, SensorEvents right) + { + return left.Equals(right); + } + + public static bool operator !=(SensorEvents left, SensorEvents right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (SensorEvents* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(SensorEvents))); + return hash.ToHashCode(); + } + } + } + + public partial struct ContactBeginTouchEvent : IEquatable + { + public bool Equals(ContactBeginTouchEvent other) + { + fixed (ContactBeginTouchEvent* __self = &this) + { + return new Span(__self, sizeof(ContactBeginTouchEvent)).SequenceEqual(new Span(&other, sizeof(ContactBeginTouchEvent))); + } + } + + public override bool Equals(object? obj) + { + return obj is ContactBeginTouchEvent other && Equals(other); + } + + public static bool operator ==(ContactBeginTouchEvent left, ContactBeginTouchEvent right) + { + return left.Equals(right); + } + + public static bool operator !=(ContactBeginTouchEvent left, ContactBeginTouchEvent right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ContactBeginTouchEvent* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ContactBeginTouchEvent))); + return hash.ToHashCode(); + } + } + } + + public partial struct ContactEndTouchEvent : IEquatable + { + public bool Equals(ContactEndTouchEvent other) + { + fixed (ContactEndTouchEvent* __self = &this) + { + return new Span(__self, sizeof(ContactEndTouchEvent)).SequenceEqual(new Span(&other, sizeof(ContactEndTouchEvent))); + } + } + + public override bool Equals(object? obj) + { + return obj is ContactEndTouchEvent other && Equals(other); + } + + public static bool operator ==(ContactEndTouchEvent left, ContactEndTouchEvent right) + { + return left.Equals(right); + } + + public static bool operator !=(ContactEndTouchEvent left, ContactEndTouchEvent right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ContactEndTouchEvent* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ContactEndTouchEvent))); + return hash.ToHashCode(); + } + } + } + + public partial struct ContactHitEvent : IEquatable + { + public bool Equals(ContactHitEvent other) + { + fixed (ContactHitEvent* __self = &this) + { + return new Span(__self, sizeof(ContactHitEvent)).SequenceEqual(new Span(&other, sizeof(ContactHitEvent))); + } + } + + public override bool Equals(object? obj) + { + return obj is ContactHitEvent other && Equals(other); + } + + public static bool operator ==(ContactHitEvent left, ContactHitEvent right) + { + return left.Equals(right); + } + + public static bool operator !=(ContactHitEvent left, ContactHitEvent right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ContactHitEvent* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ContactHitEvent))); + return hash.ToHashCode(); + } + } + } + + public partial struct ContactEvents : IEquatable + { + public bool Equals(ContactEvents other) + { + fixed (ContactEvents* __self = &this) + { + return new Span(__self, sizeof(ContactEvents)).SequenceEqual(new Span(&other, sizeof(ContactEvents))); + } + } + + public override bool Equals(object? obj) + { + return obj is ContactEvents other && Equals(other); + } + + public static bool operator ==(ContactEvents left, ContactEvents right) + { + return left.Equals(right); + } + + public static bool operator !=(ContactEvents left, ContactEvents right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ContactEvents* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ContactEvents))); + return hash.ToHashCode(); + } + } + } + + public partial struct BodyMoveEvent : IEquatable + { + public bool Equals(BodyMoveEvent other) + { + fixed (BodyMoveEvent* __self = &this) + { + return new Span(__self, sizeof(BodyMoveEvent)).SequenceEqual(new Span(&other, sizeof(BodyMoveEvent))); + } + } + + public override bool Equals(object? obj) + { + return obj is BodyMoveEvent other && Equals(other); + } + + public static bool operator ==(BodyMoveEvent left, BodyMoveEvent right) + { + return left.Equals(right); + } + + public static bool operator !=(BodyMoveEvent left, BodyMoveEvent right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (BodyMoveEvent* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(BodyMoveEvent))); + return hash.ToHashCode(); + } + } + } + + public partial struct BodyEvents : IEquatable + { + public bool Equals(BodyEvents other) + { + fixed (BodyEvents* __self = &this) + { + return new Span(__self, sizeof(BodyEvents)).SequenceEqual(new Span(&other, sizeof(BodyEvents))); + } + } + + public override bool Equals(object? obj) + { + return obj is BodyEvents other && Equals(other); + } + + public static bool operator ==(BodyEvents left, BodyEvents right) + { + return left.Equals(right); + } + + public static bool operator !=(BodyEvents left, BodyEvents right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (BodyEvents* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(BodyEvents))); + return hash.ToHashCode(); + } + } + } + + public partial struct ContactData : IEquatable + { + public bool Equals(ContactData other) + { + fixed (ContactData* __self = &this) + { + return new Span(__self, sizeof(ContactData)).SequenceEqual(new Span(&other, sizeof(ContactData))); + } + } + + public override bool Equals(object? obj) + { + return obj is ContactData other && Equals(other); + } + + public static bool operator ==(ContactData left, ContactData right) + { + return left.Equals(right); + } + + public static bool operator !=(ContactData left, ContactData right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ContactData* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ContactData))); + return hash.ToHashCode(); + } + } + } + + public partial struct DebugDraw : IEquatable + { + public bool Equals(DebugDraw other) + { + fixed (DebugDraw* __self = &this) + { + return new Span(__self, sizeof(DebugDraw)).SequenceEqual(new Span(&other, sizeof(DebugDraw))); + } + } + + public override bool Equals(object? obj) + { + return obj is DebugDraw other && Equals(other); + } + + public static bool operator ==(DebugDraw left, DebugDraw right) + { + return left.Equals(right); + } + + public static bool operator !=(DebugDraw left, DebugDraw right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (DebugDraw* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(DebugDraw))); + return hash.ToHashCode(); + } + } + } + + public partial struct InlineArrays + { + public partial struct Vec2_8 : IEquatable + { + public bool Equals(Vec2_8 other) + { + fixed (Vec2_8* __self = &this) + { + return new Span(__self, sizeof(Vec2_8)).SequenceEqual(new Span(&other, sizeof(Vec2_8))); + } + } + + public override bool Equals(object? obj) + { + return obj is Vec2_8 other && Equals(other); + } + + public static bool operator ==(Vec2_8 left, Vec2_8 right) + { + return left.Equals(right); + } + + public static bool operator !=(Vec2_8 left, Vec2_8 right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (Vec2_8* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Vec2_8))); + return hash.ToHashCode(); + } + } + } + } + + public partial struct InlineArrays + { + public partial struct byte_3 : IEquatable + { + public bool Equals(byte_3 other) + { + fixed (byte_3* __self = &this) + { + return new Span(__self, sizeof(byte_3)).SequenceEqual(new Span(&other, sizeof(byte_3))); + } + } + + public override bool Equals(object? obj) + { + return obj is byte_3 other && Equals(other); + } + + public static bool operator ==(byte_3 left, byte_3 right) + { + return left.Equals(right); + } + + public static bool operator !=(byte_3 left, byte_3 right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (byte_3* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(byte_3))); + return hash.ToHashCode(); + } + } + } + } + + public partial struct InlineArrays + { + public partial struct ManifoldPoint_2 : IEquatable + { + public bool Equals(ManifoldPoint_2 other) + { + fixed (ManifoldPoint_2* __self = &this) + { + return new Span(__self, sizeof(ManifoldPoint_2)).SequenceEqual(new Span(&other, sizeof(ManifoldPoint_2))); + } + } + + public override bool Equals(object? obj) + { + return obj is ManifoldPoint_2 other && Equals(other); + } + + public static bool operator ==(ManifoldPoint_2 left, ManifoldPoint_2 right) + { + return left.Equals(right); + } + + public static bool operator !=(ManifoldPoint_2 left, ManifoldPoint_2 right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ManifoldPoint_2* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ManifoldPoint_2))); + return hash.ToHashCode(); + } + } + } + } + + public partial struct InlineArrays + { + public partial struct byte_9 : IEquatable + { + public bool Equals(byte_9 other) + { + fixed (byte_9* __self = &this) + { + return new Span(__self, sizeof(byte_9)).SequenceEqual(new Span(&other, sizeof(byte_9))); + } + } + + public override bool Equals(object? obj) + { + return obj is byte_9 other && Equals(other); + } + + public static bool operator ==(byte_9 left, byte_9 right) + { + return left.Equals(right); + } + + public static bool operator !=(byte_9 left, byte_9 right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (byte_9* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(byte_9))); + return hash.ToHashCode(); + } + } + } + } + + public partial struct InlineArrays + { + public partial struct int_12 : IEquatable + { + public bool Equals(int_12 other) + { + fixed (int_12* __self = &this) + { + return new Span(__self, sizeof(int_12)).SequenceEqual(new Span(&other, sizeof(int_12))); + } + } + + public override bool Equals(object? obj) + { + return obj is int_12 other && Equals(other); + } + + public static bool operator ==(int_12 left, int_12 right) + { + return left.Equals(right); + } + + public static bool operator !=(int_12 left, int_12 right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (int_12* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(int_12))); + return hash.ToHashCode(); + } + } + } + } +} +#nullable disable diff --git a/Box2D.NET.Bindings/Box2D.NET.Bindings.csproj b/Box2D.NET.Bindings/Box2D.NET.Bindings.csproj index a1aa96a..98fc342 100644 --- a/Box2D.NET.Bindings/Box2D.NET.Bindings.csproj +++ b/Box2D.NET.Bindings/Box2D.NET.Bindings.csproj @@ -1,36 +1,16 @@  - netstandard2.1;net6.0;net7.0 + net8.0 + enable true - true - true - - 3.0.0 - Box2D.NET.Bindings.Debug - Box2D.NET.Bindings.Release - BeanCheeseBurrito - BeanCheeseBurrito - Raw C# bindings for Box2D 3.0 - $(Title) - https://github.com/BeanCheeseBurrito/Box2D.NET - true - MIT - https://github.com/BeanCheeseBurrito/Box2D.NET - Github - - portable - true - snupkg - true - true + Raw C# bindings for Box2D - diff --git a/Box2D.NET.Examples/Box2D.NET.Examples.csproj b/Box2D.NET.Examples/Box2D.NET.Examples.csproj index fa3cae6..6422b64 100644 --- a/Box2D.NET.Examples/Box2D.NET.Examples.csproj +++ b/Box2D.NET.Examples/Box2D.NET.Examples.csproj @@ -6,6 +6,7 @@ enable enable true + false @@ -13,10 +14,8 @@ $(Example) - - - + diff --git a/Box2D.NET.Native/Box2D.NET.Native.csproj b/Box2D.NET.Native/Box2D.NET.Native.csproj index cc4ad81..184ebb4 100644 --- a/Box2D.NET.Native/Box2D.NET.Native.csproj +++ b/Box2D.NET.Native/Box2D.NET.Native.csproj @@ -1,106 +1,163 @@  - - netstandard1.0 - $(NoWarn);NU5128 + Library + netstandard2.1 + + + false + false + false + false + false + false + false + $(NoWarn);CS2008;NU5128 - true - true - false - - 3.0.0 - Box2D.NET.Native.Debug - Box2D.NET.Native.Release - BeanCheeseBurrito - BeanCheeseBurrito - Native libraries for Box2D 3.0 - $(Title) - https://github.com/BeanCheeseBurrito/Box2D.NET - true - MIT - https://github.com/BeanCheeseBurrito/Box2D.NET - Github + Native libraries for Box2D + - true - true - true + Debug + ReleaseFast + - $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture) - box2d + + + $(HostRuntime) + - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + + + + + + PreserveNewest + runtimes/ + + - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + + + + + x86_64-windows-gnu + + + + + x86-windows-gnu + + + + + arm-windows-gnu + + + + + aarch64-windows-gnu + + + + + x86_64-linux-gnu + + + + + x86-linux-gnu + + + + + arm-linux-gnueabihf + + + + + aarch64-linux-gnu + + + + + x86_64-macos + + + + + aarch64-macos + + + + + x86_64-ios-simulator + --sysroot $(IOS_SIMULATOR_SDK) + + + + + aarch64-ios-simulator + --sysroot $(IOS_SIMULATOR_SDK) + + + + + aarch64-ios + --sysroot $(IOS_SDK) + + + + + wasm32-emscripten + --sysroot "$(EMSDK)/upstream/emscripten" + + + + + aarch64-linux-android + --sysroot $(ANDROID_NDK_HOME) + + + + + x86_64-linux-android + --sysroot $(ANDROID_NDK_HOME) + + + + + $(RuntimeIdentifier) + + + + + + + $(ZigArgs) -Dcompiler-rt-path="$(ZigLibPath)/compiler_rt.zig" + - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + $(ZigExePath) build -Doptimize=$(ZigConfiguration) --prefix $(OutputPath)runtimes --prefix-lib-dir $(RuntimeIdentifier)/native --prefix-exe-dir $(RuntimeIdentifier)/native -Dtarget=$(ZigIdentifier) $(ZigArgs) + + + + + + - diff --git a/Box2D.NET.Native/Box2D.NET.Native.targets b/Box2D.NET.Native/Box2D.NET.Native.targets deleted file mode 100644 index ecd9be2..0000000 --- a/Box2D.NET.Native/Box2D.NET.Native.targets +++ /dev/null @@ -1,31 +0,0 @@ - - - - %(Filename)%(Extension) - Always - false - - - - %(Filename)%(Extension) - Always - false - - - - %(Filename)%(Extension) - Always - false - - - - %(Filename)%(Extension) - Always - false - - - diff --git a/Box2D.NET.Native/build.zig b/Box2D.NET.Native/build.zig index 4e9f309..7b75f36 100644 --- a/Box2D.NET.Native/build.zig +++ b/Box2D.NET.Native/build.zig @@ -1,68 +1,179 @@ const std = @import("std"); +const builtin = @import("builtin"); const Build = std.Build; -const LazyPath = Build.LazyPath; -pub fn build(b: *Build) void { - const target = b.standardTargetOptions(.{}); - const optimize = b.standardOptimizeOption(.{}); - - const lib = b.addSharedLibrary(.{ - .name = "box2d", - .target = target, - .optimize = optimize, - .strip = optimize != .Debug, - }); +pub const LibraryType = enum { Shared, Static }; + +const BuildOptions = struct { + optimize: std.builtin.OptimizeMode, + target: Build.ResolvedTarget, + library_type: LibraryType, + compiler_rt_path: ?[]const u8, +}; + +const src_flags = [_][]const u8{ + "-fno-sanitize=undefined", +}; - if (optimize != .Debug) { +const include_paths = [_][]const u8{ + "../native/box2d/src", + "../native/box2d/include", + "../native/box2d/extern/simde", +}; + +const src_files = [_][]const u8{ + "../native/box2d/src/aabb.c", + "../native/box2d/src/allocate.c", + "../native/box2d/src/array.c", + "../native/box2d/src/bitset.c", + "../native/box2d/src/block_array.c", + "../native/box2d/src/body.c", + "../native/box2d/src/broad_phase.c", + "../native/box2d/src/constraint_graph.c", + "../native/box2d/src/contact.c", + "../native/box2d/src/contact_solver.c", + "../native/box2d/src/core.c", + "../native/box2d/src/distance.c", + "../native/box2d/src/distance_joint.c", + "../native/box2d/src/dynamic_tree.c", + "../native/box2d/src/geometry.c", + "../native/box2d/src/hull.c", + "../native/box2d/src/id_pool.c", + "../native/box2d/src/island.c", + "../native/box2d/src/joint.c", + "../native/box2d/src/manifold.c", + "../native/box2d/src/math_functions.c", + "../native/box2d/src/motor_joint.c", + "../native/box2d/src/mouse_joint.c", + "../native/box2d/src/prismatic_joint.c", + "../native/box2d/src/revolute_joint.c", + "../native/box2d/src/shape.c", + "../native/box2d/src/solver.c", + "../native/box2d/src/solver_set.c", + "../native/box2d/src/stack_allocator.c", + "../native/box2d/src/table.c", + "../native/box2d/src/timer.c", + "../native/box2d/src/types.c", + "../native/box2d/src/weld_joint.c", + "../native/box2d/src/wheel_joint.c", + "../native/box2d/src/world.c", +}; + +pub fn compile(b: *Build, options: BuildOptions) void { + const lib = switch (options.library_type) { + .Shared => b.addSharedLibrary(.{ + .name = "box2d", + .target = options.target, + .optimize = options.optimize, + .strip = options.optimize != .Debug, + .link_libc = true, + }), + .Static => b.addStaticLibrary(.{ + .name = "box2d", + .target = options.target, + .optimize = options.optimize, + .strip = options.optimize != .Debug, + .link_libc = true, + .root_source_file = if (options.compiler_rt_path) |path| .{ .cwd_relative = path } else null, + }), + }; + + if (options.optimize != .Debug) { lib.defineCMacro("NDEBUG", null); } - lib.linkLibC(); - - lib.addIncludePath(b.path("../native/box2d/src")); - lib.addIncludePath(b.path("../native/box2d/include")); - lib.addIncludePath(b.path("../native/box2d/extern/simde")); - - lib.addCSourceFiles(.{ - .files = &.{ - "../native/box2d/src/aabb.c", - "../native/box2d/src/allocate.c", - "../native/box2d/src/array.c", - "../native/box2d/src/bitset.c", - "../native/box2d/src/block_array.c", - "../native/box2d/src/body.c", - "../native/box2d/src/broad_phase.c", - "../native/box2d/src/constraint_graph.c", - "../native/box2d/src/contact.c", - "../native/box2d/src/contact_solver.c", - "../native/box2d/src/core.c", - "../native/box2d/src/distance.c", - "../native/box2d/src/distance_joint.c", - "../native/box2d/src/dynamic_tree.c", - "../native/box2d/src/geometry.c", - "../native/box2d/src/hull.c", - "../native/box2d/src/id_pool.c", - "../native/box2d/src/island.c", - "../native/box2d/src/joint.c", - "../native/box2d/src/manifold.c", - "../native/box2d/src/math_functions.c", - "../native/box2d/src/motor_joint.c", - "../native/box2d/src/mouse_joint.c", - "../native/box2d/src/prismatic_joint.c", - "../native/box2d/src/revolute_joint.c", - "../native/box2d/src/shape.c", - "../native/box2d/src/solver.c", - "../native/box2d/src/solver_set.c", - "../native/box2d/src/stack_allocator.c", - "../native/box2d/src/table.c", - "../native/box2d/src/timer.c", - "../native/box2d/src/types.c", - "../native/box2d/src/weld_joint.c", - "../native/box2d/src/wheel_joint.c", - "../native/box2d/src/world.c", + for (include_paths) |path| { + lib.addIncludePath(b.path(path)); + } + + for (src_files) |file| { + lib.addCSourceFile(.{ .file = b.path(file), .flags = &src_flags }); + } + + switch (options.target.result.os.tag) { + .windows => { + // Temporary fix to get rid of undefined symbol errors when statically linking in Native AOT. + if (options.library_type == LibraryType.Static) { + // lib.addCSourceFile(.{ .file = b.path("../native/windows.c"), .flags = &src_flags }); + } }, - .flags = &.{}, - }); + .ios => { + if (b.sysroot == null) { + @panic("A --sysroot path to an IOS SDK needs to be provided when compiling for IOS."); + } + + lib.addSystemFrameworkPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/System/Library/Frameworks" }) }); + lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/include" }) }); + lib.addLibraryPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/lib" }) }); + }, + .emscripten => { + if (b.sysroot == null) { + @panic("Pass '--sysroot \"$EMSDK/upstream/emscripten\"'"); + } + + const cache_include = b.pathJoin(&.{ b.sysroot.?, "cache", "sysroot", "include" }); + var dir = std.fs.openDirAbsolute(cache_include, std.fs.Dir.OpenDirOptions{ .access_sub_paths = true, .no_follow = true }) catch @panic("No emscripten cache. Generate it!"); + dir.close(); + lib.addIncludePath(.{ .cwd_relative = cache_include }); + }, + .linux => { + if (options.target.result.abi == .android) { + if (b.sysroot == null) { + @panic("A --sysroot path to an Android NDK needs to be provided when compiling for Android."); + } + + const host_tuple = switch (builtin.target.os.tag) { + .linux => "linux-x86_64", + .windows => "windows-x86_64", + .macos => "darwin-x86_64", + else => @panic("unsupported host OS"), + }; + + const triple = switch (options.target.result.cpu.arch) { + .aarch64 => "aarch64-linux-android", + .x86_64 => "x86_64-linux-android", + else => @panic("Unsupported Android architecture"), + }; + const android_api_level: []const u8 = "21"; + + const android_sysroot = b.pathJoin(&.{ b.sysroot.?, "/toolchains/llvm/prebuilt/", host_tuple, "/sysroot" }); + const android_lib_path = b.pathJoin(&.{ android_sysroot, "/usr/lib/", triple, android_api_level }); + const android_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include" }); + const android_system_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include/", triple }); + + lib.addLibraryPath(.{ .cwd_relative = android_lib_path }); + + const libc_file_name = "android-libc.conf"; + var libc_content = std.ArrayList(u8).init(b.allocator); + errdefer libc_content.deinit(); + + const writer = libc_content.writer(); + const libc_installation = std.zig.LibCInstallation{ + .include_dir = android_include_path, + .sys_include_dir = android_system_include_path, + .crt_dir = android_lib_path, + }; + libc_installation.render(writer) catch @panic("Failed to render libc"); + const libc_path = b.addWriteFiles().add(libc_file_name, libc_content.items); + + lib.setLibCFile(libc_path); + lib.libc_file.?.addStepDependencies(&lib.step); + } + }, + else => {}, + } b.installArtifact(lib); } + +pub fn build(b: *Build) void { + compile(b, .{ + .optimize = b.standardOptimizeOption(.{}), + .target = b.standardTargetOptions(.{}), + .library_type = b.option(LibraryType, "library-type", "Compile as a static or shared library.") orelse LibraryType.Shared, + // When building static libraries for Windows, zig's compiler-rt needs to be bundled. + // For some reason, setting "bundle_compiler_rt" to true doesn't produce a static library that works with NativeAOT. + // As a work-around, we manually build the compiler_rt.zig file. + .compiler_rt_path = b.option([]const u8, "compiler-rt-path", "Path to the compiler_rt file.") orelse null, + }); +} diff --git a/Box2D.NET.Native/buildTransitive/Box2D.NET.Native.props b/Box2D.NET.Native/buildTransitive/Box2D.NET.Native.props new file mode 100644 index 0000000..8c119d5 --- /dev/null +++ b/Box2D.NET.Native/buildTransitive/Box2D.NET.Native.props @@ -0,0 +1,2 @@ + + diff --git a/Box2D.NET.Native/buildTransitive/Box2D.NET.Native.targets b/Box2D.NET.Native/buildTransitive/Box2D.NET.Native.targets new file mode 100644 index 0000000..771eaed --- /dev/null +++ b/Box2D.NET.Native/buildTransitive/Box2D.NET.Native.targets @@ -0,0 +1,13 @@ + + + true + $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)../static/$(RuntimeIdentifier)/native/')) + $(Box2DStaticPath)box2d.lib + $(Box2DStaticPath)libbox2d.a + + + + + + + diff --git a/Box2D.NET.Tests/Box2D.NET.Tests.csproj b/Box2D.NET.Tests/Box2D.NET.Tests.csproj index a1e1516..0781fb8 100644 --- a/Box2D.NET.Tests/Box2D.NET.Tests.csproj +++ b/Box2D.NET.Tests/Box2D.NET.Tests.csproj @@ -1,9 +1,9 @@ - netcoreapp3.1;net6.0;net7.0;net8.0 - false + net8.0 true + false @@ -12,11 +12,9 @@ - - - + diff --git a/Box2D.NET.Tests/WorldTests.cs b/Box2D.NET.Tests/WorldTests.cs index 5cab2c9..1b57003 100644 --- a/Box2D.NET.Tests/WorldTests.cs +++ b/Box2D.NET.Tests/WorldTests.cs @@ -14,7 +14,7 @@ public void HelloWorld() worldDef.gravity = new B2.Vec2 { x = 0.0f, y = -10.0f }; B2.WorldId worldId = B2.CreateWorld(&worldDef); - Assert.True(B2.WorldIsValid(worldId) != 0); + Assert.True(B2.WorldIsValid(worldId)); // Define the ground body. B2.BodyDef groundBodyDef = B2.DefaultBodyDef(); @@ -24,7 +24,7 @@ public void HelloWorld() // from a pool and creates the ground box shape (also from a pool). // The body is also added to the world. B2.BodyId groundId = B2.CreateBody(worldId, &groundBodyDef); - Assert.True(B2.BodyIsValid(groundId) != 0); + Assert.True(B2.BodyIsValid(groundId)); // Define the ground box shape. The extents are the half-widths of the box. B2.Polygon groundBox = B2.MakeBox(50.0f, 10.0f); diff --git a/Box2D.NET/Box2D.NET.csproj b/Box2D.NET/Box2D.NET.csproj index c169757..0851f78 100644 --- a/Box2D.NET/Box2D.NET.csproj +++ b/Box2D.NET/Box2D.NET.csproj @@ -1,37 +1,16 @@  - netstandard2.1;net6.0;net7.0 + net8.0 enable - true - true - - 3.0.0 - Box2D.NET.Debug - Box2D.NET.Release - BeanCheeseBurrito - BeanCheeseBurrito - Raw C# bindings for Box2D 3.0 - $(Title) - https://github.com/BeanCheeseBurrito/Box2D.NET - true - MIT - https://github.com/BeanCheeseBurrito/Box2D.NET - Github - - portable - true - snupkg - true - true + Raw C# bindings for Box2D - - + diff --git a/Directory.Build.props b/Directory.Build.props index d73a6b4..064181f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,8 +1,61 @@ - false + 3.1.0 + BeanCheeseBurrito + BeanCheeseBurrito + https://github.com/BeanCheeseBurrito/Box2D.NET + MIT + README.md + true + https://github.com/BeanCheeseBurrito/Box2D.NET + Github + + portable + true + snupkg + true + true + + + + $(NoWarn);NETSDK1138 true true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + + + + + + + + $([System.IO.Path]::GetFileNameWithoutExtension('$(MSBuildProjectFile)')) + $(ProjectName).Debug + $(ProjectName).Release + + + + $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture) + + + + + win-x64 + win-arm64 + + + + + linux-x64 + linux-arm64 + + + + + osx-x64 + osx-arm64 + + + diff --git a/Directory.Build.targets b/Directory.Build.targets index 8fe590b..8c119d5 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,2 @@ - - $(Version)$(NugetVersionSuffix) - From a7ca459759828d6d4cc6b3ed370bdb477c75c1f1 Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Mon, 12 May 2025 08:16:19 -0700 Subject: [PATCH 2/6] Update box2d to 3.1.0 and change build script to glob files --- Box2D.NET.Bindgen/Program.cs | 21 +- Box2D.NET.Bindings/B2.g.cs | 1672 ++++++++++++++-------- Box2D.NET.Examples/CSharp/HelloWorld.cs | 2 +- Box2D.NET.Native/Box2D.NET.Native.csproj | 2 +- Box2D.NET.Native/build.zig | 77 +- Box2D.NET.Tests/WorldTests.cs | 2 +- native/box2d | 2 +- native/windows.c | 4 + 8 files changed, 1095 insertions(+), 687 deletions(-) create mode 100644 native/windows.c diff --git a/Box2D.NET.Bindgen/Program.cs b/Box2D.NET.Bindgen/Program.cs index 16ef994..6d844c6 100644 --- a/Box2D.NET.Bindgen/Program.cs +++ b/Box2D.NET.Bindgen/Program.cs @@ -11,16 +11,9 @@ SystemIncludeDirectories = { Path.Combine(BuildConstants.ZigLibPath, "include") }, IncludeDirectories = { GetIncludeDirectory() }, - TreatInputFileAsRawSourceCode = true, OutputFile = GetOutputDirectory(), - InputFile = """ - #include - #include - #include - #include - #include - #include - """, + InputFile = GetInputFile(), + TreatInputFileAsRawSourceCode = true, GenerateDisableRuntimeMarshallingAttribute = true, @@ -63,3 +56,13 @@ string GetOutputDirectory() { return GetCurrentFilePath() + "/../../Box2D.NET.Bindings/B2.g.cs"; } + +// Generates an input file that includes all Box2D headers. +string GetInputFile() +{ + IEnumerable headerFiles = Directory + .EnumerateFiles(GetIncludeDirectory(), "*.h", SearchOption.AllDirectories) + .Select((string filePath) => $"#include <{Path.GetRelativePath(GetIncludeDirectory(), filePath)}>"); + + return string.Join('\n', headerFiles); +} diff --git a/Box2D.NET.Bindings/B2.g.cs b/Box2D.NET.Bindings/B2.g.cs index effe178..06393a0 100644 --- a/Box2D.NET.Bindings/B2.g.cs +++ b/Box2D.NET.Bindings/B2.g.cs @@ -21,9 +21,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Extents")] public static extern Vec2 AABBExtents(AABB a); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_IsValid")] - public static extern bool AABBIsValid(AABB aabb); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2AABB_Union")] public static extern AABB AABBUnion(AABB a, AABB b); @@ -39,6 +36,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Add")] public static extern Vec2 Add(Vec2 a, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Atan2")] + public static extern float Atan2(float y, float x); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_ApplyAngularImpulse")] public static extern void BodyApplyAngularImpulse(BodyId bodyId, float impulse, bool wake); @@ -69,8 +69,11 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_Enable")] public static extern void BodyEnable(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_EnableContactEvents")] + public static extern void BodyEnableContactEvents(BodyId bodyId, bool flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_EnableHitEvents")] - public static extern void BodyEnableHitEvents(BodyId bodyId, bool enableHitEvents); + public static extern void BodyEnableHitEvents(BodyId bodyId, bool flag); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_EnableSleep")] public static extern void BodyEnableSleep(BodyId bodyId, bool enableSleep); @@ -81,9 +84,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetAngularVelocity")] public static extern float BodyGetAngularVelocity(BodyId bodyId); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetAutomaticMass")] - public static extern bool BodyGetAutomaticMass(BodyId bodyId); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetContactCapacity")] public static extern int BodyGetContactCapacity(BodyId bodyId); @@ -93,9 +93,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetGravityScale")] public static extern float BodyGetGravityScale(BodyId bodyId); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetInertiaTensor")] - public static extern float BodyGetInertiaTensor(BodyId bodyId); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetJointCount")] public static extern int BodyGetJointCount(BodyId bodyId); @@ -114,6 +111,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalPoint")] public static extern Vec2 BodyGetLocalPoint(BodyId bodyId, Vec2 worldPoint); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalPointVelocity")] + public static extern Vec2 BodyGetLocalPointVelocity(BodyId bodyId, Vec2 localPoint); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetLocalVector")] public static extern Vec2 BodyGetLocalVector(BodyId bodyId, Vec2 worldVector); @@ -123,12 +123,18 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetMassData")] public static extern MassData BodyGetMassData(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetName")] + public static extern byte* BodyGetName(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetPosition")] public static extern Vec2 BodyGetPosition(BodyId bodyId); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetRotation")] public static extern Rot BodyGetRotation(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetRotationalInertia")] + public static extern float BodyGetRotationalInertia(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetShapeCount")] public static extern int BodyGetShapeCount(BodyId bodyId); @@ -147,12 +153,18 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetUserData")] public static extern void* BodyGetUserData(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorld")] + public static extern WorldId BodyGetWorld(BodyId bodyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldCenterOfMass")] public static extern Vec2 BodyGetWorldCenterOfMass(BodyId bodyId); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldPoint")] public static extern Vec2 BodyGetWorldPoint(BodyId bodyId, Vec2 localPoint); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldPointVelocity")] + public static extern Vec2 BodyGetWorldPointVelocity(BodyId bodyId, Vec2 worldPoint); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_GetWorldVector")] public static extern Vec2 BodyGetWorldVector(BodyId bodyId, Vec2 localVector); @@ -180,9 +192,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAngularVelocity")] public static extern void BodySetAngularVelocity(BodyId bodyId, float angularVelocity); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAutomaticMass")] - public static extern void BodySetAutomaticMass(BodyId bodyId, bool automaticMass); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetAwake")] public static extern void BodySetAwake(BodyId bodyId, bool awake); @@ -204,8 +213,14 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetMassData")] public static extern void BodySetMassData(BodyId bodyId, MassData massData); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetName")] + public static extern void BodySetName(BodyId bodyId, byte* name); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetSleepThreshold")] - public static extern void BodySetSleepThreshold(BodyId bodyId, float sleepVelocity); + public static extern void BodySetSleepThreshold(BodyId bodyId, float sleepThreshold); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetTargetTransform")] + public static extern void BodySetTargetTransform(BodyId bodyId, Transform target, float timeStep); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetTransform")] public static extern void BodySetTransform(BodyId bodyId, Vec2 position, Rot rotation); @@ -216,12 +231,33 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Body_SetUserData")] public static extern void BodySetUserData(BodyId bodyId, void* userData); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_GetFriction")] + public static extern float ChainGetFriction(ChainId chainId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_GetMaterial")] + public static extern int ChainGetMaterial(ChainId chainId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_GetRestitution")] + public static extern float ChainGetRestitution(ChainId chainId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_GetSegmentCount")] + public static extern int ChainGetSegmentCount(ChainId chainId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_GetSegments")] + public static extern int ChainGetSegments(ChainId chainId, ShapeId* segmentArray, int capacity); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_GetWorld")] + public static extern WorldId ChainGetWorld(ChainId chainId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_IsValid")] public static extern bool ChainIsValid(ChainId id); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_SetFriction")] public static extern void ChainSetFriction(ChainId chainId, float friction); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_SetMaterial")] + public static extern void ChainSetMaterial(ChainId chainId, int material); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Chain_SetRestitution")] public static extern void ChainSetRestitution(ChainId chainId, float restitution); @@ -234,12 +270,24 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ClampInt")] public static extern int ClampInt(int a, int lower, int upper); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ClipVector")] + public static extern Vec2 ClipVector(Vec2 vector, CollisionPlane* planes, int count); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCapsuleAndCircle")] public static extern Manifold CollideCapsuleAndCircle(Capsule* capsuleA, Transform xfA, Circle* circleB, Transform xfB); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCapsules")] public static extern Manifold CollideCapsules(Capsule* capsuleA, Transform xfA, Capsule* capsuleB, Transform xfB); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideChainSegmentAndCapsule")] + public static extern Manifold CollideChainSegmentAndCapsule(ChainSegment* segmentA, Transform xfA, Capsule* capsuleB, Transform xfB, SimplexCache* cache); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideChainSegmentAndCircle")] + public static extern Manifold CollideChainSegmentAndCircle(ChainSegment* segmentA, Transform xfA, Circle* circleB, Transform xfB); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideChainSegmentAndPolygon")] + public static extern Manifold CollideChainSegmentAndPolygon(ChainSegment* segmentA, Transform xfA, Polygon* polygonB, Transform xfB, SimplexCache* cache); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideCircles")] public static extern Manifold CollideCircles(Circle* circleA, Transform xfA, Circle* circleB, Transform xfB); @@ -261,15 +309,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSegmentAndPolygon")] public static extern Manifold CollideSegmentAndPolygon(Segment* segmentA, Transform xfA, Polygon* polygonB, Transform xfB); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndCapsule")] - public static extern Manifold CollideSmoothSegmentAndCapsule(SmoothSegment* smoothSegmentA, Transform xfA, Capsule* capsuleB, Transform xfB, DistanceCache* cache); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndCircle")] - public static extern Manifold CollideSmoothSegmentAndCircle(SmoothSegment* smoothSegmentA, Transform xfA, Circle* circleB, Transform xfB); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CollideSmoothSegmentAndPolygon")] - public static extern Manifold CollideSmoothSegmentAndPolygon(SmoothSegment* smoothSegmentA, Transform xfA, Polygon* polygonB, Transform xfB, DistanceCache* cache); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeAngularVelocity")] public static extern float ComputeAngularVelocity(Rot q1, Rot q2, float inv_h); @@ -285,6 +324,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCircleMass")] public static extern MassData ComputeCircleMass(Circle* shape, float density); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeCosSin")] + public static extern CosSin ComputeCosSin(float radians); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeHull")] public static extern Hull ComputeHull(Vec2* points, int count); @@ -294,6 +336,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputePolygonMass")] public static extern MassData ComputePolygonMass(Polygon* shape, float density); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeRotationBetweenUnitVectors")] + public static extern Rot ComputeRotationBetweenUnitVectors(Vec2 v1, Vec2 v2); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ComputeSegmentAABB")] public static extern AABB ComputeSegmentAABB(Segment* shape, Transform transform); @@ -312,6 +357,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateDistanceJoint")] public static extern JointId CreateDistanceJoint(WorldId worldId, DistanceJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateFilterJoint")] + public static extern JointId CreateFilterJoint(WorldId worldId, FilterJointDef* def); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateMotorJoint")] public static extern JointId CreateMotorJoint(WorldId worldId, MotorJointDef* def); @@ -330,9 +378,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateSegmentShape")] public static extern ShapeId CreateSegmentShape(BodyId bodyId, ShapeDef* def, Segment* segment); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateTimer")] - public static extern Timer CreateTimer(); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2CreateWeldJoint")] public static extern JointId CreateWeldJoint(WorldId worldId, WeldJointDef* def); @@ -357,12 +402,21 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultChainDef")] public static extern ChainDef DefaultChainDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultDebugDraw")] + public static extern DebugDraw DefaultDebugDraw(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultDistanceJointDef")] public static extern DistanceJointDef DefaultDistanceJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultExplosionDef")] + public static extern ExplosionDef DefaultExplosionDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultFilter")] public static extern Filter DefaultFilter(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultFilterJointDef")] + public static extern FilterJointDef DefaultFilterJointDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultMotorJointDef")] public static extern MotorJointDef DefaultMotorJointDef(); @@ -381,6 +435,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultShapeDef")] public static extern ShapeDef DefaultShapeDef(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultSurfaceMaterial")] + public static extern SurfaceMaterial DefaultSurfaceMaterial(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DefaultWeldJointDef")] public static extern WeldJointDef DefaultWeldJointDef(); @@ -400,7 +457,7 @@ public partial class BindgenInternal public static extern void DestroyJoint(JointId jointId); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyShape")] - public static extern void DestroyShape(ShapeId shapeId); + public static extern void DestroyShape(ShapeId shapeId, bool updateBodyMass); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DestroyWorld")] public static extern void DestroyWorld(WorldId worldId); @@ -420,12 +477,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetCurrentLength")] public static extern float DistanceJointGetCurrentLength(JointId jointId); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetDampingRatio")] - public static extern float DistanceJointGetDampingRatio(JointId jointId); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetHertz")] - public static extern float DistanceJointGetHertz(JointId jointId); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetLength")] public static extern float DistanceJointGetLength(JointId jointId); @@ -444,6 +495,12 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetMotorSpeed")] public static extern float DistanceJointGetMotorSpeed(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetSpringDampingRatio")] + public static extern float DistanceJointGetSpringDampingRatio(JointId jointId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_GetSpringHertz")] + public static extern float DistanceJointGetSpringHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DistanceJoint_IsLimitEnabled")] public static extern bool DistanceJointIsLimitEnabled(JointId jointId); @@ -481,7 +538,7 @@ public partial class BindgenInternal public static extern DynamicTree DynamicTreeCreate(); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_CreateProxy")] - public static extern int DynamicTreeCreateProxy(DynamicTree* tree, AABB aabb, uint categoryBits, int userData); + public static extern int DynamicTreeCreateProxy(DynamicTree* tree, AABB aabb, ulong categoryBits, ulong userData); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Destroy")] public static extern void DynamicTreeDestroy(DynamicTree* tree); @@ -501,42 +558,45 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetByteCount")] public static extern int DynamicTreeGetByteCount(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetCategoryBits")] + public static extern ulong DynamicTreeGetCategoryBits(DynamicTree* tree, int proxyId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetHeight")] public static extern int DynamicTreeGetHeight(DynamicTree* tree); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetMaxBalance")] - public static extern int DynamicTreeGetMaxBalance(DynamicTree* tree); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetProxyCount")] public static extern int DynamicTreeGetProxyCount(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetRootBounds")] + public static extern AABB DynamicTreeGetRootBounds(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_GetUserData")] - public static extern int DynamicTreeGetUserData(DynamicTree* tree, int proxyId); + public static extern ulong DynamicTreeGetUserData(DynamicTree* tree, int proxyId); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_MoveProxy")] public static extern void DynamicTreeMoveProxy(DynamicTree* tree, int proxyId, AABB aabb); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Query")] - public static extern void DynamicTreeQuery(DynamicTree* tree, AABB aabb, uint maskBits, delegate* unmanaged callback, void* context); + public static extern TreeStats DynamicTreeQuery(DynamicTree* tree, AABB aabb, ulong maskBits, delegate* unmanaged callback, void* context); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_RayCast")] - public static extern void DynamicTreeRayCast(DynamicTree* tree, RayCastInput* input, uint maskBits, delegate* unmanaged callback, void* context); + public static extern TreeStats DynamicTreeRayCast(DynamicTree* tree, RayCastInput* input, ulong maskBits, delegate* unmanaged callback, void* context); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Rebuild")] public static extern int DynamicTreeRebuild(DynamicTree* tree, bool fullBuild); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_RebuildBottomUp")] - public static extern void DynamicTreeRebuildBottomUp(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_SetCategoryBits")] + public static extern void DynamicTreeSetCategoryBits(DynamicTree* tree, int proxyId, ulong categoryBits); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_ShapeCast")] - public static extern void DynamicTreeShapeCast(DynamicTree* tree, ShapeCastInput* input, uint maskBits, delegate* unmanaged callback, void* context); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_ShiftOrigin")] - public static extern void DynamicTreeShiftOrigin(DynamicTree* tree, Vec2 newOrigin); + public static extern TreeStats DynamicTreeShapeCast(DynamicTree* tree, ShapeCastInput* input, ulong maskBits, delegate* unmanaged callback, void* context); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_Validate")] public static extern void DynamicTreeValidate(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2DynamicTree_ValidateNoEnlarged")] + public static extern void DynamicTreeValidateNoEnlarged(DynamicTree* tree); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetByteCount")] public static extern int GetByteCount(); @@ -550,23 +610,29 @@ public partial class BindgenInternal public static extern float GetLengthUnitsPerMeter(); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetMilliseconds")] - public static extern float GetMilliseconds(Timer* timer); + public static extern float GetMilliseconds(ulong ticks); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetMillisecondsAndReset")] - public static extern float GetMillisecondsAndReset(Timer* timer); + public static extern float GetMillisecondsAndReset(ulong* ticks); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetSweepTransform")] public static extern Transform GetSweepTransform(Sweep* sweep, float time); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetTicks")] - public static extern long GetTicks(Timer* timer); + public static extern ulong GetTicks(); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2GetVersion")] public static extern Version GetVersion(); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Hash")] + public static extern uint Hash(uint hash, byte* data, int count); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IntegrateRotation")] public static extern Rot IntegrateRotation(Rot q1, float deltaAngle); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InternalAssertFcn")] + public static extern int InternalAssertFcn(byte* condition, byte* fileName, int lineNumber); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2InvMulRot")] public static extern Rot InvMulRot(Rot q, Rot r); @@ -580,14 +646,29 @@ public partial class BindgenInternal public static extern Vec2 InvTransformPoint(Transform t, Vec2 p); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsNormalized")] - public static extern bool IsNormalized(Rot q); + public static extern bool IsNormalized(Vec2 a); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsNormalizedRot")] + public static extern bool IsNormalizedRot(Rot q); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValidAABB")] + public static extern bool IsValidAABB(AABB aabb); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValid")] - public static extern bool IsValid(float a); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValidFloat")] + public static extern bool IsValidFloat(float a); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValidPlane")] + public static extern bool IsValidPlane(Plane a); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValidRay")] public static extern bool IsValidRay(RayCastInput* input); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValidRotation")] + public static extern bool IsValidRotation(Rot q); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2IsValidVec2")] + public static extern bool IsValidVec2(Vec2 v); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetBodyA")] public static extern BodyId JointGetBodyA(JointId jointId); @@ -615,6 +696,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetUserData")] public static extern void* JointGetUserData(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_GetWorld")] + public static extern WorldId JointGetWorld(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Joint_IsValid")] public static extern bool JointIsValid(JointId id); @@ -639,29 +723,53 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Lerp")] public static extern Vec2 Lerp(Vec2 a, Vec2 b, float t); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2LoadBodyId")] + public static extern BodyId LoadBodyId(ulong x); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2LoadChainId")] + public static extern ChainId LoadChainId(ulong x); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2LoadJointId")] + public static extern JointId LoadJointId(ulong x); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2LoadShapeId")] + public static extern ShapeId LoadShapeId(ulong x); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeAABB")] + public static extern AABB MakeAABB(Vec2* points, int count, float radius); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeBox")] - public static extern Polygon MakeBox(float hx, float hy); + public static extern Polygon MakeBox(float halfWidth, float halfHeight); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetBox")] - public static extern Polygon MakeOffsetBox(float hx, float hy, Vec2 center, float angle); + public static extern Polygon MakeOffsetBox(float halfWidth, float halfHeight, Vec2 center, Rot rotation); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetPolygon")] - public static extern Polygon MakeOffsetPolygon(Hull* hull, float radius, Transform transform); + public static extern Polygon MakeOffsetPolygon(Hull* hull, Vec2 position, Rot rotation); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetProxy")] + public static extern ShapeProxy MakeOffsetProxy(Vec2* points, int count, float radius, Vec2 position, Rot rotation); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetRoundedBox")] + public static extern Polygon MakeOffsetRoundedBox(float halfWidth, float halfHeight, Vec2 center, Rot rotation, float radius); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeOffsetRoundedPolygon")] + public static extern Polygon MakeOffsetRoundedPolygon(Hull* hull, Vec2 position, Rot rotation, float radius); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakePolygon")] public static extern Polygon MakePolygon(Hull* hull, float radius); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeProxy")] - public static extern DistanceProxy MakeProxy(Vec2* vertices, int count, float radius); + public static extern ShapeProxy MakeProxy(Vec2* points, int count, float radius); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeRot")] - public static extern Rot MakeRot(float angle); + public static extern Rot MakeRot(float radians); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeRoundedBox")] - public static extern Polygon MakeRoundedBox(float hx, float hy, float radius); + public static extern Polygon MakeRoundedBox(float halfWidth, float halfHeight, float radius); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2MakeSquare")] - public static extern Polygon MakeSquare(float h); + public static extern Polygon MakeSquare(float halfWidth); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Max")] public static extern Vec2 Max(Vec2 a, Vec2 b); @@ -765,12 +873,12 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Normalize")] public static extern Vec2 Normalize(Vec2 v); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2NormalizeChecked")] - public static extern Vec2 NormalizeChecked(Vec2 v); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2NormalizeRot")] public static extern Rot NormalizeRot(Rot q); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PlaneSeparation")] + public static extern float PlaneSeparation(Plane plane, Vec2 point); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PointInCapsule")] public static extern bool PointInCapsule(Vec2 point, Capsule* shape); @@ -801,12 +909,18 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetMotorSpeed")] public static extern float PrismaticJointGetMotorSpeed(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetSpeed")] + public static extern float PrismaticJointGetSpeed(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetSpringDampingRatio")] public static extern float PrismaticJointGetSpringDampingRatio(JointId jointId); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetSpringHertz")] public static extern float PrismaticJointGetSpringHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetTranslation")] + public static extern float PrismaticJointGetTranslation(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2PrismaticJoint_GetUpperLimit")] public static extern float PrismaticJointGetUpperLimit(JointId jointId); @@ -888,6 +1002,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_IsMotorEnabled")] public static extern bool RevoluteJointIsMotorEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_IsSpringEnabled")] + public static extern bool RevoluteJointIsSpringEnabled(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RevoluteJoint_SetLimits")] public static extern void RevoluteJointSetLimits(JointId jointId, float lower, float upper); @@ -915,9 +1032,6 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_GetYAxis")] public static extern Vec2 RotGetYAxis(Rot q); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Rot_IsValid")] - public static extern bool RotIsValid(Rot q); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2RotateVector")] public static extern Vec2 RotateVector(Rot q, Vec2 v); @@ -966,6 +1080,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetCapsule")] public static extern Capsule ShapeGetCapsule(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetChainSegment")] + public static extern ChainSegment ShapeGetChainSegment(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetCircle")] public static extern Circle ShapeGetCircle(ShapeId shapeId); @@ -987,6 +1104,12 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetFriction")] public static extern float ShapeGetFriction(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetMassData")] + public static extern MassData ShapeGetMassData(ShapeId shapeId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetMaterial")] + public static extern int ShapeGetMaterial(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetParentChain")] public static extern ChainId ShapeGetParentChain(ShapeId shapeId); @@ -999,8 +1122,11 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetSegment")] public static extern Segment ShapeGetSegment(ShapeId shapeId); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetSmoothSegment")] - public static extern SmoothSegment ShapeGetSmoothSegment(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetSensorCapacity")] + public static extern int ShapeGetSensorCapacity(ShapeId shapeId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetSensorOverlaps")] + public static extern int ShapeGetSensorOverlaps(ShapeId shapeId, ShapeId* overlaps, int capacity); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetType")] public static extern ShapeType ShapeGetType(ShapeId shapeId); @@ -1008,6 +1134,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetUserData")] public static extern void* ShapeGetUserData(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_GetWorld")] + public static extern WorldId ShapeGetWorld(ShapeId shapeId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_IsSensor")] public static extern bool ShapeIsSensor(ShapeId shapeId); @@ -1015,7 +1144,7 @@ public partial class BindgenInternal public static extern bool ShapeIsValid(ShapeId id); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_RayCast")] - public static extern CastOutput ShapeRayCast(ShapeId shapeId, Vec2 origin, Vec2 translation); + public static extern CastOutput ShapeRayCast(ShapeId shapeId, RayCastInput* input); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetCapsule")] public static extern void ShapeSetCapsule(ShapeId shapeId, Capsule* capsule); @@ -1024,7 +1153,7 @@ public partial class BindgenInternal public static extern void ShapeSetCircle(ShapeId shapeId, Circle* circle); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetDensity")] - public static extern void ShapeSetDensity(ShapeId shapeId, float density); + public static extern void ShapeSetDensity(ShapeId shapeId, float density, bool updateBodyMass); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetFilter")] public static extern void ShapeSetFilter(ShapeId shapeId, Filter filter); @@ -1032,6 +1161,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetFriction")] public static extern void ShapeSetFriction(ShapeId shapeId, float friction); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetMaterial")] + public static extern void ShapeSetMaterial(ShapeId shapeId, int material); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Shape_SetPolygon")] public static extern void ShapeSetPolygon(ShapeId shapeId, Polygon* polygon); @@ -1063,14 +1195,26 @@ public partial class BindgenInternal public static extern CastOutput ShapeCastSegment(ShapeCastInput* input, Segment* shape); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ShapeDistance")] - public static extern DistanceOutput ShapeDistance(DistanceCache* cache, DistanceInput* input, Simplex* simplexes, int simplexCapacity); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SleepMilliseconds")] - public static extern void SleepMilliseconds(int milliseconds); + public static extern DistanceOutput ShapeDistance(DistanceInput* input, SimplexCache* cache, Simplex* simplexes, int simplexCapacity); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Solve22")] public static extern Vec2 Solve22(Mat22 A, Vec2 b); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2SolvePlanes")] + public static extern PlaneSolverResult SolvePlanes(Vec2 position, CollisionPlane* planes, int count); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2StoreBodyId")] + public static extern ulong StoreBodyId(BodyId id); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2StoreChainId")] + public static extern ulong StoreChainId(ChainId id); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2StoreJointId")] + public static extern ulong StoreJointId(JointId id); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2StoreShapeId")] + public static extern ulong StoreShapeId(ShapeId id); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Sub")] public static extern Vec2 Sub(Vec2 a, Vec2 b); @@ -1084,14 +1228,14 @@ public partial class BindgenInternal public static extern Polygon TransformPolygon(Transform transform, Polygon* polygon); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2UnwindAngle")] - public static extern float UnwindAngle(float angle); + public static extern float UnwindAngle(float radians); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2UnwindLargeAngle")] + public static extern float UnwindLargeAngle(float radians); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2ValidateHull")] public static extern bool ValidateHull(Hull* hull); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2Vec2_IsValid")] - public static extern bool Vec2IsValid(Vec2 v); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetAngularDampingRatio")] public static extern float WeldJointGetAngularDampingRatio(JointId jointId); @@ -1104,6 +1248,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetLinearHertz")] public static extern float WeldJointGetLinearHertz(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_GetReferenceAngle")] + public static extern float WeldJointGetReferenceAngle(JointId jointId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetAngularDampingRatio")] public static extern void WeldJointSetAngularDampingRatio(JointId jointId, float dampingRatio); @@ -1116,6 +1263,9 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetLinearHertz")] public static extern void WeldJointSetLinearHertz(JointId jointId, float hertz); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WeldJoint_SetReferenceAngle")] + public static extern void WeldJointSetReferenceAngle(JointId jointId, float angleInRadians); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_EnableLimit")] public static extern void WheelJointEnableLimit(JointId jointId, bool enableLimit); @@ -1170,21 +1320,21 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2WheelJoint_SetSpringHertz")] public static extern void WheelJointSetSpringHertz(JointId jointId, float hertz); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastCapsule")] - public static extern void WorldCastCapsule(WorldId worldId, Capsule* capsule, Transform originTransform, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastCircle")] - public static extern void WorldCastCircle(WorldId worldId, Circle* circle, Transform originTransform, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); - - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastPolygon")] - public static extern void WorldCastPolygon(WorldId worldId, Polygon* polygon, Transform originTransform, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastMover")] + public static extern float WorldCastMover(WorldId worldId, Capsule* mover, Vec2 translation, QueryFilter filter); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastRay")] - public static extern void WorldCastRay(WorldId worldId, Vec2 origin, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); + public static extern TreeStats WorldCastRay(WorldId worldId, Vec2 origin, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastRayClosest")] public static extern RayResult WorldCastRayClosest(WorldId worldId, Vec2 origin, Vec2 translation, QueryFilter filter); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CastShape")] + public static extern TreeStats WorldCastShape(WorldId worldId, ShapeProxy* proxy, Vec2 translation, QueryFilter filter, delegate* unmanaged fcn, void* context); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_CollideMover")] + public static extern void WorldCollideMover(WorldId worldId, Capsule* mover, QueryFilter filter, delegate* unmanaged fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Draw")] public static extern void WorldDraw(WorldId worldId, DebugDraw* draw); @@ -1197,11 +1347,17 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableSleeping")] public static extern void WorldEnableSleeping(WorldId worldId, bool flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableSpeculative")] + public static extern void WorldEnableSpeculative(WorldId worldId, bool flag); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_EnableWarmStarting")] public static extern void WorldEnableWarmStarting(WorldId worldId, bool flag); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Explode")] - public static extern void WorldExplode(WorldId worldId, Vec2 position, float radius, float impulse); + public static extern void WorldExplode(WorldId worldId, ExplosionDef* explosionDef); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetAwakeBodyCount")] + public static extern int WorldGetAwakeBodyCount(WorldId worldId); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetBodyEvents")] public static extern BodyEvents WorldGetBodyEvents(WorldId worldId); @@ -1215,45 +1371,78 @@ public partial class BindgenInternal [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetGravity")] public static extern Vec2 WorldGetGravity(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetHitEventThreshold")] + public static extern float WorldGetHitEventThreshold(WorldId worldId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetMaximumLinearSpeed")] + public static extern float WorldGetMaximumLinearSpeed(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetProfile")] public static extern Profile WorldGetProfile(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetRestitutionThreshold")] + public static extern float WorldGetRestitutionThreshold(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetSensorEvents")] public static extern SensorEvents WorldGetSensorEvents(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_GetUserData")] + public static extern void* WorldGetUserData(WorldId worldId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_IsContinuousEnabled")] + public static extern bool WorldIsContinuousEnabled(WorldId worldId); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_IsSleepingEnabled")] + public static extern bool WorldIsSleepingEnabled(WorldId worldId); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_IsValid")] public static extern bool WorldIsValid(WorldId id); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapAABB")] - public static extern void WorldOverlapAABB(WorldId worldId, AABB aabb, QueryFilter filter, delegate* unmanaged fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_IsWarmStartingEnabled")] + public static extern bool WorldIsWarmStartingEnabled(WorldId worldId); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapCapsule")] - public static extern void WorldOverlapCapsule(WorldId worldId, Capsule* capsule, Transform transform, QueryFilter filter, delegate* unmanaged fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapAABB")] + public static extern TreeStats WorldOverlapAABB(WorldId worldId, AABB aabb, QueryFilter filter, delegate* unmanaged fcn, void* context); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapCircle")] - public static extern void WorldOverlapCircle(WorldId worldId, Circle* circle, Transform transform, QueryFilter filter, delegate* unmanaged fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapShape")] + public static extern TreeStats WorldOverlapShape(WorldId worldId, ShapeProxy* proxy, QueryFilter filter, delegate* unmanaged fcn, void* context); - [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_OverlapPolygon")] - public static extern void WorldOverlapPolygon(WorldId worldId, Polygon* polygon, Transform transform, QueryFilter filter, delegate* unmanaged fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_RebuildStaticTree")] + public static extern void WorldRebuildStaticTree(WorldId worldId); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetContactTuning")] - public static extern void WorldSetContactTuning(WorldId worldId, float hertz, float dampingRatio, float pushVelocity); + public static extern void WorldSetContactTuning(WorldId worldId, float hertz, float dampingRatio, float pushSpeed); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetCustomFilterCallback")] public static extern void WorldSetCustomFilterCallback(WorldId worldId, delegate* unmanaged fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetFrictionCallback")] + public static extern void WorldSetFrictionCallback(WorldId worldId, delegate* unmanaged callback); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetGravity")] public static extern void WorldSetGravity(WorldId worldId, Vec2 gravity); [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetHitEventThreshold")] public static extern void WorldSetHitEventThreshold(WorldId worldId, float value); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetJointTuning")] + public static extern void WorldSetJointTuning(WorldId worldId, float hertz, float dampingRatio); + + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetMaximumLinearSpeed")] + public static extern void WorldSetMaximumLinearSpeed(WorldId worldId, float maximumLinearSpeed); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetPreSolveCallback")] public static extern void WorldSetPreSolveCallback(WorldId worldId, delegate* unmanaged fcn, void* context); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetRestitutionCallback")] + public static extern void WorldSetRestitutionCallback(WorldId worldId, delegate* unmanaged callback); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetRestitutionThreshold")] public static extern void WorldSetRestitutionThreshold(WorldId worldId, float value); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_SetUserData")] + public static extern void WorldSetUserData(WorldId worldId, void* userData); + [DllImport(BindgenInternal.DllImportPath, EntryPoint = "b2World_Step")] public static extern void WorldStep(WorldId worldId, float timeStep, int subStepCount); @@ -1293,7 +1482,7 @@ public enum HexColor : uint colorCyan = 65535, colorDarkBlue = 139, colorDarkCyan = 35723, - colorDarkGoldenrod = 12092939, + colorDarkGoldenRod = 12092939, colorDarkGray = 11119017, colorDarkGreen = 25600, colorDarkKhaki = 12433259, @@ -1312,27 +1501,18 @@ public enum HexColor : uint colorDeepSkyBlue = 49151, colorDimGray = 6908265, colorDodgerBlue = 2003199, - colorFirebrick = 11674146, + colorFireBrick = 11674146, colorFloralWhite = 16775920, colorForestGreen = 2263842, colorFuchsia = 16711935, colorGainsboro = 14474460, colorGhostWhite = 16316671, colorGold = 16766720, - colorGoldenrod = 14329120, - colorGray = 12500670, - colorGray1 = 1710618, - colorGray2 = 3355443, - colorGray3 = 5066061, - colorGray4 = 6710886, - colorGray5 = 8355711, - colorGray6 = 10066329, - colorGray7 = 11776947, - colorGray8 = 13421772, - colorGray9 = 15066597, - colorGreen = 65280, + colorGoldenRod = 14329120, + colorGray = 8421504, + colorGreen = 32768, colorGreenYellow = 11403055, - colorHoneydew = 15794160, + colorHoneyDew = 15794160, colorHotPink = 16738740, colorIndianRed = 13458524, colorIndigo = 4915330, @@ -1345,15 +1525,13 @@ public enum HexColor : uint colorLightBlue = 11393254, colorLightCoral = 15761536, colorLightCyan = 14745599, - colorLightGoldenrod = 15654274, - colorLightGoldenrodYellow = 16448210, + colorLightGoldenRodYellow = 16448210, colorLightGray = 13882323, colorLightGreen = 9498256, colorLightPink = 16758465, colorLightSalmon = 16752762, colorLightSeaGreen = 2142890, colorLightSkyBlue = 8900346, - colorLightSlateBlue = 8679679, colorLightSlateGray = 7833753, colorLightSteelBlue = 11584734, colorLightYellow = 16777184, @@ -1361,8 +1539,8 @@ public enum HexColor : uint colorLimeGreen = 3329330, colorLinen = 16445670, colorMagenta = 16711935, - colorMaroon = 11546720, - colorMediumAquamarine = 6737322, + colorMaroon = 8388608, + colorMediumAquaMarine = 6737322, colorMediumBlue = 205, colorMediumOrchid = 12211667, colorMediumPurple = 9662683, @@ -1377,14 +1555,13 @@ public enum HexColor : uint colorMoccasin = 16770229, colorNavajoWhite = 16768685, colorNavy = 128, - colorNavyBlue = 128, colorOldLace = 16643558, colorOlive = 8421376, colorOliveDrab = 7048739, colorOrange = 16753920, colorOrangeRed = 16729344, colorOrchid = 14315734, - colorPaleGoldenrod = 15657130, + colorPaleGoldenRod = 15657130, colorPaleGreen = 10025880, colorPaleTurquoise = 11529966, colorPaleVioletRed = 14381203, @@ -1394,7 +1571,7 @@ public enum HexColor : uint colorPink = 16761035, colorPlum = 14524637, colorPowderBlue = 11591910, - colorPurple = 10494192, + colorPurple = 8388736, colorRebeccaPurple = 6697881, colorRed = 16711680, colorRosyBrown = 12357519, @@ -1403,7 +1580,7 @@ public enum HexColor : uint colorSalmon = 16416882, colorSandyBrown = 16032864, colorSeaGreen = 3050327, - colorSeashell = 16774638, + colorSeaShell = 16774638, colorSienna = 10506797, colorSilver = 12632256, colorSkyBlue = 8900331, @@ -1418,7 +1595,6 @@ public enum HexColor : uint colorTomato = 16737095, colorTurquoise = 4251856, colorViolet = 15631086, - colorVioletRed = 13639824, colorWheat = 16113331, colorWhite = 16777215, colorWhiteSmoke = 16119285, @@ -1433,12 +1609,13 @@ public enum HexColor : uint public enum JointType : uint { distanceJoint = 0, - motorJoint = 1, - mouseJoint = 2, - prismaticJoint = 3, - revoluteJoint = 4, - weldJoint = 5, - wheelJoint = 6 + filterJoint = 1, + motorJoint = 2, + mouseJoint = 3, + prismaticJoint = 4, + revoluteJoint = 5, + weldJoint = 6, + wheelJoint = 7 } public enum ShapeType : uint @@ -1447,7 +1624,7 @@ public enum ShapeType : uint capsuleShape = 1, segmentShape = 2, polygonShape = 3, - smoothSegmentShape = 4, + chainSegmentShape = 4, shapeTypeCount = 5 } @@ -1514,7 +1691,7 @@ public enum TOIState : uint public const HexColor colorDarkCyan = HexColor.colorDarkCyan; - public const HexColor colorDarkGoldenrod = HexColor.colorDarkGoldenrod; + public const HexColor colorDarkGoldenRod = HexColor.colorDarkGoldenRod; public const HexColor colorDarkGray = HexColor.colorDarkGray; @@ -1552,7 +1729,7 @@ public enum TOIState : uint public const HexColor colorDodgerBlue = HexColor.colorDodgerBlue; - public const HexColor colorFirebrick = HexColor.colorFirebrick; + public const HexColor colorFireBrick = HexColor.colorFireBrick; public const HexColor colorFloralWhite = HexColor.colorFloralWhite; @@ -1566,33 +1743,15 @@ public enum TOIState : uint public const HexColor colorGold = HexColor.colorGold; - public const HexColor colorGoldenrod = HexColor.colorGoldenrod; + public const HexColor colorGoldenRod = HexColor.colorGoldenRod; public const HexColor colorGray = HexColor.colorGray; - public const HexColor colorGray1 = HexColor.colorGray1; - - public const HexColor colorGray2 = HexColor.colorGray2; - - public const HexColor colorGray3 = HexColor.colorGray3; - - public const HexColor colorGray4 = HexColor.colorGray4; - - public const HexColor colorGray5 = HexColor.colorGray5; - - public const HexColor colorGray6 = HexColor.colorGray6; - - public const HexColor colorGray7 = HexColor.colorGray7; - - public const HexColor colorGray8 = HexColor.colorGray8; - - public const HexColor colorGray9 = HexColor.colorGray9; - public const HexColor colorGreen = HexColor.colorGreen; public const HexColor colorGreenYellow = HexColor.colorGreenYellow; - public const HexColor colorHoneydew = HexColor.colorHoneydew; + public const HexColor colorHoneyDew = HexColor.colorHoneyDew; public const HexColor colorHotPink = HexColor.colorHotPink; @@ -1618,9 +1777,7 @@ public enum TOIState : uint public const HexColor colorLightCyan = HexColor.colorLightCyan; - public const HexColor colorLightGoldenrod = HexColor.colorLightGoldenrod; - - public const HexColor colorLightGoldenrodYellow = HexColor.colorLightGoldenrodYellow; + public const HexColor colorLightGoldenRodYellow = HexColor.colorLightGoldenRodYellow; public const HexColor colorLightGray = HexColor.colorLightGray; @@ -1634,8 +1791,6 @@ public enum TOIState : uint public const HexColor colorLightSkyBlue = HexColor.colorLightSkyBlue; - public const HexColor colorLightSlateBlue = HexColor.colorLightSlateBlue; - public const HexColor colorLightSlateGray = HexColor.colorLightSlateGray; public const HexColor colorLightSteelBlue = HexColor.colorLightSteelBlue; @@ -1652,7 +1807,7 @@ public enum TOIState : uint public const HexColor colorMaroon = HexColor.colorMaroon; - public const HexColor colorMediumAquamarine = HexColor.colorMediumAquamarine; + public const HexColor colorMediumAquaMarine = HexColor.colorMediumAquaMarine; public const HexColor colorMediumBlue = HexColor.colorMediumBlue; @@ -1682,8 +1837,6 @@ public enum TOIState : uint public const HexColor colorNavy = HexColor.colorNavy; - public const HexColor colorNavyBlue = HexColor.colorNavyBlue; - public const HexColor colorOldLace = HexColor.colorOldLace; public const HexColor colorOlive = HexColor.colorOlive; @@ -1696,7 +1849,7 @@ public enum TOIState : uint public const HexColor colorOrchid = HexColor.colorOrchid; - public const HexColor colorPaleGoldenrod = HexColor.colorPaleGoldenrod; + public const HexColor colorPaleGoldenRod = HexColor.colorPaleGoldenRod; public const HexColor colorPaleGreen = HexColor.colorPaleGreen; @@ -1734,7 +1887,7 @@ public enum TOIState : uint public const HexColor colorSeaGreen = HexColor.colorSeaGreen; - public const HexColor colorSeashell = HexColor.colorSeashell; + public const HexColor colorSeaShell = HexColor.colorSeaShell; public const HexColor colorSienna = HexColor.colorSienna; @@ -1764,8 +1917,6 @@ public enum TOIState : uint public const HexColor colorViolet = HexColor.colorViolet; - public const HexColor colorVioletRed = HexColor.colorVioletRed; - public const HexColor colorWheat = HexColor.colorWheat; public const HexColor colorWhite = HexColor.colorWhite; @@ -1786,6 +1937,8 @@ public enum TOIState : uint public const JointType distanceJoint = JointType.distanceJoint; + public const JointType filterJoint = JointType.filterJoint; + public const JointType motorJoint = JointType.motorJoint; public const JointType mouseJoint = JointType.mouseJoint; @@ -1806,7 +1959,7 @@ public enum TOIState : uint public const ShapeType polygonShape = ShapeType.polygonShape; - public const ShapeType smoothSegmentShape = ShapeType.smoothSegmentShape; + public const ShapeType chainSegmentShape = ShapeType.chainSegmentShape; public const ShapeType shapeTypeCount = ShapeType.shapeTypeCount; @@ -1829,18 +1982,18 @@ public partial struct Version public int revision; } - public partial struct Timer + public partial struct Vec2 { - public ulong start_sec; + public float x; - public ulong start_usec; + public float y; } - public partial struct Vec2 + public partial struct CosSin { - public float x; + public float cosine; - public float y; + public float sine; } public partial struct Rot @@ -1871,23 +2024,14 @@ public partial struct AABB public Vec2 upperBound; } - public partial struct Circle - { - public Vec2 center; - - public float radius; - } - - public partial struct Capsule + public partial struct Plane { - public Vec2 center1; - - public Vec2 center2; + public Vec2 normal; - public float radius; + public float offset; } - public partial struct DistanceCache + public partial struct SimplexCache { public ushort count; @@ -1896,37 +2040,6 @@ public partial struct DistanceCache public InlineArrays.byte_3 indexB; } - public partial struct Polygon - { - public InlineArrays.Vec2_8 vertices; - - public InlineArrays.Vec2_8 normals; - - public Vec2 centroid; - - public float radius; - - public int count; - } - - public partial struct Segment - { - public Vec2 point1; - - public Vec2 point2; - } - - public partial struct SmoothSegment - { - public Vec2 ghost1; - - public Segment segment; - - public Vec2 ghost2; - - public int chainId; - } - public partial struct Hull { public InlineArrays.Vec2_8 points; @@ -1943,17 +2056,24 @@ public partial struct RayCastInput public float maxFraction; } - public partial struct ShapeCastInput + public partial struct ShapeProxy { public InlineArrays.Vec2_8 points; public int count; - public float radius; + public float radius; + } + + public partial struct ShapeCastInput + { + public ShapeProxy proxy; public Vec2 translation; - public float maxFraction; + public float maxFraction; + + public bool canEncroach; } public partial struct CastOutput @@ -1978,6 +2098,53 @@ public partial struct MassData public float rotationalInertia; } + public partial struct Circle + { + public Vec2 center; + + public float radius; + } + + public partial struct Capsule + { + public Vec2 center1; + + public Vec2 center2; + + public float radius; + } + + public partial struct Polygon + { + public InlineArrays.Vec2_8 vertices; + + public InlineArrays.Vec2_8 normals; + + public Vec2 centroid; + + public float radius; + + public int count; + } + + public partial struct Segment + { + public Vec2 point1; + + public Vec2 point2; + } + + public partial struct ChainSegment + { + public Vec2 ghost1; + + public Segment segment; + + public Vec2 ghost2; + + public int chainId; + } + public partial struct SegmentDistanceResult { public Vec2 closest1; @@ -1991,20 +2158,11 @@ public partial struct SegmentDistanceResult public float distanceSquared; } - public partial struct DistanceProxy - { - public InlineArrays.Vec2_8 points; - - public int count; - - public float radius; - } - public partial struct DistanceInput { - public DistanceProxy proxyA; + public ShapeProxy proxyA; - public DistanceProxy proxyB; + public ShapeProxy proxyB; public Transform transformA; @@ -2019,6 +2177,8 @@ public partial struct DistanceOutput public Vec2 pointB; + public Vec2 normal; + public float distance; public int iterations; @@ -2054,9 +2214,9 @@ public partial struct Simplex public partial struct ShapeCastPairInput { - public DistanceProxy proxyA; + public ShapeProxy proxyA; - public DistanceProxy proxyB; + public ShapeProxy proxyB; public Transform transformA; @@ -2064,7 +2224,9 @@ public partial struct ShapeCastPairInput public Vec2 translationB; - public float maxFraction; + public float maxFraction; + + public bool canEncroach; } public partial struct Sweep @@ -2082,22 +2244,22 @@ public partial struct Sweep public partial struct TOIInput { - public DistanceProxy proxyA; + public ShapeProxy proxyA; - public DistanceProxy proxyB; + public ShapeProxy proxyB; public Sweep sweepA; public Sweep sweepB; - public float tMax; + public float maxFraction; } public partial struct TOIOutput { public TOIState state; - public float t; + public float fraction; } public partial struct ManifoldPoint @@ -2114,7 +2276,7 @@ public partial struct ManifoldPoint public float tangentImpulse; - public float maxNormalImpulse; + public float totalNormalImpulse; public float normalVelocity; @@ -2125,49 +2287,13 @@ public partial struct ManifoldPoint public partial struct Manifold { - public InlineArrays.ManifoldPoint_2 points; - public Vec2 normal; - public int pointCount; - } - - public partial struct TreeNode - { - public AABB aabb; - - public uint categoryBits; + public float rollingImpulse; - public TreeNode.AnonymousRecord_collision_L608_C2 TreeNode_AnonymousRecord_collision_L608_C2_Field; - - public int child1; - - public int child2; - - public int userData; - - public short height; - - public bool enlarged; - - public InlineArrays.byte_9 pad; - - public ref int parent => ref TreeNode_AnonymousRecord_collision_L608_C2_Field.parent; - - public ref int next => ref TreeNode_AnonymousRecord_collision_L608_C2_Field.next; - } - - public partial struct TreeNode - { - [StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)] - public partial struct AnonymousRecord_collision_L608_C2 - { - [System.Runtime.InteropServices.FieldOffset(0)] - public int parent; + public InlineArrays.ManifoldPoint_2 points; - [System.Runtime.InteropServices.FieldOffset(0)] - public int next; - } + public int pointCount; } public partial struct DynamicTree @@ -2195,11 +2321,47 @@ public partial struct DynamicTree public int rebuildCapacity; } + public partial struct TreeNode + { + } + + public partial struct TreeStats + { + public int nodeVisits; + + public int leafVisits; + } + + public partial struct PlaneResult + { + public Plane plane; + + public bool hit; + } + + public partial struct CollisionPlane + { + public Plane plane; + + public float pushLimit; + + public float push; + + public bool clipVelocity; + } + + public partial struct PlaneSolverResult + { + public Vec2 position; + + public int iterationCount; + } + public partial struct WorldId { public ushort index1; - public ushort revision; + public ushort generation; } public partial struct BodyId @@ -2208,7 +2370,7 @@ public partial struct BodyId public ushort world0; - public ushort revision; + public ushort generation; } public partial struct ShapeId @@ -2217,25 +2379,25 @@ public partial struct ShapeId public ushort world0; - public ushort revision; + public ushort generation; } - public partial struct JointId + public partial struct ChainId { public int index1; public ushort world0; - public ushort revision; + public ushort generation; } - public partial struct ChainId + public partial struct JointId { public int index1; public ushort world0; - public ushort revision; + public ushort generation; } public partial struct RayResult @@ -2248,6 +2410,10 @@ public partial struct RayResult public float fraction; + public int nodeVisits; + + public int leafVisits; + public bool hit; } @@ -2257,23 +2423,27 @@ public partial struct WorldDef public float restitutionThreshold; - public float contactPushoutVelocity; - public float hitEventThreshold; public float contactHertz; public float contactDampingRatio; + public float maxContactPushSpeed; + public float jointHertz; public float jointDampingRatio; - public float maximumLinearVelocity; + public float maximumLinearSpeed; + + public delegate* unmanaged frictionCallback; + + public delegate* unmanaged restitutionCallback; public bool enableSleep; - public bool enableContinous; + public bool enableContinuous; public int workerCount; @@ -2283,6 +2453,8 @@ public partial struct WorldDef public void* userTaskContext; + public void* userData; + public int internalValue; } @@ -2306,6 +2478,8 @@ public partial struct BodyDef public float sleepThreshold; + public byte* name; + public void* userData; public bool enableSleep; @@ -2318,8 +2492,6 @@ public partial struct BodyDef public bool isEnabled; - public bool automaticMass; - public bool allowFastRotation; public int internalValue; @@ -2327,34 +2499,45 @@ public partial struct BodyDef public partial struct Filter { - public uint categoryBits; + public ulong categoryBits; - public uint maskBits; + public ulong maskBits; public int groupIndex; } public partial struct QueryFilter { - public uint categoryBits; + public ulong categoryBits; - public uint maskBits; + public ulong maskBits; } - public partial struct ShapeDef + public partial struct SurfaceMaterial { - public void* userData; - public float friction; public float restitution; + public float rollingResistance; + + public float tangentSpeed; + + public int userMaterialId; + + public uint customColor; + } + + public partial struct ShapeDef + { + public void* userData; + + public SurfaceMaterial material; + public float density; public Filter filter; - public uint customColor; - public bool isSensor; public bool enableSensorEvents; @@ -2365,7 +2548,9 @@ public partial struct ShapeDef public bool enablePreSolveEvents; - public bool forceContactCreation; + public bool invokeContactCreation; + + public bool updateBodyMass; public int internalValue; } @@ -2378,14 +2563,16 @@ public partial struct ChainDef public int count; - public float friction; + public SurfaceMaterial* materials; - public float restitution; + public int materialCount; public Filter filter; public bool isLoop; + public bool enableSensorEvents; + public int internalValue; } @@ -2399,13 +2586,11 @@ public partial struct Profile public float solve; - public float buildIslands; - - public float solveConstraints; + public float mergeIslands; - public float prepareTasks; + public float prepareStages; - public float solverTasks; + public float solveConstraints; public float prepareConstraints; @@ -2413,33 +2598,33 @@ public partial struct Profile public float warmStart; - public float solveVelocities; + public float solveImpulses; public float integratePositions; - public float relaxVelocities; + public float relaxImpulses; public float applyRestitution; public float storeImpulses; - public float finalizeBodies; - public float splitIslands; - public float sleepIslands; + public float transforms; public float hitEvents; - public float broadphase; + public float refit; + + public float bullets; - public float continuous; + public float sleepIslands; + + public float sensors; } public partial struct Counters { - public int staticBodyCount; - public int bodyCount; public int shapeCount; @@ -2544,6 +2729,17 @@ public partial struct MouseJointDef public int internalValue; } + public partial struct FilterJointDef + { + public BodyId bodyIdA; + + public BodyId bodyIdB; + + public void* userData; + + public int internalValue; + } + public partial struct PrismaticJointDef { public BodyId bodyIdA; @@ -2686,6 +2882,19 @@ public partial struct WheelJointDef public int internalValue; } + public partial struct ExplosionDef + { + public ulong maskBits; + + public Vec2 position; + + public float radius; + + public float falloff; + + public float impulsePerLength; + } + public partial struct SensorBeginTouchEvent { public ShapeId sensorShapeId; @@ -2715,7 +2924,9 @@ public partial struct ContactBeginTouchEvent { public ShapeId shapeIdA; - public ShapeId shapeIdB; + public ShapeId shapeIdB; + + public Manifold manifold; } public partial struct ContactEndTouchEvent @@ -2782,25 +2993,23 @@ public partial struct ContactData public partial struct DebugDraw { - public delegate* unmanaged DrawPolygon; + public delegate* unmanaged DrawPolygonFcn; - public delegate* unmanaged DrawSolidPolygon; + public delegate* unmanaged DrawSolidPolygonFcn; - public delegate* unmanaged DrawCircle; + public delegate* unmanaged DrawCircleFcn; - public delegate* unmanaged DrawSolidCircle; + public delegate* unmanaged DrawSolidCircleFcn; - public delegate* unmanaged DrawCapsule; + public delegate* unmanaged DrawSolidCapsuleFcn; - public delegate* unmanaged DrawSolidCapsule; + public delegate* unmanaged DrawSegmentFcn; - public delegate* unmanaged DrawSegment; + public delegate* unmanaged DrawTransformFcn; - public delegate* unmanaged DrawTransform; + public delegate* unmanaged DrawPointFcn; - public delegate* unmanaged DrawPoint; - - public delegate* unmanaged DrawString; + public delegate* unmanaged DrawStringFcn; public AABB drawingBounds; @@ -2812,10 +3021,12 @@ public partial struct DebugDraw public bool drawJointExtras; - public bool drawAABBs; + public bool drawBounds; public bool drawMass; + public bool drawBodyNames; + public bool drawContacts; public bool drawGraphColors; @@ -2824,8 +3035,12 @@ public partial struct DebugDraw public bool drawContactImpulses; + public bool drawContactFeatures; + public bool drawFrictionImpulses; + public bool drawIslands; + public void* context; } @@ -2856,15 +3071,6 @@ public partial struct ManifoldPoint_2 } } - public partial struct InlineArrays - { - [InlineArray(9)] - public partial struct byte_9 - { - public byte Item0; - } - } - public partial struct InlineArrays { [InlineArray(12)] @@ -2874,13 +3080,15 @@ public partial struct int_12 } } - public const int defaultCategoryBits = 1; + public const int B2_DEFAULT_CATEGORY_BITS = 1; + + public const ulong B2_DEFAULT_MASK_BITS = 18446744073709551615; - public const uint defaultMaskBits = 4294967295; + public const int B2_HASH_INIT = 5381; - public const int maxPolygonVertices = 8; + public const int B2_MAX_POLYGON_VERTICES = 8; - public const float pi = 3.1415927f; + public const float B2_PI = 3.1415927f; public partial struct Version : IEquatable { @@ -2918,73 +3126,73 @@ public override int GetHashCode() } } - public partial struct Timer : IEquatable + public partial struct Vec2 : IEquatable { - public bool Equals(Timer other) + public bool Equals(Vec2 other) { - fixed (Timer* __self = &this) + fixed (Vec2* __self = &this) { - return new Span(__self, sizeof(Timer)).SequenceEqual(new Span(&other, sizeof(Timer))); + return new Span(__self, sizeof(Vec2)).SequenceEqual(new Span(&other, sizeof(Vec2))); } } public override bool Equals(object? obj) { - return obj is Timer other && Equals(other); + return obj is Vec2 other && Equals(other); } - public static bool operator ==(Timer left, Timer right) + public static bool operator ==(Vec2 left, Vec2 right) { return left.Equals(right); } - public static bool operator !=(Timer left, Timer right) + public static bool operator !=(Vec2 left, Vec2 right) { return !(left == right); } public override int GetHashCode() { - fixed (Timer* __self = &this) + fixed (Vec2* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Timer))); + hash.AddBytes(new Span(__self, sizeof(Vec2))); return hash.ToHashCode(); } } } - public partial struct Vec2 : IEquatable + public partial struct CosSin : IEquatable { - public bool Equals(Vec2 other) + public bool Equals(CosSin other) { - fixed (Vec2* __self = &this) + fixed (CosSin* __self = &this) { - return new Span(__self, sizeof(Vec2)).SequenceEqual(new Span(&other, sizeof(Vec2))); + return new Span(__self, sizeof(CosSin)).SequenceEqual(new Span(&other, sizeof(CosSin))); } } public override bool Equals(object? obj) { - return obj is Vec2 other && Equals(other); + return obj is CosSin other && Equals(other); } - public static bool operator ==(Vec2 left, Vec2 right) + public static bool operator ==(CosSin left, CosSin right) { return left.Equals(right); } - public static bool operator !=(Vec2 left, Vec2 right) + public static bool operator !=(CosSin left, CosSin right) { return !(left == right); } public override int GetHashCode() { - fixed (Vec2* __self = &this) + fixed (CosSin* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Vec2))); + hash.AddBytes(new Span(__self, sizeof(CosSin))); return hash.ToHashCode(); } } @@ -3134,469 +3342,505 @@ public override int GetHashCode() } } - public partial struct Circle : IEquatable + public partial struct Plane : IEquatable { - public bool Equals(Circle other) + public bool Equals(Plane other) { - fixed (Circle* __self = &this) + fixed (Plane* __self = &this) { - return new Span(__self, sizeof(Circle)).SequenceEqual(new Span(&other, sizeof(Circle))); + return new Span(__self, sizeof(Plane)).SequenceEqual(new Span(&other, sizeof(Plane))); } } public override bool Equals(object? obj) { - return obj is Circle other && Equals(other); + return obj is Plane other && Equals(other); } - public static bool operator ==(Circle left, Circle right) + public static bool operator ==(Plane left, Plane right) { return left.Equals(right); } - public static bool operator !=(Circle left, Circle right) + public static bool operator !=(Plane left, Plane right) { return !(left == right); } public override int GetHashCode() { - fixed (Circle* __self = &this) + fixed (Plane* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Circle))); + hash.AddBytes(new Span(__self, sizeof(Plane))); return hash.ToHashCode(); } } } - public partial struct Capsule : IEquatable + public partial struct SimplexCache : IEquatable { - public bool Equals(Capsule other) + public bool Equals(SimplexCache other) { - fixed (Capsule* __self = &this) + fixed (SimplexCache* __self = &this) { - return new Span(__self, sizeof(Capsule)).SequenceEqual(new Span(&other, sizeof(Capsule))); + return new Span(__self, sizeof(SimplexCache)).SequenceEqual(new Span(&other, sizeof(SimplexCache))); } } public override bool Equals(object? obj) { - return obj is Capsule other && Equals(other); + return obj is SimplexCache other && Equals(other); } - public static bool operator ==(Capsule left, Capsule right) + public static bool operator ==(SimplexCache left, SimplexCache right) { return left.Equals(right); } - public static bool operator !=(Capsule left, Capsule right) + public static bool operator !=(SimplexCache left, SimplexCache right) { return !(left == right); } public override int GetHashCode() { - fixed (Capsule* __self = &this) + fixed (SimplexCache* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Capsule))); + hash.AddBytes(new Span(__self, sizeof(SimplexCache))); return hash.ToHashCode(); } } } - public partial struct DistanceCache : IEquatable + public partial struct Hull : IEquatable { - public bool Equals(DistanceCache other) + public bool Equals(Hull other) { - fixed (DistanceCache* __self = &this) + fixed (Hull* __self = &this) { - return new Span(__self, sizeof(DistanceCache)).SequenceEqual(new Span(&other, sizeof(DistanceCache))); + return new Span(__self, sizeof(Hull)).SequenceEqual(new Span(&other, sizeof(Hull))); } } public override bool Equals(object? obj) { - return obj is DistanceCache other && Equals(other); + return obj is Hull other && Equals(other); } - public static bool operator ==(DistanceCache left, DistanceCache right) + public static bool operator ==(Hull left, Hull right) { return left.Equals(right); } - public static bool operator !=(DistanceCache left, DistanceCache right) + public static bool operator !=(Hull left, Hull right) { return !(left == right); } public override int GetHashCode() { - fixed (DistanceCache* __self = &this) + fixed (Hull* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(DistanceCache))); + hash.AddBytes(new Span(__self, sizeof(Hull))); return hash.ToHashCode(); } } } - public partial struct Polygon : IEquatable + public partial struct RayCastInput : IEquatable { - public bool Equals(Polygon other) + public bool Equals(RayCastInput other) { - fixed (Polygon* __self = &this) + fixed (RayCastInput* __self = &this) { - return new Span(__self, sizeof(Polygon)).SequenceEqual(new Span(&other, sizeof(Polygon))); + return new Span(__self, sizeof(RayCastInput)).SequenceEqual(new Span(&other, sizeof(RayCastInput))); } } public override bool Equals(object? obj) { - return obj is Polygon other && Equals(other); + return obj is RayCastInput other && Equals(other); } - public static bool operator ==(Polygon left, Polygon right) + public static bool operator ==(RayCastInput left, RayCastInput right) { return left.Equals(right); } - public static bool operator !=(Polygon left, Polygon right) + public static bool operator !=(RayCastInput left, RayCastInput right) { return !(left == right); } public override int GetHashCode() { - fixed (Polygon* __self = &this) + fixed (RayCastInput* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Polygon))); + hash.AddBytes(new Span(__self, sizeof(RayCastInput))); return hash.ToHashCode(); } } } - public partial struct Segment : IEquatable + public partial struct ShapeProxy : IEquatable { - public bool Equals(Segment other) + public bool Equals(ShapeProxy other) { - fixed (Segment* __self = &this) + fixed (ShapeProxy* __self = &this) { - return new Span(__self, sizeof(Segment)).SequenceEqual(new Span(&other, sizeof(Segment))); + return new Span(__self, sizeof(ShapeProxy)).SequenceEqual(new Span(&other, sizeof(ShapeProxy))); } } public override bool Equals(object? obj) { - return obj is Segment other && Equals(other); + return obj is ShapeProxy other && Equals(other); } - public static bool operator ==(Segment left, Segment right) + public static bool operator ==(ShapeProxy left, ShapeProxy right) { return left.Equals(right); } - public static bool operator !=(Segment left, Segment right) + public static bool operator !=(ShapeProxy left, ShapeProxy right) { return !(left == right); } public override int GetHashCode() { - fixed (Segment* __self = &this) + fixed (ShapeProxy* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Segment))); + hash.AddBytes(new Span(__self, sizeof(ShapeProxy))); return hash.ToHashCode(); } } } - public partial struct SmoothSegment : IEquatable + public partial struct ShapeCastInput : IEquatable { - public bool Equals(SmoothSegment other) + public bool Equals(ShapeCastInput other) { - fixed (SmoothSegment* __self = &this) + fixed (ShapeCastInput* __self = &this) { - return new Span(__self, sizeof(SmoothSegment)).SequenceEqual(new Span(&other, sizeof(SmoothSegment))); + return new Span(__self, sizeof(ShapeCastInput)).SequenceEqual(new Span(&other, sizeof(ShapeCastInput))); } } public override bool Equals(object? obj) { - return obj is SmoothSegment other && Equals(other); + return obj is ShapeCastInput other && Equals(other); } - public static bool operator ==(SmoothSegment left, SmoothSegment right) + public static bool operator ==(ShapeCastInput left, ShapeCastInput right) { return left.Equals(right); } - public static bool operator !=(SmoothSegment left, SmoothSegment right) + public static bool operator !=(ShapeCastInput left, ShapeCastInput right) { return !(left == right); } public override int GetHashCode() { - fixed (SmoothSegment* __self = &this) + fixed (ShapeCastInput* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(SmoothSegment))); + hash.AddBytes(new Span(__self, sizeof(ShapeCastInput))); return hash.ToHashCode(); } } } - public partial struct Hull : IEquatable + public partial struct CastOutput : IEquatable { - public bool Equals(Hull other) + public bool Equals(CastOutput other) { - fixed (Hull* __self = &this) + fixed (CastOutput* __self = &this) { - return new Span(__self, sizeof(Hull)).SequenceEqual(new Span(&other, sizeof(Hull))); + return new Span(__self, sizeof(CastOutput)).SequenceEqual(new Span(&other, sizeof(CastOutput))); } } public override bool Equals(object? obj) { - return obj is Hull other && Equals(other); + return obj is CastOutput other && Equals(other); } - public static bool operator ==(Hull left, Hull right) + public static bool operator ==(CastOutput left, CastOutput right) { return left.Equals(right); } - public static bool operator !=(Hull left, Hull right) + public static bool operator !=(CastOutput left, CastOutput right) { return !(left == right); } public override int GetHashCode() { - fixed (Hull* __self = &this) + fixed (CastOutput* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Hull))); + hash.AddBytes(new Span(__self, sizeof(CastOutput))); return hash.ToHashCode(); } } } - public partial struct RayCastInput : IEquatable + public partial struct MassData : IEquatable { - public bool Equals(RayCastInput other) + public bool Equals(MassData other) { - fixed (RayCastInput* __self = &this) + fixed (MassData* __self = &this) { - return new Span(__self, sizeof(RayCastInput)).SequenceEqual(new Span(&other, sizeof(RayCastInput))); + return new Span(__self, sizeof(MassData)).SequenceEqual(new Span(&other, sizeof(MassData))); } } public override bool Equals(object? obj) { - return obj is RayCastInput other && Equals(other); + return obj is MassData other && Equals(other); } - public static bool operator ==(RayCastInput left, RayCastInput right) + public static bool operator ==(MassData left, MassData right) { return left.Equals(right); } - public static bool operator !=(RayCastInput left, RayCastInput right) + public static bool operator !=(MassData left, MassData right) { return !(left == right); } public override int GetHashCode() { - fixed (RayCastInput* __self = &this) + fixed (MassData* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(RayCastInput))); + hash.AddBytes(new Span(__self, sizeof(MassData))); return hash.ToHashCode(); } } } - public partial struct ShapeCastInput : IEquatable + public partial struct Circle : IEquatable { - public bool Equals(ShapeCastInput other) + public bool Equals(Circle other) { - fixed (ShapeCastInput* __self = &this) + fixed (Circle* __self = &this) { - return new Span(__self, sizeof(ShapeCastInput)).SequenceEqual(new Span(&other, sizeof(ShapeCastInput))); + return new Span(__self, sizeof(Circle)).SequenceEqual(new Span(&other, sizeof(Circle))); } } public override bool Equals(object? obj) { - return obj is ShapeCastInput other && Equals(other); + return obj is Circle other && Equals(other); } - public static bool operator ==(ShapeCastInput left, ShapeCastInput right) + public static bool operator ==(Circle left, Circle right) { return left.Equals(right); } - public static bool operator !=(ShapeCastInput left, ShapeCastInput right) + public static bool operator !=(Circle left, Circle right) { return !(left == right); } public override int GetHashCode() { - fixed (ShapeCastInput* __self = &this) + fixed (Circle* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ShapeCastInput))); + hash.AddBytes(new Span(__self, sizeof(Circle))); return hash.ToHashCode(); } } } - public partial struct CastOutput : IEquatable + public partial struct Capsule : IEquatable { - public bool Equals(CastOutput other) + public bool Equals(Capsule other) { - fixed (CastOutput* __self = &this) + fixed (Capsule* __self = &this) { - return new Span(__self, sizeof(CastOutput)).SequenceEqual(new Span(&other, sizeof(CastOutput))); + return new Span(__self, sizeof(Capsule)).SequenceEqual(new Span(&other, sizeof(Capsule))); } } public override bool Equals(object? obj) { - return obj is CastOutput other && Equals(other); + return obj is Capsule other && Equals(other); } - public static bool operator ==(CastOutput left, CastOutput right) + public static bool operator ==(Capsule left, Capsule right) { return left.Equals(right); } - public static bool operator !=(CastOutput left, CastOutput right) + public static bool operator !=(Capsule left, Capsule right) { return !(left == right); } public override int GetHashCode() { - fixed (CastOutput* __self = &this) + fixed (Capsule* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(CastOutput))); + hash.AddBytes(new Span(__self, sizeof(Capsule))); return hash.ToHashCode(); } } } - public partial struct MassData : IEquatable + public partial struct Polygon : IEquatable { - public bool Equals(MassData other) + public bool Equals(Polygon other) { - fixed (MassData* __self = &this) + fixed (Polygon* __self = &this) { - return new Span(__self, sizeof(MassData)).SequenceEqual(new Span(&other, sizeof(MassData))); + return new Span(__self, sizeof(Polygon)).SequenceEqual(new Span(&other, sizeof(Polygon))); } } public override bool Equals(object? obj) { - return obj is MassData other && Equals(other); + return obj is Polygon other && Equals(other); } - public static bool operator ==(MassData left, MassData right) + public static bool operator ==(Polygon left, Polygon right) { return left.Equals(right); } - public static bool operator !=(MassData left, MassData right) + public static bool operator !=(Polygon left, Polygon right) { return !(left == right); } public override int GetHashCode() { - fixed (MassData* __self = &this) + fixed (Polygon* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(MassData))); + hash.AddBytes(new Span(__self, sizeof(Polygon))); return hash.ToHashCode(); } } } - public partial struct SegmentDistanceResult : IEquatable + public partial struct Segment : IEquatable { - public bool Equals(SegmentDistanceResult other) + public bool Equals(Segment other) { - fixed (SegmentDistanceResult* __self = &this) + fixed (Segment* __self = &this) { - return new Span(__self, sizeof(SegmentDistanceResult)).SequenceEqual(new Span(&other, sizeof(SegmentDistanceResult))); + return new Span(__self, sizeof(Segment)).SequenceEqual(new Span(&other, sizeof(Segment))); } } public override bool Equals(object? obj) { - return obj is SegmentDistanceResult other && Equals(other); + return obj is Segment other && Equals(other); } - public static bool operator ==(SegmentDistanceResult left, SegmentDistanceResult right) + public static bool operator ==(Segment left, Segment right) { return left.Equals(right); } - public static bool operator !=(SegmentDistanceResult left, SegmentDistanceResult right) + public static bool operator !=(Segment left, Segment right) { return !(left == right); } public override int GetHashCode() { - fixed (SegmentDistanceResult* __self = &this) + fixed (Segment* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(SegmentDistanceResult))); + hash.AddBytes(new Span(__self, sizeof(Segment))); return hash.ToHashCode(); } } } - public partial struct DistanceProxy : IEquatable + public partial struct ChainSegment : IEquatable { - public bool Equals(DistanceProxy other) + public bool Equals(ChainSegment other) { - fixed (DistanceProxy* __self = &this) + fixed (ChainSegment* __self = &this) { - return new Span(__self, sizeof(DistanceProxy)).SequenceEqual(new Span(&other, sizeof(DistanceProxy))); + return new Span(__self, sizeof(ChainSegment)).SequenceEqual(new Span(&other, sizeof(ChainSegment))); } } public override bool Equals(object? obj) { - return obj is DistanceProxy other && Equals(other); + return obj is ChainSegment other && Equals(other); } - public static bool operator ==(DistanceProxy left, DistanceProxy right) + public static bool operator ==(ChainSegment left, ChainSegment right) { return left.Equals(right); } - public static bool operator !=(DistanceProxy left, DistanceProxy right) + public static bool operator !=(ChainSegment left, ChainSegment right) { return !(left == right); } public override int GetHashCode() { - fixed (DistanceProxy* __self = &this) + fixed (ChainSegment* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(DistanceProxy))); + hash.AddBytes(new Span(__self, sizeof(ChainSegment))); + return hash.ToHashCode(); + } + } + } + + public partial struct SegmentDistanceResult : IEquatable + { + public bool Equals(SegmentDistanceResult other) + { + fixed (SegmentDistanceResult* __self = &this) + { + return new Span(__self, sizeof(SegmentDistanceResult)).SequenceEqual(new Span(&other, sizeof(SegmentDistanceResult))); + } + } + + public override bool Equals(object? obj) + { + return obj is SegmentDistanceResult other && Equals(other); + } + + public static bool operator ==(SegmentDistanceResult left, SegmentDistanceResult right) + { + return left.Equals(right); + } + + public static bool operator !=(SegmentDistanceResult left, SegmentDistanceResult right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (SegmentDistanceResult* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(SegmentDistanceResult))); return hash.ToHashCode(); } } @@ -3802,272 +4046,377 @@ public override bool Equals(object? obj) return left.Equals(right); } - public static bool operator !=(Sweep left, Sweep right) + public static bool operator !=(Sweep left, Sweep right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (Sweep* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(Sweep))); + return hash.ToHashCode(); + } + } + } + + public partial struct TOIInput : IEquatable + { + public bool Equals(TOIInput other) + { + fixed (TOIInput* __self = &this) + { + return new Span(__self, sizeof(TOIInput)).SequenceEqual(new Span(&other, sizeof(TOIInput))); + } + } + + public override bool Equals(object? obj) + { + return obj is TOIInput other && Equals(other); + } + + public static bool operator ==(TOIInput left, TOIInput right) + { + return left.Equals(right); + } + + public static bool operator !=(TOIInput left, TOIInput right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (TOIInput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(TOIInput))); + return hash.ToHashCode(); + } + } + } + + public partial struct TOIOutput : IEquatable + { + public bool Equals(TOIOutput other) + { + fixed (TOIOutput* __self = &this) + { + return new Span(__self, sizeof(TOIOutput)).SequenceEqual(new Span(&other, sizeof(TOIOutput))); + } + } + + public override bool Equals(object? obj) + { + return obj is TOIOutput other && Equals(other); + } + + public static bool operator ==(TOIOutput left, TOIOutput right) + { + return left.Equals(right); + } + + public static bool operator !=(TOIOutput left, TOIOutput right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (TOIOutput* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(TOIOutput))); + return hash.ToHashCode(); + } + } + } + + public partial struct ManifoldPoint : IEquatable + { + public bool Equals(ManifoldPoint other) + { + fixed (ManifoldPoint* __self = &this) + { + return new Span(__self, sizeof(ManifoldPoint)).SequenceEqual(new Span(&other, sizeof(ManifoldPoint))); + } + } + + public override bool Equals(object? obj) + { + return obj is ManifoldPoint other && Equals(other); + } + + public static bool operator ==(ManifoldPoint left, ManifoldPoint right) + { + return left.Equals(right); + } + + public static bool operator !=(ManifoldPoint left, ManifoldPoint right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ManifoldPoint* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ManifoldPoint))); + return hash.ToHashCode(); + } + } + } + + public partial struct Manifold : IEquatable + { + public bool Equals(Manifold other) + { + fixed (Manifold* __self = &this) + { + return new Span(__self, sizeof(Manifold)).SequenceEqual(new Span(&other, sizeof(Manifold))); + } + } + + public override bool Equals(object? obj) + { + return obj is Manifold other && Equals(other); + } + + public static bool operator ==(Manifold left, Manifold right) + { + return left.Equals(right); + } + + public static bool operator !=(Manifold left, Manifold right) { return !(left == right); } public override int GetHashCode() { - fixed (Sweep* __self = &this) + fixed (Manifold* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Sweep))); + hash.AddBytes(new Span(__self, sizeof(Manifold))); return hash.ToHashCode(); } } } - public partial struct TOIInput : IEquatable + public partial struct DynamicTree : IEquatable { - public bool Equals(TOIInput other) + public bool Equals(DynamicTree other) { - fixed (TOIInput* __self = &this) + fixed (DynamicTree* __self = &this) { - return new Span(__self, sizeof(TOIInput)).SequenceEqual(new Span(&other, sizeof(TOIInput))); + return new Span(__self, sizeof(DynamicTree)).SequenceEqual(new Span(&other, sizeof(DynamicTree))); } } public override bool Equals(object? obj) { - return obj is TOIInput other && Equals(other); + return obj is DynamicTree other && Equals(other); } - public static bool operator ==(TOIInput left, TOIInput right) + public static bool operator ==(DynamicTree left, DynamicTree right) { return left.Equals(right); } - public static bool operator !=(TOIInput left, TOIInput right) + public static bool operator !=(DynamicTree left, DynamicTree right) { return !(left == right); } public override int GetHashCode() { - fixed (TOIInput* __self = &this) + fixed (DynamicTree* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(TOIInput))); + hash.AddBytes(new Span(__self, sizeof(DynamicTree))); return hash.ToHashCode(); } } } - public partial struct TOIOutput : IEquatable + public partial struct TreeNode : IEquatable { - public bool Equals(TOIOutput other) + public bool Equals(TreeNode other) { - fixed (TOIOutput* __self = &this) + fixed (TreeNode* __self = &this) { - return new Span(__self, sizeof(TOIOutput)).SequenceEqual(new Span(&other, sizeof(TOIOutput))); + return new Span(__self, sizeof(TreeNode)).SequenceEqual(new Span(&other, sizeof(TreeNode))); } } public override bool Equals(object? obj) { - return obj is TOIOutput other && Equals(other); + return obj is TreeNode other && Equals(other); } - public static bool operator ==(TOIOutput left, TOIOutput right) + public static bool operator ==(TreeNode left, TreeNode right) { return left.Equals(right); } - public static bool operator !=(TOIOutput left, TOIOutput right) + public static bool operator !=(TreeNode left, TreeNode right) { return !(left == right); } public override int GetHashCode() { - fixed (TOIOutput* __self = &this) + fixed (TreeNode* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(TOIOutput))); + hash.AddBytes(new Span(__self, sizeof(TreeNode))); return hash.ToHashCode(); } } } - public partial struct ManifoldPoint : IEquatable + public partial struct TreeStats : IEquatable { - public bool Equals(ManifoldPoint other) + public bool Equals(TreeStats other) { - fixed (ManifoldPoint* __self = &this) + fixed (TreeStats* __self = &this) { - return new Span(__self, sizeof(ManifoldPoint)).SequenceEqual(new Span(&other, sizeof(ManifoldPoint))); + return new Span(__self, sizeof(TreeStats)).SequenceEqual(new Span(&other, sizeof(TreeStats))); } } public override bool Equals(object? obj) { - return obj is ManifoldPoint other && Equals(other); + return obj is TreeStats other && Equals(other); } - public static bool operator ==(ManifoldPoint left, ManifoldPoint right) + public static bool operator ==(TreeStats left, TreeStats right) { return left.Equals(right); } - public static bool operator !=(ManifoldPoint left, ManifoldPoint right) + public static bool operator !=(TreeStats left, TreeStats right) { return !(left == right); } public override int GetHashCode() { - fixed (ManifoldPoint* __self = &this) + fixed (TreeStats* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ManifoldPoint))); + hash.AddBytes(new Span(__self, sizeof(TreeStats))); return hash.ToHashCode(); } } } - public partial struct Manifold : IEquatable + public partial struct PlaneResult : IEquatable { - public bool Equals(Manifold other) + public bool Equals(PlaneResult other) { - fixed (Manifold* __self = &this) + fixed (PlaneResult* __self = &this) { - return new Span(__self, sizeof(Manifold)).SequenceEqual(new Span(&other, sizeof(Manifold))); + return new Span(__self, sizeof(PlaneResult)).SequenceEqual(new Span(&other, sizeof(PlaneResult))); } } public override bool Equals(object? obj) { - return obj is Manifold other && Equals(other); + return obj is PlaneResult other && Equals(other); } - public static bool operator ==(Manifold left, Manifold right) + public static bool operator ==(PlaneResult left, PlaneResult right) { return left.Equals(right); } - public static bool operator !=(Manifold left, Manifold right) + public static bool operator !=(PlaneResult left, PlaneResult right) { return !(left == right); } public override int GetHashCode() { - fixed (Manifold* __self = &this) + fixed (PlaneResult* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(Manifold))); + hash.AddBytes(new Span(__self, sizeof(PlaneResult))); return hash.ToHashCode(); } } } - public partial struct TreeNode : IEquatable + public partial struct CollisionPlane : IEquatable { - public bool Equals(TreeNode other) + public bool Equals(CollisionPlane other) { - fixed (TreeNode* __self = &this) + fixed (CollisionPlane* __self = &this) { - return new Span(__self, sizeof(TreeNode)).SequenceEqual(new Span(&other, sizeof(TreeNode))); + return new Span(__self, sizeof(CollisionPlane)).SequenceEqual(new Span(&other, sizeof(CollisionPlane))); } } public override bool Equals(object? obj) { - return obj is TreeNode other && Equals(other); + return obj is CollisionPlane other && Equals(other); } - public static bool operator ==(TreeNode left, TreeNode right) + public static bool operator ==(CollisionPlane left, CollisionPlane right) { return left.Equals(right); } - public static bool operator !=(TreeNode left, TreeNode right) + public static bool operator !=(CollisionPlane left, CollisionPlane right) { return !(left == right); } public override int GetHashCode() { - fixed (TreeNode* __self = &this) + fixed (CollisionPlane* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(TreeNode))); + hash.AddBytes(new Span(__self, sizeof(CollisionPlane))); return hash.ToHashCode(); } } } - public partial struct TreeNode - { - public partial struct AnonymousRecord_collision_L608_C2 : IEquatable - { - public bool Equals(AnonymousRecord_collision_L608_C2 other) - { - fixed (AnonymousRecord_collision_L608_C2* __self = &this) - { - return new Span(__self, sizeof(AnonymousRecord_collision_L608_C2)).SequenceEqual(new Span(&other, sizeof(AnonymousRecord_collision_L608_C2))); - } - } - - public override bool Equals(object? obj) - { - return obj is AnonymousRecord_collision_L608_C2 other && Equals(other); - } - - public static bool operator ==(AnonymousRecord_collision_L608_C2 left, AnonymousRecord_collision_L608_C2 right) - { - return left.Equals(right); - } - - public static bool operator !=(AnonymousRecord_collision_L608_C2 left, AnonymousRecord_collision_L608_C2 right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (AnonymousRecord_collision_L608_C2* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(AnonymousRecord_collision_L608_C2))); - return hash.ToHashCode(); - } - } - } - } - - public partial struct DynamicTree : IEquatable + public partial struct PlaneSolverResult : IEquatable { - public bool Equals(DynamicTree other) + public bool Equals(PlaneSolverResult other) { - fixed (DynamicTree* __self = &this) + fixed (PlaneSolverResult* __self = &this) { - return new Span(__self, sizeof(DynamicTree)).SequenceEqual(new Span(&other, sizeof(DynamicTree))); + return new Span(__self, sizeof(PlaneSolverResult)).SequenceEqual(new Span(&other, sizeof(PlaneSolverResult))); } } public override bool Equals(object? obj) { - return obj is DynamicTree other && Equals(other); + return obj is PlaneSolverResult other && Equals(other); } - public static bool operator ==(DynamicTree left, DynamicTree right) + public static bool operator ==(PlaneSolverResult left, PlaneSolverResult right) { return left.Equals(right); } - public static bool operator !=(DynamicTree left, DynamicTree right) + public static bool operator !=(PlaneSolverResult left, PlaneSolverResult right) { return !(left == right); } public override int GetHashCode() { - fixed (DynamicTree* __self = &this) + fixed (PlaneSolverResult* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(DynamicTree))); + hash.AddBytes(new Span(__self, sizeof(PlaneSolverResult))); return hash.ToHashCode(); } } @@ -4181,73 +4530,73 @@ public override int GetHashCode() } } - public partial struct JointId : IEquatable + public partial struct ChainId : IEquatable { - public bool Equals(JointId other) + public bool Equals(ChainId other) { - fixed (JointId* __self = &this) + fixed (ChainId* __self = &this) { - return new Span(__self, sizeof(JointId)).SequenceEqual(new Span(&other, sizeof(JointId))); + return new Span(__self, sizeof(ChainId)).SequenceEqual(new Span(&other, sizeof(ChainId))); } } public override bool Equals(object? obj) { - return obj is JointId other && Equals(other); + return obj is ChainId other && Equals(other); } - public static bool operator ==(JointId left, JointId right) + public static bool operator ==(ChainId left, ChainId right) { return left.Equals(right); } - public static bool operator !=(JointId left, JointId right) + public static bool operator !=(ChainId left, ChainId right) { return !(left == right); } public override int GetHashCode() { - fixed (JointId* __self = &this) + fixed (ChainId* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(JointId))); + hash.AddBytes(new Span(__self, sizeof(ChainId))); return hash.ToHashCode(); } } } - public partial struct ChainId : IEquatable + public partial struct JointId : IEquatable { - public bool Equals(ChainId other) + public bool Equals(JointId other) { - fixed (ChainId* __self = &this) + fixed (JointId* __self = &this) { - return new Span(__self, sizeof(ChainId)).SequenceEqual(new Span(&other, sizeof(ChainId))); + return new Span(__self, sizeof(JointId)).SequenceEqual(new Span(&other, sizeof(JointId))); } } public override bool Equals(object? obj) { - return obj is ChainId other && Equals(other); + return obj is JointId other && Equals(other); } - public static bool operator ==(ChainId left, ChainId right) + public static bool operator ==(JointId left, JointId right) { return left.Equals(right); } - public static bool operator !=(ChainId left, ChainId right) + public static bool operator !=(JointId left, JointId right) { return !(left == right); } public override int GetHashCode() { - fixed (ChainId* __self = &this) + fixed (JointId* __self = &this) { HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(ChainId))); + hash.AddBytes(new Span(__self, sizeof(JointId))); return hash.ToHashCode(); } } @@ -4433,6 +4782,42 @@ public override int GetHashCode() } } + public partial struct SurfaceMaterial : IEquatable + { + public bool Equals(SurfaceMaterial other) + { + fixed (SurfaceMaterial* __self = &this) + { + return new Span(__self, sizeof(SurfaceMaterial)).SequenceEqual(new Span(&other, sizeof(SurfaceMaterial))); + } + } + + public override bool Equals(object? obj) + { + return obj is SurfaceMaterial other && Equals(other); + } + + public static bool operator ==(SurfaceMaterial left, SurfaceMaterial right) + { + return left.Equals(right); + } + + public static bool operator !=(SurfaceMaterial left, SurfaceMaterial right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (SurfaceMaterial* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(SurfaceMaterial))); + return hash.ToHashCode(); + } + } + } + public partial struct ShapeDef : IEquatable { public bool Equals(ShapeDef other) @@ -4685,6 +5070,42 @@ public override int GetHashCode() } } + public partial struct FilterJointDef : IEquatable + { + public bool Equals(FilterJointDef other) + { + fixed (FilterJointDef* __self = &this) + { + return new Span(__self, sizeof(FilterJointDef)).SequenceEqual(new Span(&other, sizeof(FilterJointDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is FilterJointDef other && Equals(other); + } + + public static bool operator ==(FilterJointDef left, FilterJointDef right) + { + return left.Equals(right); + } + + public static bool operator !=(FilterJointDef left, FilterJointDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (FilterJointDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(FilterJointDef))); + return hash.ToHashCode(); + } + } + } + public partial struct PrismaticJointDef : IEquatable { public bool Equals(PrismaticJointDef other) @@ -4829,6 +5250,42 @@ public override int GetHashCode() } } + public partial struct ExplosionDef : IEquatable + { + public bool Equals(ExplosionDef other) + { + fixed (ExplosionDef* __self = &this) + { + return new Span(__self, sizeof(ExplosionDef)).SequenceEqual(new Span(&other, sizeof(ExplosionDef))); + } + } + + public override bool Equals(object? obj) + { + return obj is ExplosionDef other && Equals(other); + } + + public static bool operator ==(ExplosionDef left, ExplosionDef right) + { + return left.Equals(right); + } + + public static bool operator !=(ExplosionDef left, ExplosionDef right) + { + return !(left == right); + } + + public override int GetHashCode() + { + fixed (ExplosionDef* __self = &this) + { + HashCode hash = new(); + hash.AddBytes(new Span(__self, sizeof(ExplosionDef))); + return hash.ToHashCode(); + } + } + } + public partial struct SensorBeginTouchEvent : IEquatable { public bool Equals(SensorBeginTouchEvent other) @@ -5342,45 +5799,6 @@ public override int GetHashCode() } } - public partial struct InlineArrays - { - public partial struct byte_9 : IEquatable - { - public bool Equals(byte_9 other) - { - fixed (byte_9* __self = &this) - { - return new Span(__self, sizeof(byte_9)).SequenceEqual(new Span(&other, sizeof(byte_9))); - } - } - - public override bool Equals(object? obj) - { - return obj is byte_9 other && Equals(other); - } - - public static bool operator ==(byte_9 left, byte_9 right) - { - return left.Equals(right); - } - - public static bool operator !=(byte_9 left, byte_9 right) - { - return !(left == right); - } - - public override int GetHashCode() - { - fixed (byte_9* __self = &this) - { - HashCode hash = new(); - hash.AddBytes(new Span(__self, sizeof(byte_9))); - return hash.ToHashCode(); - } - } - } - } - public partial struct InlineArrays { public partial struct int_12 : IEquatable diff --git a/Box2D.NET.Examples/CSharp/HelloWorld.cs b/Box2D.NET.Examples/CSharp/HelloWorld.cs index 33ab63b..10b2cc4 100644 --- a/Box2D.NET.Examples/CSharp/HelloWorld.cs +++ b/Box2D.NET.Examples/CSharp/HelloWorld.cs @@ -19,7 +19,7 @@ public static void Main() // Create a shape B2.Polygon box = B2.MakeBox(1, 1); B2.ShapeDef shapeDef = B2.DefaultShapeDef(); - shapeDef.friction = 0.6f; + shapeDef.material.friction = 0.6f; shapeDef.density = 1.0f; B2.ShapeId shapeId = B2.CreatePolygonShape(bodyId, &shapeDef, &box); diff --git a/Box2D.NET.Native/Box2D.NET.Native.csproj b/Box2D.NET.Native/Box2D.NET.Native.csproj index 184ebb4..a7a3c14 100644 --- a/Box2D.NET.Native/Box2D.NET.Native.csproj +++ b/Box2D.NET.Native/Box2D.NET.Native.csproj @@ -143,7 +143,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Box2D.NET.Native/build.zig b/Box2D.NET.Native/build.zig index 7b75f36..b747cb9 100644 --- a/Box2D.NET.Native/build.zig +++ b/Box2D.NET.Native/build.zig @@ -18,48 +18,28 @@ const src_flags = [_][]const u8{ const include_paths = [_][]const u8{ "../native/box2d/src", "../native/box2d/include", - "../native/box2d/extern/simde", }; -const src_files = [_][]const u8{ - "../native/box2d/src/aabb.c", - "../native/box2d/src/allocate.c", - "../native/box2d/src/array.c", - "../native/box2d/src/bitset.c", - "../native/box2d/src/block_array.c", - "../native/box2d/src/body.c", - "../native/box2d/src/broad_phase.c", - "../native/box2d/src/constraint_graph.c", - "../native/box2d/src/contact.c", - "../native/box2d/src/contact_solver.c", - "../native/box2d/src/core.c", - "../native/box2d/src/distance.c", - "../native/box2d/src/distance_joint.c", - "../native/box2d/src/dynamic_tree.c", - "../native/box2d/src/geometry.c", - "../native/box2d/src/hull.c", - "../native/box2d/src/id_pool.c", - "../native/box2d/src/island.c", - "../native/box2d/src/joint.c", - "../native/box2d/src/manifold.c", - "../native/box2d/src/math_functions.c", - "../native/box2d/src/motor_joint.c", - "../native/box2d/src/mouse_joint.c", - "../native/box2d/src/prismatic_joint.c", - "../native/box2d/src/revolute_joint.c", - "../native/box2d/src/shape.c", - "../native/box2d/src/solver.c", - "../native/box2d/src/solver_set.c", - "../native/box2d/src/stack_allocator.c", - "../native/box2d/src/table.c", - "../native/box2d/src/timer.c", - "../native/box2d/src/types.c", - "../native/box2d/src/weld_joint.c", - "../native/box2d/src/wheel_joint.c", - "../native/box2d/src/world.c", -}; +// Collect all C source files in the given directory and its subdirectories. +fn getSourceFiles(b: *std.Build, dir_path: []const u8) !std.ArrayList([]const u8) { + var list = std.ArrayList([]const u8).init(b.allocator); + + var dir = try std.fs.cwd().openDir(dir_path, .{ .iterate = true }); + defer dir.close(); + + var walker = try dir.walk(b.allocator); + defer walker.deinit(); + + while (try walker.next()) |entry| { + if (entry.kind == .file and std.mem.endsWith(u8, entry.path, ".c")) { + try list.append(b.pathJoin(&.{ dir_path, entry.path })); + } + } + + return list; +} -pub fn compile(b: *Build, options: BuildOptions) void { +pub fn compile(b: *Build, options: BuildOptions) !void { const lib = switch (options.library_type) { .Shared => b.addSharedLibrary(.{ .name = "box2d", @@ -79,22 +59,25 @@ pub fn compile(b: *Build, options: BuildOptions) void { }; if (options.optimize != .Debug) { - lib.defineCMacro("NDEBUG", null); + lib.root_module.addCMacro("NDEBUG", ""); } - for (include_paths) |path| { - lib.addIncludePath(b.path(path)); - } + const source_files = try getSourceFiles(b, "../native/box2d/src"); + defer source_files.deinit(); - for (src_files) |file| { + for (source_files.items) |file| { lib.addCSourceFile(.{ .file = b.path(file), .flags = &src_flags }); } + for (include_paths) |path| { + lib.addIncludePath(b.path(path)); + } + switch (options.target.result.os.tag) { .windows => { // Temporary fix to get rid of undefined symbol errors when statically linking in Native AOT. if (options.library_type == LibraryType.Static) { - // lib.addCSourceFile(.{ .file = b.path("../native/windows.c"), .flags = &src_flags }); + lib.addCSourceFile(.{ .file = b.path("../native/windows.c"), .flags = &src_flags }); } }, .ios => { @@ -166,8 +149,8 @@ pub fn compile(b: *Build, options: BuildOptions) void { b.installArtifact(lib); } -pub fn build(b: *Build) void { - compile(b, .{ +pub fn build(b: *Build) !void { + try compile(b, .{ .optimize = b.standardOptimizeOption(.{}), .target = b.standardTargetOptions(.{}), .library_type = b.option(LibraryType, "library-type", "Compile as a static or shared library.") orelse LibraryType.Shared, diff --git a/Box2D.NET.Tests/WorldTests.cs b/Box2D.NET.Tests/WorldTests.cs index 1b57003..cb39f49 100644 --- a/Box2D.NET.Tests/WorldTests.cs +++ b/Box2D.NET.Tests/WorldTests.cs @@ -50,7 +50,7 @@ public void HelloWorld() shapeDef.density = 1.0f; // Override the default friction. - shapeDef.friction = 0.3f; + shapeDef.material.friction = 0.3f; // Add the shape to the body. B2.CreatePolygonShape(bodyId, &shapeDef, &dynamicBox); diff --git a/native/box2d b/native/box2d index 8e7a17c..d5935a7 160000 --- a/native/box2d +++ b/native/box2d @@ -1 +1 @@ -Subproject commit 8e7a17c5c942dbf2fdea8b9d09983410dcc0429d +Subproject commit d5935a7a1853eb0f4aca92b369f37929d02c7e11 diff --git a/native/windows.c b/native/windows.c new file mode 100644 index 0000000..55af413 --- /dev/null +++ b/native/windows.c @@ -0,0 +1,4 @@ +// Temporary fix for undefined symbol errors when statically linking on windows. +int __isnanf(float) { } +int __fpclassifyf(float) { } +int printf(const char *, ...) { } From 457f97ca58c99d0c06bdb9e490ef59162e8cfd2b Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Thu, 15 May 2025 19:11:21 -0700 Subject: [PATCH 3/6] Import emscripten cache nuget package, build for x86 platforms --- .github/workflows/ci.yml | 47 +++++++++++------------- Box2D.NET.Native/Box2D.NET.Native.csproj | 40 ++++++++++---------- Box2D.NET.Native/build.zig | 30 +++++---------- 3 files changed, 51 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06eab9c..7cad7a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -57,30 +57,21 @@ jobs: fi - name: Setup IOS SDK - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-latest' shell: bash run: | - IOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path) - IOS_SIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path) - - echo "IOS_SDK=$IOS_SDK" >> $GITHUB_ENV - echo "IOS_SIMULATOR_SDK=$IOS_SIMULATOR_SDK" >> $GITHUB_ENV - - - name: Setup Emscripten SDK - if: matrix.os == 'macos-13' - uses: mymindstorm/setup-emsdk@v14 - with: - actions-cache-folder: 'emsdk-cache' + echo "IOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path)" >> $GITHUB_ENV + echo "IOS_SIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path)" >> $GITHUB_ENV - name: Setup Android NDK - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-latest' uses: nttld/setup-ndk@v1 with: ndk-version: r25c link-to-sdk: true - name: Set Android NDK variables - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-latest' shell: bash run: | echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV @@ -101,32 +92,36 @@ jobs: - name: Build Natives shell: bash - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-latest' working-directory: Box2D.NET.Native run: | dotnet build -c Debug -r linux-x64 + dotnet build -c Debug -r linux-x86 dotnet build -c Debug -r linux-arm64 dotnet build -c Debug -r osx-x64 dotnet build -c Debug -r osx-arm64 dotnet build -c Debug -r win-x64 + dotnet build -c Debug -r win-x86 dotnet build -c Debug -r win-arm64 - dotnet build -c Debug -r browser-wasm - dotnet build -c Debug -r iossimulator-x64 - dotnet build -c Debug -r iossimulator-arm64 - dotnet build -c Debug -r ios-arm64 + # dotnet build -c Debug -r browser-wasm + # dotnet build -c Debug -r iossimulator-x64 + # dotnet build -c Debug -r iossimulator-arm64 + # dotnet build -c Debug -r ios-arm64 dotnet build -c Debug -r android-arm64 dotnet build -c Debug -r android-x64 dotnet build -c Release -r linux-x64 + dotnet build -c Release -r linux-x86 dotnet build -c Release -r linux-arm64 dotnet build -c Release -r osx-x64 dotnet build -c Release -r osx-arm64 dotnet build -c Release -r win-x64 + dotnet build -c Release -r win-x86 dotnet build -c Release -r win-arm64 - dotnet build -c Release -r browser-wasm - dotnet build -c Release -r iossimulator-x64 - dotnet build -c Release -r iossimulator-arm64 - dotnet build -c Release -r ios-arm64 + # dotnet build -c Release -r browser-wasm + # dotnet build -c Release -r iossimulator-x64 + # dotnet build -c Release -r iossimulator-arm64 + # dotnet build -c Release -r ios-arm64 dotnet build -c Release -r android-arm64 dotnet build -c Release -r android-x64 @@ -148,7 +143,7 @@ jobs: fi - name: Upload Artifacts - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v4 with: name: Nuget Packages @@ -158,7 +153,7 @@ jobs: - name: Push NuGet Packages if: > - matrix.os == 'macos-13' && + matrix.os == 'macos-latest' && github.repository_owner == 'BeanCheeseBurrito' && ( (github.event_name == 'workflow_dispatch' && github.event.inputs.push-packages == 'true') || diff --git a/Box2D.NET.Native/Box2D.NET.Native.csproj b/Box2D.NET.Native/Box2D.NET.Native.csproj index a7a3c14..7898be9 100644 --- a/Box2D.NET.Native/Box2D.NET.Native.csproj +++ b/Box2D.NET.Native/Box2D.NET.Native.csproj @@ -41,6 +41,19 @@ + + + + + + + + + + + $(WasmCachePath) + + @@ -96,37 +109,37 @@ x86_64-ios-simulator - --sysroot $(IOS_SIMULATOR_SDK) + --sysroot "$(IOS_SIMULATOR_SDK)" aarch64-ios-simulator - --sysroot $(IOS_SIMULATOR_SDK) + --sysroot "$(IOS_SIMULATOR_SDK)" aarch64-ios - --sysroot $(IOS_SDK) + --sysroot "$(IOS_SDK)" wasm32-emscripten - --sysroot "$(EMSDK)/upstream/emscripten" + --sysroot "$(EMSCRIPTEN_CACHE)" aarch64-linux-android - --sysroot $(ANDROID_NDK_HOME) + --sysroot "$(ANDROID_NDK_HOME)" x86_64-linux-android - --sysroot $(ANDROID_NDK_HOME) + --sysroot "$(ANDROID_NDK_HOME)" @@ -136,23 +149,10 @@ - - - $(ZigArgs) -Dcompiler-rt-path="$(ZigLibPath)/compiler_rt.zig" - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - $(ZigExePath) build -Doptimize=$(ZigConfiguration) --prefix $(OutputPath)runtimes --prefix-lib-dir $(RuntimeIdentifier)/native --prefix-exe-dir $(RuntimeIdentifier)/native -Dtarget=$(ZigIdentifier) $(ZigArgs) + $(ZigExePath) build -Dcompiler-rt-path="$(ZigLibPath)compiler_rt.zig" -Doptimize=$(ZigConfiguration) --prefix $(OutputPath)runtimes --prefix-lib-dir $(RuntimeIdentifier)/native --prefix-exe-dir $(RuntimeIdentifier)/native -Dtarget=$(ZigIdentifier) $(ZigArgs) diff --git a/Box2D.NET.Native/build.zig b/Box2D.NET.Native/build.zig index b747cb9..3e503d7 100644 --- a/Box2D.NET.Native/build.zig +++ b/Box2D.NET.Native/build.zig @@ -15,11 +15,6 @@ const src_flags = [_][]const u8{ "-fno-sanitize=undefined", }; -const include_paths = [_][]const u8{ - "../native/box2d/src", - "../native/box2d/include", -}; - // Collect all C source files in the given directory and its subdirectories. fn getSourceFiles(b: *std.Build, dir_path: []const u8) !std.ArrayList([]const u8) { var list = std.ArrayList([]const u8).init(b.allocator); @@ -62,17 +57,15 @@ pub fn compile(b: *Build, options: BuildOptions) !void { lib.root_module.addCMacro("NDEBUG", ""); } + lib.addIncludePath(b.path("../native/box2d/include")); + lib.addIncludePath(b.path("../native/box2d/src")); + const source_files = try getSourceFiles(b, "../native/box2d/src"); defer source_files.deinit(); - for (source_files.items) |file| { lib.addCSourceFile(.{ .file = b.path(file), .flags = &src_flags }); } - for (include_paths) |path| { - lib.addIncludePath(b.path(path)); - } - switch (options.target.result.os.tag) { .windows => { // Temporary fix to get rid of undefined symbol errors when statically linking in Native AOT. @@ -81,27 +74,24 @@ pub fn compile(b: *Build, options: BuildOptions) !void { } }, .ios => { - if (b.sysroot == null) { + if (b.sysroot == null or b.sysroot.?.len == 0) { @panic("A --sysroot path to an IOS SDK needs to be provided when compiling for IOS."); } lib.addSystemFrameworkPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/System/Library/Frameworks" }) }); lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/include" }) }); - lib.addLibraryPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/lib" }) }); + lib.addLibraryPath(.{ .cwd_relative = "/usr/lib" }); }, .emscripten => { - if (b.sysroot == null) { - @panic("Pass '--sysroot \"$EMSDK/upstream/emscripten\"'"); + if (b.sysroot == null or b.sysroot.?.len == 0) { + @panic("A --sysroot path to an emscripten cache needs to be provided when compiling for wasm."); } - const cache_include = b.pathJoin(&.{ b.sysroot.?, "cache", "sysroot", "include" }); - var dir = std.fs.openDirAbsolute(cache_include, std.fs.Dir.OpenDirOptions{ .access_sub_paths = true, .no_follow = true }) catch @panic("No emscripten cache. Generate it!"); - dir.close(); - lib.addIncludePath(.{ .cwd_relative = cache_include }); + lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/sysroot/include" }) }); }, .linux => { if (options.target.result.abi == .android) { - if (b.sysroot == null) { + if (b.sysroot == null or b.sysroot.?.len == 0) { @panic("A --sysroot path to an Android NDK needs to be provided when compiling for Android."); } @@ -120,7 +110,7 @@ pub fn compile(b: *Build, options: BuildOptions) !void { const android_api_level: []const u8 = "21"; const android_sysroot = b.pathJoin(&.{ b.sysroot.?, "/toolchains/llvm/prebuilt/", host_tuple, "/sysroot" }); - const android_lib_path = b.pathJoin(&.{ android_sysroot, "/usr/lib/", triple, android_api_level }); + const android_lib_path = b.pathJoin(&.{ "/usr/lib/", triple, android_api_level }); const android_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include" }); const android_system_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include/", triple }); From fe960bb920f377d94bf62072b9ff3ab3050df61d Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Fri, 16 May 2025 17:57:42 -0700 Subject: [PATCH 4/6] Include inline functions --- Box2D.NET.Native/build.zig | 1 + Box2D.NET.Tests/WorldTests.cs | 6 +++--- native/inline.c | 6 ++++++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 native/inline.c diff --git a/Box2D.NET.Native/build.zig b/Box2D.NET.Native/build.zig index 3e503d7..0ee7556 100644 --- a/Box2D.NET.Native/build.zig +++ b/Box2D.NET.Native/build.zig @@ -59,6 +59,7 @@ pub fn compile(b: *Build, options: BuildOptions) !void { lib.addIncludePath(b.path("../native/box2d/include")); lib.addIncludePath(b.path("../native/box2d/src")); + lib.addCSourceFile(.{ .file = b.path("../native/inline.c"), .flags = &src_flags }); const source_files = try getSourceFiles(b, "../native/box2d/src"); defer source_files.deinit(); diff --git a/Box2D.NET.Tests/WorldTests.cs b/Box2D.NET.Tests/WorldTests.cs index cb39f49..e43c532 100644 --- a/Box2D.NET.Tests/WorldTests.cs +++ b/Box2D.NET.Tests/WorldTests.cs @@ -80,9 +80,9 @@ public void HelloWorld() // create orphaned ids, so be careful about your world management. B2.DestroyWorld(worldId); - Assert.True(Math.Abs(position.x) < 0.01f); - Assert.True(Math.Abs(position.y - 1.00f) < 0.01f); - Assert.True(Math.Abs(Math.Atan2(rotation.s, rotation.c)) < 0.01f); + Assert.True(B2.AbsFloat(position.x) < 0.01f); + Assert.True(B2.AbsFloat(position.y - 1.00f) < 0.01f); + Assert.True(B2.AbsFloat(B2.RotGetAngle(rotation)) < 0.01f); } } } diff --git a/native/inline.c b/native/inline.c new file mode 100644 index 0000000..7d2f397 --- /dev/null +++ b/native/inline.c @@ -0,0 +1,6 @@ +// Include inline functions in native libraries. +#include +#undef B2_INLINE +#define B2_INLINE +#include +#include From ca1167c275507df0597d69d152a75afed7d708c0 Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Fri, 16 May 2025 20:45:22 -0700 Subject: [PATCH 5/6] Update sysroot variables --- .github/workflows/ci.yml | 33 ++++++++++---------- Box2D.NET.Native/Box2D.NET.Native.csproj | 27 ++++++++--------- Box2D.NET.Native/build.zig | 38 +++++++++++------------- 3 files changed, 44 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cad7a7..a6df45f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,9 @@ jobs: with: dotnet-version: 8.0.x + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + - name: Set Version Suffix shell: bash run: | @@ -56,25 +59,19 @@ jobs: echo "BuildVersionSuffix=build.$(git rev-list --count HEAD)" >> $GITHUB_ENV fi - - name: Setup IOS SDK + - name: Set IOS SDK Variables if: matrix.os == 'macos-latest' shell: bash run: | - echo "IOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path)" >> $GITHUB_ENV - echo "IOS_SIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path)" >> $GITHUB_ENV - - - name: Setup Android NDK - if: matrix.os == 'macos-latest' - uses: nttld/setup-ndk@v1 - with: - ndk-version: r25c - link-to-sdk: true + echo "IOS_SDK_SYSROOT=$(xcrun --sdk iphoneos --show-sdk-path)" >> $GITHUB_ENV + echo "IOS_SIMULATOR_SDK_SYSROOT=$(xcrun --sdk iphonesimulator --show-sdk-path)" >> $GITHUB_ENV - - name: Set Android NDK variables + - name: Set Android NDK Variables if: matrix.os == 'macos-latest' shell: bash run: | - echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV + echo "ANDROID_NDK=$(find "$ANDROID_SDK_ROOT/ndk/" -mindepth 1 -maxdepth 1 -type d | sort | head -n 1)" >> $GITHUB_ENV + echo "ANDROID_NDK_SYSROOT=$ANDROID_NDK/toolchains/llvm/prebuilt/darwin-x86_64/sysroot" >> $GITHUB_ENV - name: Restore Dependencies shell: bash @@ -104,9 +101,9 @@ jobs: dotnet build -c Debug -r win-x86 dotnet build -c Debug -r win-arm64 # dotnet build -c Debug -r browser-wasm - # dotnet build -c Debug -r iossimulator-x64 - # dotnet build -c Debug -r iossimulator-arm64 - # dotnet build -c Debug -r ios-arm64 + dotnet build -c Debug -r iossimulator-x64 + dotnet build -c Debug -r iossimulator-arm64 + dotnet build -c Debug -r ios-arm64 dotnet build -c Debug -r android-arm64 dotnet build -c Debug -r android-x64 @@ -119,9 +116,9 @@ jobs: dotnet build -c Release -r win-x86 dotnet build -c Release -r win-arm64 # dotnet build -c Release -r browser-wasm - # dotnet build -c Release -r iossimulator-x64 - # dotnet build -c Release -r iossimulator-arm64 - # dotnet build -c Release -r ios-arm64 + dotnet build -c Release -r iossimulator-x64 + dotnet build -c Release -r iossimulator-arm64 + dotnet build -c Release -r ios-arm64 dotnet build -c Release -r android-arm64 dotnet build -c Release -r android-x64 diff --git a/Box2D.NET.Native/Box2D.NET.Native.csproj b/Box2D.NET.Native/Box2D.NET.Native.csproj index 7898be9..294a6ed 100644 --- a/Box2D.NET.Native/Box2D.NET.Native.csproj +++ b/Box2D.NET.Native/Box2D.NET.Native.csproj @@ -34,11 +34,8 @@ - - - PreserveNewest - runtimes/ - + + @@ -51,7 +48,7 @@ - $(WasmCachePath) + $(WasmCachePath)sysroot @@ -109,37 +106,37 @@ x86_64-ios-simulator - --sysroot "$(IOS_SIMULATOR_SDK)" + -Dsysroot="$(IOS_SIMULATOR_SDK_SYSROOT)" aarch64-ios-simulator - --sysroot "$(IOS_SIMULATOR_SDK)" + -Dsysroot="$(IOS_SIMULATOR_SDK_SYSROOT)" -Dcpu=apple_m1 aarch64-ios - --sysroot "$(IOS_SDK)" + -Dsysroot="$(IOS_SDK_SYSROOT)" wasm32-emscripten - --sysroot "$(EMSCRIPTEN_CACHE)" + -Dsysroot="$(EMSCRIPTEN_CACHE_SYSROOT)" - aarch64-linux-android - --sysroot "$(ANDROID_NDK_HOME)" + aarch64-linux-android.21 + -Dsysroot="$(ANDROID_NDK_SYSROOT)" - x86_64-linux-android - --sysroot "$(ANDROID_NDK_HOME)" + x86_64-linux-android.21 + -Dsysroot="$(ANDROID_NDK_SYSROOT)" @@ -152,7 +149,7 @@ - $(ZigExePath) build -Dcompiler-rt-path="$(ZigLibPath)compiler_rt.zig" -Doptimize=$(ZigConfiguration) --prefix $(OutputPath)runtimes --prefix-lib-dir $(RuntimeIdentifier)/native --prefix-exe-dir $(RuntimeIdentifier)/native -Dtarget=$(ZigIdentifier) $(ZigArgs) + $(ZigExePath) build -Doptimize=$(ZigConfiguration) --prefix $(OutputPath)runtimes --prefix-lib-dir $(RuntimeIdentifier)/native --prefix-exe-dir $(RuntimeIdentifier)/native -Dtarget=$(ZigIdentifier) -Dcompiler-rt-path="$(ZigLibPath)compiler_rt.zig" $(ZigArgs) diff --git a/Box2D.NET.Native/build.zig b/Box2D.NET.Native/build.zig index 0ee7556..2146b9a 100644 --- a/Box2D.NET.Native/build.zig +++ b/Box2D.NET.Native/build.zig @@ -8,6 +8,11 @@ const BuildOptions = struct { optimize: std.builtin.OptimizeMode, target: Build.ResolvedTarget, library_type: LibraryType, + // There are some issues with path lookups when using --sysroot. Pass as a build option instead. + sysroot: ?[]const u8, + // When building static libraries for Windows, zig's compiler-rt needs to be bundled. + // For some reason, setting "bundle_compiler_rt" to true doesn't produce a static library that works with NativeAOT. + // As a work-around, we manually build the compiler_rt.zig file. compiler_rt_path: ?[]const u8, }; @@ -75,45 +80,38 @@ pub fn compile(b: *Build, options: BuildOptions) !void { } }, .ios => { - if (b.sysroot == null or b.sysroot.?.len == 0) { + if (options.sysroot == null or options.sysroot.?.len == 0) { @panic("A --sysroot path to an IOS SDK needs to be provided when compiling for IOS."); } - lib.addSystemFrameworkPath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/System/Library/Frameworks" }) }); - lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/usr/include" }) }); - lib.addLibraryPath(.{ .cwd_relative = "/usr/lib" }); + lib.addSystemFrameworkPath(.{ .cwd_relative = b.pathJoin(&.{ options.sysroot.?, "/System/Library/Frameworks" }) }); + lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ options.sysroot.?, "/usr/include" }) }); + lib.addLibraryPath(.{ .cwd_relative = b.pathJoin(&.{ options.sysroot.?, "/usr/lib" }) }); }, .emscripten => { - if (b.sysroot == null or b.sysroot.?.len == 0) { + if (options.sysroot == null or options.sysroot.?.len == 0) { @panic("A --sysroot path to an emscripten cache needs to be provided when compiling for wasm."); } - lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/sysroot/include" }) }); + lib.addSystemIncludePath(.{ .cwd_relative = b.pathJoin(&.{ options.sysroot.?, "/include" }) }); }, .linux => { if (options.target.result.abi == .android) { - if (b.sysroot == null or b.sysroot.?.len == 0) { + if (options.sysroot == null or options.sysroot.?.len == 0) { @panic("A --sysroot path to an Android NDK needs to be provided when compiling for Android."); } - const host_tuple = switch (builtin.target.os.tag) { - .linux => "linux-x86_64", - .windows => "windows-x86_64", - .macos => "darwin-x86_64", - else => @panic("unsupported host OS"), - }; - const triple = switch (options.target.result.cpu.arch) { .aarch64 => "aarch64-linux-android", .x86_64 => "x86_64-linux-android", else => @panic("Unsupported Android architecture"), }; + const android_api_level: []const u8 = "21"; - const android_sysroot = b.pathJoin(&.{ b.sysroot.?, "/toolchains/llvm/prebuilt/", host_tuple, "/sysroot" }); - const android_lib_path = b.pathJoin(&.{ "/usr/lib/", triple, android_api_level }); - const android_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include" }); - const android_system_include_path = b.pathJoin(&.{ android_sysroot, "/usr/include/", triple }); + const android_lib_path = b.pathJoin(&.{ options.sysroot.?, "/usr/lib/", triple, android_api_level }); + const android_include_path = b.pathJoin(&.{ options.sysroot.?, "/usr/include" }); + const android_system_include_path = b.pathJoin(&.{ options.sysroot.?, "/usr/include/", triple }); lib.addLibraryPath(.{ .cwd_relative = android_lib_path }); @@ -145,9 +143,7 @@ pub fn build(b: *Build) !void { .optimize = b.standardOptimizeOption(.{}), .target = b.standardTargetOptions(.{}), .library_type = b.option(LibraryType, "library-type", "Compile as a static or shared library.") orelse LibraryType.Shared, - // When building static libraries for Windows, zig's compiler-rt needs to be bundled. - // For some reason, setting "bundle_compiler_rt" to true doesn't produce a static library that works with NativeAOT. - // As a work-around, we manually build the compiler_rt.zig file. + .sysroot = b.option([]const u8, "sysroot", "Path to sysroot.") orelse null, .compiler_rt_path = b.option([]const u8, "compiler-rt-path", "Path to the compiler_rt file.") orelse null, }); } From 949db3a587a5b5a8ade4162d03af46da85103aaf Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Fri, 23 May 2025 03:18:18 -0700 Subject: [PATCH 6/6] Update README.md --- README.md | 49 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b66b36a..6d65724 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ To include both of them in your project based on your build configuration, use t Exe - net7.0 + net8.0 @@ -52,24 +52,49 @@ To include both of them in your project based on your build configuration, use t ``` -## GitLab Package Registry -For more up-to-date packages, development builds are available on the [GitLab package registry](https://gitlab.com/BeanCheeseBurrito/Box2D.NET/-/packages). To add the development feed to your project, add the GitLab link below as a restore source. You can now reference any package version listed [here](https://gitlab.com/BeanCheeseBurrito/Box2D.NET/-/packages)! +## GitHub Package Registry +For more up-to-date packages, development builds are available on the [GitHub package registry](https://github.com/BeanCheeseBurrito?tab=packages&repo_name=Box2D.NET). Packages are automatically uploaded on every commit to the main branch. + +To access development builds from your project, you first need to create a GitHub personal access token with the ``read:packages`` permission. (See [Creating a personal access token (classic)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic)) + +Once you have created a personal access token, run the following command to add the GitHub feed as a new package source. Replace ``YOUR_GITHUB_USERNAME`` with your GitHub username and ``YOUR_GITHUB_TOKEN`` with your personal access token. +```bash +dotnet nuget add source --name "box2d.net" --username "YOUR_GITHUB_USERNAME" --password "YOUR_GITHUB_TOKEN" --store-password-in-clear-text "https://nuget.pkg.github.com/BeanCheeseBurrito/index.json" +``` + +You can now reference any package from the [GitHub feed](https://github.com/BeanCheeseBurrito?tab=packages&repo_name=Box2D.NET)! + +```console +dotnet add PROJECT package Box2D.NET.Release --version *-build.* +``` + ```xml - Exe - net7.0 - https://gitlab.com/api/v4/projects/53993416/packages/nuget/index.json + net8.0 - + - ``` -> [!WARNING] +___ +By default, the GitHub feed will be added to your global ``nuget.config`` file and can be referenced by any project on your machine. If wish to add the feed to a single project/solution, create a ``nuget.config`` file at the root of your project/solution directory and run the following command with the ``--configfile`` option. +```bash +dotnet nuget add source --configfile "./nuget.config" --name "box2d.net" --username "YOUR_GITHUB_USERNAME" --password "YOUR_GITHUB_TOKEN" --store-password-in-clear-text "https://nuget.pkg.github.com/BeanCheeseBurrito/index.json" +``` +To remove the GitHub feed from your NuGet package sources, run the following command. +```bash +dotnet nuget remove source "box2d.net" +``` +GitHub Actions workflows can be authenticated using the ``GITHUB_TOKEN`` secret. +```yaml +- name: Add GitHub source + run: dotnet nuget add source --name "box2d.net" --username "USERNAME" --password "${{ secrets.GITHUB_TOKEN }}" --store-password-in-clear-text "https://nuget.pkg.github.com/BeanCheeseBurrito/index.json" +``` +> [!WARNING] > Development feed packages may be deleted without warning to free up space. ## Running examples @@ -110,13 +135,11 @@ Reference the project and import the native libraries. Exe - net7.0 + net8.0 - - - +