//
// 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/CastResult.h:13
///
/// class BroadPhaseCastResult
///
///
///
///
/// Structure that holds a ray cast or other object cast hit
///
///
[InteropHandle]
public readonly partial struct BroadPhaseCastResult : IDisposable
{
public static BroadPhaseCastResult Create() => Jolt.PInvoke.BroadPhaseCastResult_Create();
///
///
/// C++:
/// Jolt/Physics/Collision/CastResult.h:19
///
/// inline float GetEarlyOutFraction() const
///
///
///
///
/// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For
/// rays/cast shapes we can just use the collision fraction.
///
///
public float GetEarlyOutFraction() => Jolt.PInvoke.BroadPhaseCastResult_GetEarlyOutFraction(this);
///
///
/// C++:
/// Jolt/Physics/Collision/CastResult.h:22
///
/// inline void Reset()
///
///
///
///
/// Reset this result so it can be reused for a new cast.
///
///
public void Reset() => Jolt.PInvoke.BroadPhaseCastResult_Reset(this);
///
///
/// Body that was hit
///
///
/// C++:
/// Jolt/Physics/Collision/CastResult.h:24
///
/// BodyID mBodyID
///
///
public uint GetBodyID() => Jolt.PInvoke.BroadPhaseCastResult_GetBodyID(this);
///
///
/// Body that was hit
///
///
/// C++:
/// Jolt/Physics/Collision/CastResult.h:24
///
/// BodyID mBodyID
///
///
public void SetBodyID(uint value) => Jolt.PInvoke.BroadPhaseCastResult_SetBodyID(this, value);
///
///
/// Hit fraction of the ray/object [0, 1], HitPoint = Start + mFraction * (End - Start)
///
///
/// C++:
/// Jolt/Physics/Collision/CastResult.h:25
///
/// float mFraction = 1.0f + FLT_EPSILON
///
///
public float GetFraction() => Jolt.PInvoke.BroadPhaseCastResult_GetFraction(this);
///
///
/// Hit fraction of the ray/object [0, 1], HitPoint = Start + mFraction * (End - Start)
///
///
/// C++:
/// Jolt/Physics/Collision/CastResult.h:25
///
/// float mFraction = 1.0f + FLT_EPSILON
///
///
public void SetFraction(float value) => Jolt.PInvoke.BroadPhaseCastResult_SetFraction(this, value);
public void Dispose() => Jolt.PInvoke.BroadPhaseCastResult_Destroy(this);
}
}