// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { public static partial class Jolt { public static unsafe partial class PInvoke { /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:55 ///
/// void Init(uint inMaxBodies, uint inNumBodyMutexes, const BroadPhaseLayerInterface &inLayerInterface) ///
///
/// /// /// Initialize the manager /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_Init")] public static partial void BodyManager_Init(BodyManager self, uint maxBodies, uint numBodyMutexes, BroadPhaseLayerInterface layerInterface); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:58 ///
/// uint GetNumBodies() const ///
///
/// /// /// Gets the current amount of bodies that are in the body manager /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_GetNumBodies")] public static partial uint BodyManager_GetNumBodies(BodyManager self); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:61 ///
/// uint GetMaxBodies() const ///
///
/// /// /// Gets the max bodies that we can support /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_GetMaxBodies")] public static partial uint BodyManager_GetMaxBodies(BodyManager self); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:85 ///
/// Body * AllocateBody(const BodyCreationSettings &inBodyCreationSettings) const ///
///
/// /// /// Create a body using creation settings. The returned body will not be part of the body manager yet. /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_AllocateBody")] public static partial Body BodyManager_AllocateBody(BodyManager self, BodyCreationSettings bodyCreationSettings); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:88 ///
/// Body * AllocateSoftBody(const SoftBodyCreationSettings &inSoftBodyCreationSettings) const ///
///
/// /// /// Create a soft body using creation settings. The returned body will not be part of the body manager /// yet. /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_AllocateSoftBody")] public static partial Body BodyManager_AllocateSoftBody(BodyManager self, SoftBodyCreationSettings softBodyCreationSettings); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:91 ///
/// void FreeBody(Body *inBody) const ///
///
/// /// /// Free a body that has not been added to the body manager yet (if it has, use DestroyBodies). /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_FreeBody")] public static partial void BodyManager_FreeBody(BodyManager self, Body body); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:94 ///
/// bool AddBody(Body *ioBody) ///
///
/// /// /// Add a body to the body manager, assigning it the next available ID. Returns false if no more IDs are /// available. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_AddBody")] public static partial Brutal.Bool8 BodyManager_AddBody(BodyManager self, Body body); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:97 ///
/// bool AddBodyWithCustomID(Body *ioBody, const BodyID &inBodyID) ///
///
/// /// /// Add a body to the body manager, assigning it a custom ID. Returns false if the ID is not valid. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_AddBodyWithCustomID")] public static partial Brutal.Bool8 BodyManager_AddBodyWithCustomID(BodyManager self, Body body, uint bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:103 ///
/// void DestroyBodies(const BodyID *inBodyIDs, int inNumber) ///
///
/// /// /// Remove a set of bodies from the body manager and frees them. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_DestroyBodies")] public static partial void BodyManager_DestroyBodies(BodyManager self, uint* bodyIDs, int number); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:107 ///
/// void ActivateBodies(const BodyID *inBodyIDs, int inNumber) ///
///
/// /// /// Activate a list of bodies. /// This function should only be called when an exclusive lock for the bodies are held. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_ActivateBodies")] public static partial void BodyManager_ActivateBodies(BodyManager self, uint* bodyIDs, int number); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:111 ///
/// void DeactivateBodies(const BodyID *inBodyIDs, int inNumber) ///
///
/// /// /// Deactivate a list of bodies. /// This function should only be called when an exclusive lock for the bodies are held. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_DeactivateBodies")] public static partial void BodyManager_DeactivateBodies(BodyManager self, uint* bodyIDs, int number); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:114 ///
/// void SetMotionQuality(Body &ioBody, EMotionQuality inMotionQuality) ///
///
/// /// /// Update the motion quality for a body /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_SetMotionQuality")] public static partial void BodyManager_SetMotionQuality(BodyManager self, Body body, EMotionQuality motionQuality); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:123 ///
/// uint32 GetNumActiveBodies(EBodyType inType) const ///
///
/// /// /// Get the number of active bodies. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_GetNumActiveBodies")] public static partial uint BodyManager_GetNumActiveBodies(BodyManager self, EBodyType type); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:126 ///
/// uint32 GetNumActiveCCDBodies() const ///
///
/// /// /// Get the number of active bodies that are using continuous collision detection /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_GetNumActiveCCDBodies")] public static partial uint BodyManager_GetNumActiveCCDBodies(BodyManager self); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:129 ///
/// void SetBodyActivationListener(BodyActivationListener *inListener) ///
///
/// /// /// Listener that is notified whenever a body is activated/deactivated /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_SetBodyActivationListener")] public static partial void BodyManager_SetBodyActivationListener(BodyManager self, BodyActivationListener listener); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:130 ///
/// BodyActivationListener * GetBodyActivationListener() const ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_GetBodyActivationListener")] public static partial BodyActivationListener BodyManager_GetBodyActivationListener(BodyManager self); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:133 ///
/// static inline bool sIsValidBodyPointer(const Body *inBody) ///
///
/// /// /// Check if this is a valid body pointer. When a body is freed the memory that the pointer occupies is /// reused to store a freelist. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_sIsValidBodyPointer")] public static partial Brutal.Bool8 BodyManager_sIsValidBodyPointer(Body body); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:145 ///
/// const Body & GetBody(const BodyID &inID) const ///
///
/// /// /// Access a body (not protected by lock) /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_GetBody")] public static partial Body BodyManager_GetBody(BodyManager self, uint iD); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:151 ///
/// const Body * TryGetBody(const BodyID &inID) const ///
///
/// /// /// Access a body, will return a nullptr if the body ID is no longer valid (not protected by lock) /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_TryGetBody")] public static partial Body BodyManager_TryGetBody(BodyManager self, uint iD); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:195 ///
/// void LockAllBodies() const ///
///
/// /// /// Lock all bodies. This should only be done during PhysicsSystem::Update(). /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_LockAllBodies")] public static partial void BodyManager_LockAllBodies(BodyManager self); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:198 ///
/// void UnlockAllBodies() const ///
///
/// /// /// Unlock all bodies. This should only be done during PhysicsSystem::Update(). /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_UnlockAllBodies")] public static partial void BodyManager_UnlockAllBodies(BodyManager self); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:201 ///
/// inline void SetBodyObjectLayerInternal(Body &ioBody, ObjectLayer inLayer) const ///
///
/// /// /// Function to update body's layer (should only be called by the BodyInterface since it also requires /// updating the broadphase) /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_SetBodyObjectLayerInternal")] public static partial void BodyManager_SetBodyObjectLayerInternal(BodyManager self, Body body, ushort layer); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:204 ///
/// void InvalidateContactCacheForBody(Body &ioBody) ///
///
/// /// /// Set the Body::EFlags::InvalidateContactCache flag for the specified body. This means that the /// collision cache is invalid for any body pair involving that body until the next physics step. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_InvalidateContactCacheForBody")] public static partial void BodyManager_InvalidateContactCacheForBody(BodyManager self, Body body); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:207 ///
/// void ValidateContactCacheForAllBodies() ///
///
/// /// /// Reset the Body::EFlags::InvalidateContactCache flag for all bodies. All contact pairs in the contact /// cache will now by valid again. /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_ValidateContactCacheForAllBodies")] public static partial void BodyManager_ValidateContactCacheForAllBodies(BodyManager self); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:216 ///
/// void SaveBodyState(const Body &inBody, StateRecorder &inStream) const ///
///
/// /// /// Save the state of a single body for replay /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_SaveBodyState")] public static partial void BodyManager_SaveBodyState(BodyManager self, Body body, StateRecorder stream); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:219 ///
/// void RestoreBodyState(Body &inBody, StateRecorder &inStream) ///
///
/// /// /// Save the state of a single body for replay /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_RestoreBodyState")] public static partial void BodyManager_RestoreBodyState(BodyManager self, Body body, StateRecorder stream); /// /// /// C++: /// Jolt/Physics/Body/BodyManager.h:272 ///
/// void Draw(const DrawSettings &inSettings, const PhysicsSettings &inPhysicsSettings, DebugRenderer *inRenderer, const BodyDrawFilter *inBodyFilter = nullptr) ///
///
/// /// /// Draw the state of the bodies (debugging purposes) /// /// [LibraryImport("jolt", EntryPoint = "BodyManager_Draw")] public static partial void BodyManager_Draw(BodyManager self, ref BodyManager.DrawSettings settings, ref PhysicsSettings physicsSettings, DebugRenderer renderer, BodyDrawFilter bodyFilter); } } }