mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
137 lines
6.9 KiB
C#
137 lines
6.9 KiB
C#
// <auto-generated/>
|
|
// 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();
|
|
|
|
/// <inheritdoc cref="PhysicsScene.AddBody(BodyCreationSettings)"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_AddBody")]
|
|
public static partial void PhysicsScene_AddBody(PhysicsScene self, BodyCreationSettings body);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.AddConstraint(TwoBodyConstraintSettings, uint, uint)"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_AddConstraint")]
|
|
public static partial void PhysicsScene_AddConstraint(
|
|
PhysicsScene self,
|
|
TwoBodyConstraintSettings constraint,
|
|
uint body1,
|
|
uint body2
|
|
);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.AddSoftBody(SoftBodyCreationSettings)"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_AddSoftBody")]
|
|
public static partial void PhysicsScene_AddSoftBody(PhysicsScene self, SoftBodyCreationSettings softBody);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.GetNumBodies()"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumBodies")]
|
|
public static partial nuint PhysicsScene_GetNumBodies(PhysicsScene self);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.GetBodies()"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetBodies")]
|
|
public static partial void PhysicsScene_GetBodies(PhysicsScene self, out NativeStridedView outResult);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.GetNumConstraints()"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumConstraints")]
|
|
public static partial nuint PhysicsScene_GetNumConstraints(PhysicsScene self);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.GetConstraints()"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetConstraints")]
|
|
public static partial void PhysicsScene_GetConstraints(PhysicsScene self, out NativeSpanView outResult);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.GetNumSoftBodies()"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumSoftBodies")]
|
|
public static partial nuint PhysicsScene_GetNumSoftBodies(PhysicsScene self);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.GetSoftBodies()"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_GetSoftBodies")]
|
|
public static partial void PhysicsScene_GetSoftBodies(PhysicsScene self, out NativeStridedView outResult);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.CreateBodies(PhysicsSystem)"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_CreateBodies")]
|
|
public static partial Brutal.Bool8 PhysicsScene_CreateBodies(PhysicsScene self, PhysicsSystem system);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.FixInvalidScales()"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_FixInvalidScales")]
|
|
public static partial Brutal.Bool8 PhysicsScene_FixInvalidScales(PhysicsScene self);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.SaveBinaryState(StreamOut, bool, bool)"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_SaveBinaryState")]
|
|
public static partial void PhysicsScene_SaveBinaryState(
|
|
PhysicsScene self,
|
|
StreamOut stream,
|
|
Brutal.Bool8 saveShapes,
|
|
Brutal.Bool8 saveGroupFilter
|
|
);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Restore a saved scene from inStream
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsScene.h#L88">Jolt/Physics/PhysicsScene.h:88</see>
|
|
/// <br/>
|
|
/// <c>static PhysicsSceneResult sRestoreFromBinaryState(StreamIn &inStream)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message.
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_RestoreFromBinaryState")]
|
|
public static partial PhysicsScene PhysicsScene_RestoreFromBinaryState(StreamIn stream);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.FromPhysicsSystem(PhysicsSystem)"/>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_FromPhysicsSystem")]
|
|
public static partial void PhysicsScene_FromPhysicsSystem(PhysicsScene self, PhysicsSystem system);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// </summary>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_SaveObjectStream")]
|
|
public static partial nuint PhysicsScene_SaveObjectStream(
|
|
PhysicsScene self,
|
|
byte* buffer,
|
|
nuint bufferCount,
|
|
ObjectStreamType streamType
|
|
);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// </summary>
|
|
[LibraryImport("jolt", EntryPoint = "PhysicsScene_RestoreFromObjectStream")]
|
|
public static partial PhysicsScene PhysicsScene_RestoreFromObjectStream(byte* data, nuint dataCount);
|
|
|
|
/// <inheritdoc cref="PhysicsScene.GetFixedToWorld()"/>
|
|
[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);
|
|
}
|
|
}
|
|
}
|