brutal/Brutal.Jolt/Generated/Structs/CollideShapeResult.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

227 lines
9.4 KiB
C#

// <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>
/// Class that contains all information of two colliding shapes
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L18">Jolt/Physics/Collision/CollideShape.h:18</see>
/// <br/>
/// <c>class CollideShapeResult</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 1120)]
public partial struct CollideShapeResult
{
/// <summary>
/// <para>
/// Contact point on the surface of shape 1 (in world space or relative to base offset)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L59">Jolt/Physics/Collision/CollideShape.h:59</see>
/// <br/>
/// <c>Vec3 mContactPointOn1</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float3 ContactPointOn1;
/// <summary>
/// <para>
/// Contact point on the surface of shape 2 (in world space or relative to base offset). If the penetration
/// depth is 0, this will be the same as mContactPointOn1.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L60">Jolt/Physics/Collision/CollideShape.h:60</see>
/// <br/>
/// <c>Vec3 mContactPointOn2</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float3 ContactPointOn2;
/// <summary>
/// <para>
/// Direction to move shape 2 out of collision along the shortest path (magnitude is meaningless, in world
/// space). You can use -mPenetrationAxis.Normalized() as contact normal.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L61">Jolt/Physics/Collision/CollideShape.h:61</see>
/// <br/>
/// <c>Vec3 mPenetrationAxis</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float3 PenetrationAxis;
/// <summary>
/// <para>
/// Penetration depth (move shape 2 by this distance to resolve the collision). If
/// CollideShapeSettings::mMaxSeparationDistance &gt; 0 this number can be negative to indicate that the
/// objects are separated by -mPenetrationDepth. The contact points are the closest points in that case.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L62">Jolt/Physics/Collision/CollideShape.h:62</see>
/// <br/>
/// <c>float mPenetrationDepth</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public float PenetrationDepth;
/// <summary>
/// <para>
/// Sub shape ID that identifies the face on shape 1
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L63">Jolt/Physics/Collision/CollideShape.h:63</see>
/// <br/>
/// <c>SubShapeID mSubShapeID1</c>
/// </para>
/// </summary>
[FieldOffset(52)]
public uint SubShapeID1;
/// <summary>
/// <para>
/// Sub shape ID that identifies the face on shape 2
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L64">Jolt/Physics/Collision/CollideShape.h:64</see>
/// <br/>
/// <c>SubShapeID mSubShapeID2</c>
/// </para>
/// </summary>
[FieldOffset(56)]
public uint SubShapeID2;
/// <summary>
/// <para>
/// BodyID to which shape 2 belongs to
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L65">Jolt/Physics/Collision/CollideShape.h:65</see>
/// <br/>
/// <c>BodyID mBodyID2</c>
/// </para>
/// </summary>
[FieldOffset(60)]
public uint BodyID2;
/// <summary>
/// <para>
/// Colliding face on shape 1 (optional result, in world space or relative to base offset)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L66">Jolt/Physics/Collision/CollideShape.h:66</see>
/// <br/>
/// <c>Face mShape1Face</c>
/// </para>
/// </summary>
[FieldOffset(64)]
public StaticArrayVec3_32 Shape1Face;
/// <summary>
/// <para>
/// Colliding face on shape 2 (optional result, in world space or relative to base offset)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L67">Jolt/Physics/Collision/CollideShape.h:67</see>
/// <br/>
/// <c>Face mShape2Face</c>
/// </para>
/// </summary>
[FieldOffset(592)]
public StaticArrayVec3_32 Shape2Face;
/// <summary>
/// <para>
/// Default constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L24">Jolt/Physics/Collision/CollideShape.h:24</see>
/// <br/>
/// <c>CollideShapeResult() = default</c>
/// </para>
/// </summary>
public static CollideShapeResult Create() => Jolt.PInvoke.CollideShapeResult_Create();
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L27">Jolt/Physics/Collision/CollideShape.h:27</see>
/// <br/>
/// <c>CollideShapeResult(Vec3Arg inContactPointOn1, Vec3Arg inContactPointOn2, Vec3Arg inPenetrationAxis, float inPenetrationDepth, const SubShapeID &amp;inSubShapeID1, const SubShapeID &amp;inSubShapeID2, const BodyID &amp;inBodyID2)</c>
/// </para>
/// </summary>
public static CollideShapeResult Create(
float3 contactPointOn1,
float3 contactPointOn2,
float3 penetrationAxis,
float penetrationDepth,
uint subShapeID1,
uint subShapeID2,
uint bodyID2
) =>
Jolt.PInvoke.CollideShapeResult_Create_2(
contactPointOn1,
contactPointOn2,
penetrationAxis,
penetrationDepth,
subShapeID1,
subShapeID2,
bodyID2
);
/// <summary>
/// <para>
/// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. We
/// use -penetration depth to get the hit with the biggest penetration depth
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L39">Jolt/Physics/Collision/CollideShape.h:39</see>
/// <br/>
/// <c>inline float GetEarlyOutFraction() const</c>
/// </para>
/// </summary>
public readonly float GetEarlyOutFraction() =>
Jolt.PInvoke.CollideShapeResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Reverses the hit result, swapping contact point 1 with contact point 2 etc.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L42">Jolt/Physics/Collision/CollideShape.h:42</see>
/// <br/>
/// <c>inline CollideShapeResult Reversed() const</c>
/// </para>
/// </summary>
public readonly CollideShapeResult Reversed() =>
Jolt.PInvoke.CollideShapeResult_Reversed(ref Unsafe.AsRef(in this));
}
}