| 1 | // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics) |
| 2 | // SPDX-FileCopyrightText: 2021 Jorrit Rouwe |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | |
| 5 | #pragma once |
| 6 | |
| 7 | JPH_NAMESPACE_BEGIN |
| 8 | |
| 9 | /// Internal helper function |
| 10 | JPH_EXPORT extern bool VerifyJoltVersionIDInternal(uint64 inVersionID); |
| 11 | |
| 12 | /// This function can be used to verify the library ABI is compatible with your |
| 13 | /// application. |
| 14 | /// Use it in this way: `assert(VerifyJoltVersionID());`. |
| 15 | /// Returns `false` if the library used is not compatible with your app. |
| 16 | JPH_INLINE bool VerifyJoltVersionID() { return VerifyJoltVersionIDInternal(JPH_VERSION_ID); } |
| 17 | |
| 18 | /// Internal helper function |
| 19 | JPH_EXPORT extern void RegisterTypesInternal(uint64 inVersionID); |
| 20 | |
| 21 | /// Register all physics types with the factory and install their collision handlers with the CollisionDispatch class. |
| 22 | /// If you have your own custom shape types you probably need to register their handlers with the CollisionDispatch before calling this function. |
| 23 | /// If you implement your own default material (PhysicsMaterial::sDefault) make sure to initialize it before this function or else this function will create one for you. |
| 24 | JPH_INLINE void RegisterTypes() { RegisterTypesInternal(JPH_VERSION_ID); } |
| 25 | |
| 26 | /// Unregisters all types with the factory and cleans up the default material |
| 27 | JPH_EXPORT extern void UnregisterTypes(); |
| 28 | |
| 29 | JPH_NAMESPACE_END |