// // 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 { /// /// /// Structure that holds a ray cast or other object cast hit /// /// /// C++: /// Jolt/Physics/Collision/CastResult.h:13 ///
/// class BroadPhaseCastResult ///
///
[StructLayout(LayoutKind.Explicit, Size = 8)] public partial struct BroadPhaseCastResult { /// /// /// Body that was hit /// /// /// C++: /// Jolt/Physics/Collision/CastResult.h:24 ///
/// BodyID mBodyID ///
///
[FieldOffset(0)] public uint BodyID; /// /// /// 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 ///
///
[FieldOffset(4)] public float Fraction; /// /// /// 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. /// /// /// C++: /// Jolt/Physics/Collision/CastResult.h:19 ///
/// inline float GetEarlyOutFraction() const ///
///
public readonly float GetEarlyOutFraction() => Jolt.PInvoke.BroadPhaseCastResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this)); /// /// /// Reset this result so it can be reused for a new cast. /// /// /// C++: /// Jolt/Physics/Collision/CastResult.h:22 ///
/// inline void Reset() ///
///
public void Reset() => Jolt.PInvoke.BroadPhaseCastResult_Reset(ref this); } }