mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-28 14:08:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
141
Brutal.Jolt/Generated/Classes/SoftBodyManifold.gen.cs
Normal file
141
Brutal.Jolt/Generated/Classes/SoftBodyManifold.gen.cs
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
|
||||
namespace Brutal.JoltApi
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// An interface to query which vertices of a soft body are colliding with other bodies
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyManifold.h#L12">Jolt/Physics/SoftBody/SoftBodyManifold.h:12</see>
|
||||
/// <br/>
|
||||
/// <c>class SoftBodyManifold</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct SoftBodyManifold
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Get the vertices of the soft body for iterating
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyManifold.h#L16">Jolt/Physics/SoftBody/SoftBodyManifold.h:16</see>
|
||||
/// <br/>
|
||||
/// <c>const Array<SoftBodyVertex> & GetVertices() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only
|
||||
/// valid until that container is resized or its owner is destroyed.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[return: Brutal.Attributes.Fixed]
|
||||
public unsafe ReadOnlySpan<SoftBodyVertex> GetVertices()
|
||||
{
|
||||
Jolt.PInvoke.SoftBodyManifold_GetVertices(this, out var _outResult);
|
||||
return new ReadOnlySpan<SoftBodyVertex>((void*)_outResult.Data, checked((int)_outResult.Count));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Check if a vertex has collided with something in this update
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyManifold.h#L19">Jolt/Physics/SoftBody/SoftBodyManifold.h:19</see>
|
||||
/// <br/>
|
||||
/// <c>bool HasContact(const SoftBodyVertex &inVertex) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public bool HasContact(in SoftBodyVertex vertex) => Jolt.PInvoke.SoftBodyManifold_HasContact(this, in vertex);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Get the local space contact point (multiply by GetCenterOfMassTransform() of the soft body to get world
|
||||
/// space)
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyManifold.h#L25">Jolt/Physics/SoftBody/SoftBodyManifold.h:25</see>
|
||||
/// <br/>
|
||||
/// <c>Vec3 GetLocalContactPoint(const SoftBodyVertex &inVertex) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public float3 GetLocalContactPoint(in SoftBodyVertex vertex) =>
|
||||
Jolt.PInvoke.SoftBodyManifold_GetLocalContactPoint(this, in vertex);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Get the contact normal for the vertex (assumes there is a contact).
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyManifold.h#L31">Jolt/Physics/SoftBody/SoftBodyManifold.h:31</see>
|
||||
/// <br/>
|
||||
/// <c>Vec3 GetContactNormal(const SoftBodyVertex &inVertex) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public float3 GetContactNormal(in SoftBodyVertex vertex) =>
|
||||
Jolt.PInvoke.SoftBodyManifold_GetContactNormal(this, in vertex);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Get the body with which the vertex has collided in this update
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyManifold.h#L37">Jolt/Physics/SoftBody/SoftBodyManifold.h:37</see>
|
||||
/// <br/>
|
||||
/// <c>BodyID GetContactBodyID(const SoftBodyVertex &inVertex) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public uint GetContactBodyID(in SoftBodyVertex vertex) =>
|
||||
Jolt.PInvoke.SoftBodyManifold_GetContactBodyID(this, in vertex);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Get the number of sensors that are in contact with the soft body
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyManifold.h#L51">Jolt/Physics/SoftBody/SoftBodyManifold.h:51</see>
|
||||
/// <br/>
|
||||
/// <c>uint GetNumSensorContacts() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public uint GetNumSensorContacts() => Jolt.PInvoke.SoftBodyManifold_GetNumSensorContacts(this);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Get the i-th sensor that is in contact with the soft body
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyManifold.h#L57">Jolt/Physics/SoftBody/SoftBodyManifold.h:57</see>
|
||||
/// <br/>
|
||||
/// <c>BodyID GetSensorContactBodyID(uint inIndex) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public uint GetSensorContactBodyID(uint index)
|
||||
{
|
||||
var _result = Jolt.PInvoke.SoftBodyManifold_GetSensorContactBodyID(this, index, out var _inRange);
|
||||
if (_inRange == 0)
|
||||
throw new ArgumentOutOfRangeException(
|
||||
nameof(index),
|
||||
index,
|
||||
"Expected an index below the number of sensor contacts."
|
||||
);
|
||||
return _result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue