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

139 lines
5.8 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>
/// Manifold class, describes the contact surface between two bodies
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L19">Jolt/Physics/Collision/ContactListener.h:19</see>
/// <br/>
/// <c>class ContactManifold</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 2128)]
public partial struct ContactManifold
{
/// <summary>
/// <para>
/// Offset to which all the contact points are relative
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L29">Jolt/Physics/Collision/ContactListener.h:29</see>
/// <br/>
/// <c>RVec3 mBaseOffset</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float3 BaseOffset;
/// <summary>
/// <para>
/// Normal for this manifold, direction along which to move body 2 out of collision along the shortest path
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L30">Jolt/Physics/Collision/ContactListener.h:30</see>
/// <br/>
/// <c>Vec3 mWorldSpaceNormal</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float3 WorldSpaceNormal;
/// <summary>
/// <para>
/// Penetration depth (move shape 2 by this distance to resolve the collision). If this value is negative,
/// this is a speculative contact point and may not actually result in a velocity change as during solving
/// the bodies may not actually collide.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L31">Jolt/Physics/Collision/ContactListener.h:31</see>
/// <br/>
/// <c>float mPenetrationDepth</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float PenetrationDepth;
/// <summary>
/// <para>
/// Sub shapes that formed this manifold (note that when multiple manifolds are combined because they're
/// coplanar, we lose some information here because we only keep track of one sub shape pair that we
/// encounter, see description at Body::SetUseManifoldReduction)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L32">Jolt/Physics/Collision/ContactListener.h:32</see>
/// <br/>
/// <c>SubShapeID mSubShapeID1</c>
/// </para>
/// </summary>
[FieldOffset(36)]
public uint SubShapeID1;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L33">Jolt/Physics/Collision/ContactListener.h:33</see>
/// <br/>
/// <c>SubShapeID mSubShapeID2</c>
/// </para>
/// </summary>
[FieldOffset(40)]
public uint SubShapeID2;
/// <summary>
/// <para>
/// Contact points on the surface of shape 1 relative to mBaseOffset.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L34">Jolt/Physics/Collision/ContactListener.h:34</see>
/// <br/>
/// <c>ContactPoints mRelativeContactPointsOn1</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public StaticArrayVec3_64 RelativeContactPointsOn1;
/// <summary>
/// <para>
/// Contact points on the surface of shape 2 relative to mBaseOffset. If there's no penetration, this will
/// be the same as mRelativeContactPointsOn1. If there is penetration they will be different.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L35">Jolt/Physics/Collision/ContactListener.h:35</see>
/// <br/>
/// <c>ContactPoints mRelativeContactPointsOn2</c>
/// </para>
/// </summary>
[FieldOffset(1088)]
public StaticArrayVec3_64 RelativeContactPointsOn2;
/// <summary>
/// <para>
/// Swaps shape 1 and 2
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L23">Jolt/Physics/Collision/ContactListener.h:23</see>
/// <br/>
/// <c>ContactManifold SwapShapes() const</c>
/// </para>
/// </summary>
public readonly ContactManifold SwapShapes() =>
Jolt.PInvoke.ContactManifold_SwapShapes(ref Unsafe.AsRef(in this));
}
}