//
// 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
{
[LibraryImport("jolt", EntryPoint = "IslandBuilder_Create")]
public static partial IslandBuilder IslandBuilder_Create();
[LibraryImport("jolt", EntryPoint = "IslandBuilder_Destroy")]
public static partial void IslandBuilder_Destroy(IslandBuilder self);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:25
///
/// void Init(uint32 inMaxActiveBodies)
///
///
///
///
/// Initialize the island builder with the maximum amount of bodies that could be active
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_Init")]
public static partial void IslandBuilder_Init(IslandBuilder self, uint maxActiveBodies);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:28
///
/// void PrepareContactConstraints(uint32 inMaxContactConstraints, TempAllocator *inTempAllocator)
///
///
///
///
/// Prepare for simulation step by allocating space for the contact constraints
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_PrepareContactConstraints")]
public static partial void IslandBuilder_PrepareContactConstraints(IslandBuilder self, uint maxContactConstraints, TempAllocator tempAllocator);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:31
///
/// void PrepareNonContactConstraints(uint32 inNumConstraints, TempAllocator *inTempAllocator)
///
///
///
///
/// Prepare for simulation step by allocating space for the non-contact constraints
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_PrepareNonContactConstraints")]
public static partial void IslandBuilder_PrepareNonContactConstraints(IslandBuilder self, uint numConstraints, TempAllocator tempAllocator);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:34
///
/// void LinkBodies(uint32 inFirst, uint32 inSecond)
///
///
///
///
/// Link two bodies by their index in the BodyManager::mActiveBodies list to form islands
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_LinkBodies")]
public static partial void IslandBuilder_LinkBodies(IslandBuilder self, uint first, uint second);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:37
///
/// void LinkConstraint(uint32 inConstraintIndex, uint32 inFirst, uint32 inSecond)
///
///
///
///
/// Link a constraint to a body by their index in the BodyManager::mActiveBodies
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_LinkConstraint")]
public static partial void IslandBuilder_LinkConstraint(IslandBuilder self, uint constraintIndex, uint first, uint second);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:40
///
/// void LinkContact(uint32 inContactIndex, uint32 inFirst, uint32 inSecond)
///
///
///
///
/// Link a contact to a body by their index in the BodyManager::mActiveBodies
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_LinkContact")]
public static partial void IslandBuilder_LinkContact(IslandBuilder self, uint contactIndex, uint first, uint second);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:43
///
/// void Finalize(const BodyID *inActiveBodies, uint32 inNumActiveBodies, uint32 inNumContacts, TempAllocator *inTempAllocator)
///
///
///
///
/// Finalize the islands after all bodies have been Link()-ed
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_Complete")]
public static partial void IslandBuilder_Complete(IslandBuilder self, uint* activeBodies, uint numActiveBodies, uint numContacts, TempAllocator tempAllocator);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:46
///
/// uint32 GetNumIslands() const
///
///
///
///
/// Get the amount of islands formed
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_GetNumIslands")]
public static partial uint IslandBuilder_GetNumIslands(IslandBuilder self);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:54
///
/// void SetNumPositionSteps(uint32 inIslandIndex, uint inNumPositionSteps)
///
///
///
///
/// The number of position iterations for each island
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_SetNumPositionSteps")]
public static partial void IslandBuilder_SetNumPositionSteps(IslandBuilder self, uint islandIndex, uint numPositionSteps);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:55
///
/// uint GetNumPositionSteps(uint32 inIslandIndex) const
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_GetNumPositionSteps")]
public static partial uint IslandBuilder_GetNumPositionSteps(IslandBuilder self, uint islandIndex);
///
///
/// C++:
/// Jolt/Physics/IslandBuilder.h:73
///
/// void ResetIslands(TempAllocator *inTempAllocator)
///
///
///
///
/// After you're done calling the three functions above, call this function to free associated data
///
///
[LibraryImport("jolt", EntryPoint = "IslandBuilder_ResetIslands")]
public static partial void IslandBuilder_ResetIslands(IslandBuilder self, TempAllocator tempAllocator);
}
}
}