//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:18
///
/// class CollideShapeResult
///
///
///
///
/// Class that contains all information of two colliding shapes
///
///
[InteropHandle]
public readonly partial struct CollideShapeResult : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:24
///
/// CollideShapeResult() = default
///
///
///
///
/// Default constructor
///
///
public static CollideShapeResult Create() => Jolt.PInvoke.CollideShapeResult_Create();
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:27
///
/// CollideShapeResult(Vec3Arg inContactPointOn1, Vec3Arg inContactPointOn2, Vec3Arg inPenetrationAxis, float inPenetrationDepth, const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2, const BodyID &inBodyID2)
///
///
///
///
/// Constructor
///
///
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);
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:39
///
/// inline float GetEarlyOutFraction() const
///
///
///
///
/// 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
///
///
public float GetEarlyOutFraction() => Jolt.PInvoke.CollideShapeResult_GetEarlyOutFraction(this);
///
///
/// Contact point on the surface of shape 1 (in world space or relative to base offset)
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:59
///
/// Vec3 mContactPointOn1
///
///
public float3 GetContactPointOn1() => Jolt.PInvoke.CollideShapeResult_GetContactPointOn1(this);
///
///
/// Contact point on the surface of shape 1 (in world space or relative to base offset)
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:59
///
/// Vec3 mContactPointOn1
///
///
public void SetContactPointOn1(float3 value) => Jolt.PInvoke.CollideShapeResult_SetContactPointOn1(this, value);
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:60
///
/// Vec3 mContactPointOn2
///
///
public float3 GetContactPointOn2() => Jolt.PInvoke.CollideShapeResult_GetContactPointOn2(this);
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:60
///
/// Vec3 mContactPointOn2
///
///
public void SetContactPointOn2(float3 value) => Jolt.PInvoke.CollideShapeResult_SetContactPointOn2(this, value);
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:61
///
/// Vec3 mPenetrationAxis
///
///
public float3 GetPenetrationAxis() => Jolt.PInvoke.CollideShapeResult_GetPenetrationAxis(this);
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:61
///
/// Vec3 mPenetrationAxis
///
///
public void SetPenetrationAxis(float3 value) => Jolt.PInvoke.CollideShapeResult_SetPenetrationAxis(this, value);
///
///
/// Penetration depth (move shape 2 by this distance to resolve the collision). If
/// CollideShapeSettings::mMaxSeparationDistance > 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.
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:62
///
/// float mPenetrationDepth
///
///
public float GetPenetrationDepth() => Jolt.PInvoke.CollideShapeResult_GetPenetrationDepth(this);
///
///
/// Penetration depth (move shape 2 by this distance to resolve the collision). If
/// CollideShapeSettings::mMaxSeparationDistance > 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.
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:62
///
/// float mPenetrationDepth
///
///
public void SetPenetrationDepth(float value) => Jolt.PInvoke.CollideShapeResult_SetPenetrationDepth(this, value);
///
///
/// Sub shape ID that identifies the face on shape 1
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:63
///
/// SubShapeID mSubShapeID1
///
///
public uint GetSubShapeID1() => Jolt.PInvoke.CollideShapeResult_GetSubShapeID1(this);
///
///
/// Sub shape ID that identifies the face on shape 1
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:63
///
/// SubShapeID mSubShapeID1
///
///
public void SetSubShapeID1(uint value) => Jolt.PInvoke.CollideShapeResult_SetSubShapeID1(this, value);
///
///
/// Sub shape ID that identifies the face on shape 2
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:64
///
/// SubShapeID mSubShapeID2
///
///
public uint GetSubShapeID2() => Jolt.PInvoke.CollideShapeResult_GetSubShapeID2(this);
///
///
/// Sub shape ID that identifies the face on shape 2
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:64
///
/// SubShapeID mSubShapeID2
///
///
public void SetSubShapeID2(uint value) => Jolt.PInvoke.CollideShapeResult_SetSubShapeID2(this, value);
///
///
/// BodyID to which shape 2 belongs to
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:65
///
/// BodyID mBodyID2
///
///
public uint GetBodyID2() => Jolt.PInvoke.CollideShapeResult_GetBodyID2(this);
///
///
/// BodyID to which shape 2 belongs to
///
///
/// C++:
/// Jolt/Physics/Collision/CollideShape.h:65
///
/// BodyID mBodyID2
///
///
public void SetBodyID2(uint value) => Jolt.PInvoke.CollideShapeResult_SetBodyID2(this, value);
public void Dispose() => Jolt.PInvoke.CollideShapeResult_Destroy(this);
}
}