//
// 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 = "PhysicsScene_Create")]
public static partial PhysicsScene PhysicsScene_Create();
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_AddBody")]
public static partial void PhysicsScene_AddBody(PhysicsScene self, BodyCreationSettings body);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_AddConstraint")]
public static partial void PhysicsScene_AddConstraint(
PhysicsScene self,
TwoBodyConstraintSettings constraint,
uint body1,
uint body2
);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_AddSoftBody")]
public static partial void PhysicsScene_AddSoftBody(PhysicsScene self, SoftBodyCreationSettings softBody);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumBodies")]
public static partial nuint PhysicsScene_GetNumBodies(PhysicsScene self);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetBodies")]
public static partial void PhysicsScene_GetBodies(PhysicsScene self, out NativeStridedView outResult);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumConstraints")]
public static partial nuint PhysicsScene_GetNumConstraints(PhysicsScene self);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetConstraints")]
public static partial void PhysicsScene_GetConstraints(PhysicsScene self, out NativeSpanView outResult);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumSoftBodies")]
public static partial nuint PhysicsScene_GetNumSoftBodies(PhysicsScene self);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetSoftBodies")]
public static partial void PhysicsScene_GetSoftBodies(PhysicsScene self, out NativeStridedView outResult);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_CreateBodies")]
public static partial Brutal.Bool8 PhysicsScene_CreateBodies(PhysicsScene self, PhysicsSystem system);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_FixInvalidScales")]
public static partial Brutal.Bool8 PhysicsScene_FixInvalidScales(PhysicsScene self);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_SaveBinaryState")]
public static partial void PhysicsScene_SaveBinaryState(
PhysicsScene self,
StreamOut stream,
Brutal.Bool8 saveShapes,
Brutal.Bool8 saveGroupFilter
);
///
///
/// Restore a saved scene from inStream
///
///
/// C++:
/// Jolt/Physics/PhysicsScene.h:88
///
/// static PhysicsSceneResult sRestoreFromBinaryState(StreamIn &inStream)
///
///
///
///
/// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message.
///
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_RestoreFromBinaryState")]
public static partial PhysicsScene PhysicsScene_RestoreFromBinaryState(StreamIn stream);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_FromPhysicsSystem")]
public static partial void PhysicsScene_FromPhysicsSystem(PhysicsScene self, PhysicsSystem system);
///
///
/// Serialises this object into buffer as a Jolt object stream and returns the total size of that
/// stream; nothing is written past the end of the buffer. Returns 0 when the object can't be written;
/// call Jolt.GetLastError() for Jolt's error message.
///
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_SaveObjectStream")]
public static partial nuint PhysicsScene_SaveObjectStream(
PhysicsScene self,
byte* buffer,
nuint bufferCount,
ObjectStreamType streamType
);
///
///
/// Reads a text or binary object stream and returns a null handle when it can't be read; call
/// Jolt.GetLastError() for Jolt's error message. A truncated stream can still read back as an object
/// with null references. A non-null return carries a reference the caller owns.
///
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_RestoreFromObjectStream")]
public static partial PhysicsScene PhysicsScene_RestoreFromObjectStream(byte* data, nuint dataCount);
///
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetFixedToWorld")]
public static partial uint PhysicsScene_GetFixedToWorld();
[LibraryImport("jolt", EntryPoint = "PhysicsScene_AddRef")]
public static partial void PhysicsScene_AddRef(PhysicsScene self);
[LibraryImport("jolt", EntryPoint = "PhysicsScene_Release")]
public static partial void PhysicsScene_Release(PhysicsScene self);
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetRefCount")]
public static partial uint PhysicsScene_GetRefCount(PhysicsScene self);
}
}
}