.NET wrapper for the Bullet physics library using Platform Invoke
Перейти к файлу
Jakub Ławreszuk 30da33766e
Add Linux build.sh script for VHACD library (#4)
* remove unused vhacd versioning

* add linux build.sh script
2024-05-28 12:41:10 +02:00
BulletSharp
bullet@c6a43e0a5b
libbulletc
src
.gitignore
.gitmodules
README.md

README.md

This repo houses bullet 2, the physics engine used within Stride, its C++ / C# wrapper and build scripts for the different supported platforms.

  • bullet => Official bullet repo
  • libbulletc => C++ wrapper
  • BulletSharp => C# wrapper around C++ wrapper
  • src => build scripts

MAKE SURE YOU PULLED SUBMODULES WITH THIS REPO

Building bullet and its C++ wrapper:
  • Windows x64 / x86 / Store / UWP / ARM msbuild:
    • Install Visual Studio 2015+ with C++, cmake and Windows Store/UWP requirements.
    • msbuild_winstore.bat

    • If you run into any issue (which you most likely will) good luck, CMakeLists wants to build everything, you'll have to fiddle around with it.
  • Unix:
    • sudo apt install make

    • sudo apt install clang

    • cd /src

    • make

  • Mac:
    • xcode-select --install

    • cd /src

    • make

  • iOS:
    • xcode-select --install

    • Install xcode
    • Make sure that your terminal is in dev mode, look at xcode's preferences to change that
    • cd /src/iOS/bulletc

    • ./build.sh

  • Android under Windows:
    • AndroidNDK
    • cd to C:\android-ndk-r19c or wherever you installed it

    • ndk-build -C path_to\BulletSharpPInvoke\src\Android\jni

    • (building is slow af, see those build files for more info)
Building BulletSharpPInvoke:
  • Install latest .Net Standard
  • Set BulletSharp.NetStandard.sln 's configuration to Release or ReleaseiOS if building for iOS
  • Build through dotnet or your C# IDE

Original README content:

BulletSharp

BulletSharp is a .NET wrapper for the Bullet physics library.

This version uses Platform Invoke. There is also an equivalent version written in C++/CLI: https://github.com/AndresTraks/BulletSharp

libbulletc is a C interface to Bullet. It compiles into a .dll or .so file that exports Bullet functions.

BulletSharpPInvoke is a .NET library that proxies calls from .NET to libbulletc.

The benefit of P/Invoke over C++/CLI is that it runs on all platforms that support P/Invoke into shared user-mode libraries (Windows, Unix, Mac OS). See also Supported platforms.