// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:26 ///
/// class LargeIslandSplitter : public NonCopyable ///
///
/// /// /// Assigns bodies in large islands to multiple groups that can run in parallel /// /// This basically implements what is described in: High-Performance Physical Simulations on Next-Generation Architecture with Many Cores by Chen et al. /// See: http://web.eecs.umich.edu/~msmelyan/papers/physsim_onmanycore_itj.pdf section "PARALLELIZATION METHODOLOGY" /// /// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library. /// /// [InteropHandle] public readonly partial struct LargeIslandSplitter : IDisposable { /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:37 ///
/// enum class EStatus ///
///
/// /// /// Status code for retrieving a batch /// /// public enum EStatus : int { /// /// /// Work is expected to be available later /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:39 ///
/// WaitingForBatch ///
///
WaitingForBatch, /// /// /// Work is being returned /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:40 ///
/// BatchRetrieved ///
///
BatchRetrieved, /// /// /// No further work is expected from this /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:41 ///
/// AllBatchesDone ///
///
AllBatchesDone, } /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:45 ///
/// struct Split ///
///
/// /// /// Describes a split of constraints and contacts /// /// [StructLayout(LayoutKind.Explicit, Size = 16)] public struct Split { /// /// /// Begin of the contact buffer (offset relative to mContactAndConstraintIndices) /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:51 ///
/// uint32 mContactBufferBegin ///
///
[FieldOffset(0)] public uint mContactBufferBegin; /// /// /// End of the contact buffer /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:52 ///
/// uint32 mContactBufferEnd ///
///
[FieldOffset(4)] public uint mContactBufferEnd; /// /// /// Begin of the constraint buffer (offset relative to mContactAndConstraintIndices) /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:54 ///
/// uint32 mConstraintBufferBegin ///
///
[FieldOffset(8)] public uint mConstraintBufferBegin; /// /// /// End of the constraint buffer /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:55 ///
/// uint32 mConstraintBufferEnd ///
///
[FieldOffset(12)] public uint mConstraintBufferEnd; } public static LargeIslandSplitter Create() => Jolt.PInvoke.LargeIslandSplitter_Create(); /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:139 ///
/// void Prepare(const IslandBuilder &inIslandBuilder, uint32 inNumActiveBodies, TempAllocator *inTempAllocator) ///
///
/// /// /// Prepare the island splitter by allocating memory /// /// public void Prepare(IslandBuilder islandBuilder, uint numActiveBodies, TempAllocator tempAllocator) => Jolt.PInvoke.LargeIslandSplitter_Prepare(this, islandBuilder, numActiveBodies, tempAllocator); /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:142 ///
/// uint AssignSplit(const Body *inBody1, const Body *inBody2) ///
///
/// /// /// Assign two bodies to a split. Returns the split index. /// /// public uint AssignSplit(Body body1, Body body2) => Jolt.PInvoke.LargeIslandSplitter_AssignSplit(this, body1, body2); /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:145 ///
/// uint AssignToNonParallelSplit(const Body *inBody) ///
///
/// /// /// Force a body to be in a non parallel split. Returns the split index. /// /// public uint AssignToNonParallelSplit(Body body) => Jolt.PInvoke.LargeIslandSplitter_AssignToNonParallelSplit(this, body); /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:157 ///
/// inline uint32 GetIslandIndex(uint inSplitIslandIndex) const ///
///
/// /// /// Get the island index of the island that was split for a particular split island index /// /// public uint GetIslandIndex(uint splitIslandIndex) => Jolt.PInvoke.LargeIslandSplitter_GetIslandIndex(this, splitIslandIndex); /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:164 ///
/// void PrepareForSolvePositions() ///
///
/// /// /// Prepare the island splitter for iterating over the split islands again for position solving. Marks all /// batches as startable. /// /// public void PrepareForSolvePositions() => Jolt.PInvoke.LargeIslandSplitter_PrepareForSolvePositions(this); /// /// /// C++: /// Jolt/Physics/LargeIslandSplitter.h:167 ///
/// void Reset(TempAllocator *inTempAllocator) ///
///
/// /// /// Reset the island splitter /// /// public void Reset(TempAllocator tempAllocator) => Jolt.PInvoke.LargeIslandSplitter_Reset(this, tempAllocator); public void Dispose() => Jolt.PInvoke.LargeIslandSplitter_Destroy(this); } }