mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
81 lines
3.1 KiB
C#
81 lines
3.1 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>
|
|
/// Structure that holds a ray cast or other object cast hit
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L13">Jolt/Physics/Collision/CastResult.h:13</see>
|
|
/// <br/>
|
|
/// <c>class BroadPhaseCastResult</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 8)]
|
|
public partial struct BroadPhaseCastResult
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body that was hit
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L24">Jolt/Physics/Collision/CastResult.h:24</see>
|
|
/// <br/>
|
|
/// <c>BodyID mBodyID</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public uint BodyID;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Hit fraction of the ray/object [0, 1], HitPoint = Start + mFraction * (End - Start)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L25">Jolt/Physics/Collision/CastResult.h:25</see>
|
|
/// <br/>
|
|
/// <c>float mFraction = 1.0f + FLT_EPSILON</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(4)]
|
|
public float Fraction;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L19">Jolt/Physics/Collision/CastResult.h:19</see>
|
|
/// <br/>
|
|
/// <c>inline float GetEarlyOutFraction() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly float GetEarlyOutFraction() =>
|
|
Jolt.PInvoke.BroadPhaseCastResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this));
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Reset this result so it can be reused for a new cast.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L22">Jolt/Physics/Collision/CastResult.h:22</see>
|
|
/// <br/>
|
|
/// <c>inline void Reset()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void Reset() => Jolt.PInvoke.BroadPhaseCastResult_Reset(ref this);
|
|
}
|
|
}
|