//
// 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
{
///
///
/// Manifold class, describes the contact surface between two bodies
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:19
///
/// class ContactManifold
///
///
[StructLayout(LayoutKind.Explicit, Size = 2128)]
public partial struct ContactManifold
{
///
///
/// Offset to which all the contact points are relative
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:29
///
/// RVec3 mBaseOffset
///
///
[FieldOffset(0)]
public float3 BaseOffset;
///
///
/// Normal for this manifold, direction along which to move body 2 out of collision along the shortest path
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:30
///
/// Vec3 mWorldSpaceNormal
///
///
[FieldOffset(16)]
public float3 WorldSpaceNormal;
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:31
///
/// float mPenetrationDepth
///
///
[FieldOffset(32)]
public float PenetrationDepth;
///
///
/// 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)
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:32
///
/// SubShapeID mSubShapeID1
///
///
[FieldOffset(36)]
public uint SubShapeID1;
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:33
///
/// SubShapeID mSubShapeID2
///
///
[FieldOffset(40)]
public uint SubShapeID2;
///
///
/// Contact points on the surface of shape 1 relative to mBaseOffset.
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:34
///
/// ContactPoints mRelativeContactPointsOn1
///
///
[FieldOffset(48)]
public StaticArrayVec3_64 RelativeContactPointsOn1;
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:35
///
/// ContactPoints mRelativeContactPointsOn2
///
///
[FieldOffset(1088)]
public StaticArrayVec3_64 RelativeContactPointsOn2;
///
///
/// Swaps shape 1 and 2
///
///
/// C++:
/// Jolt/Physics/Collision/ContactListener.h:23
///
/// ContactManifold SwapShapes() const
///
///
public readonly ContactManifold SwapShapes() =>
Jolt.PInvoke.ContactManifold_SwapShapes(ref Unsafe.AsRef(in this));
}
}