brutal/brutal.jolt/Brutal.Jolt/Generated/Classes/ShapeCastResult.gen.cs
2026-10-15 14:12:02 +13:00

130 lines
6.5 KiB
C#

// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/ShapeCast.h#L113">Jolt/Physics/Collision/ShapeCast.h:113</see>
/// <br/>
/// <c>class ShapeCastResult : public CollideShapeResult</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Result of a shape cast test
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct ShapeCastResult : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/ShapeCast.h#L119">Jolt/Physics/Collision/ShapeCast.h:119</see>
/// <br/>
/// <c>ShapeCastResult() = default</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Default constructor
/// </para>
/// </remarks>
public static ShapeCastResult Create() => Jolt.PInvoke.ShapeCastResult_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/ShapeCast.h#L130">Jolt/Physics/Collision/ShapeCast.h:130</see>
/// <br/>
/// <c>ShapeCastResult(float inFraction, Vec3Arg inContactPoint1, Vec3Arg inContactPoint2, Vec3Arg inContactNormalOrPenetrationDepth, bool inBackFaceHit, const SubShapeID &amp;inSubShapeID1, const SubShapeID &amp;inSubShapeID2, const BodyID &amp;inBodyID2)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Constructor
/// @param inFraction Fraction at which the cast hit
/// @param inContactPoint1 Contact point on shape 1
/// @param inContactPoint2 Contact point on shape 2
/// @param inContactNormalOrPenetrationDepth Contact normal pointing from shape 1 to 2 or penetration depth vector when the objects are penetrating (also from 1 to 2)
/// @param inBackFaceHit If this hit was a back face hit
/// @param inSubShapeID1 Sub shape id for shape 1
/// @param inSubShapeID2 Sub shape id for shape 2
/// @param inBodyID2 BodyID that was hit
/// </code>
/// </remarks>
public static ShapeCastResult Create(float fraction, float3 contactPoint1, float3 contactPoint2, float3 contactNormalOrPenetrationDepth, bool backFaceHit, uint subShapeID1, uint subShapeID2, uint bodyID2) => Jolt.PInvoke.ShapeCastResult_Create_2(fraction, contactPoint1, contactPoint2, contactNormalOrPenetrationDepth, backFaceHit, subShapeID1, subShapeID2, bodyID2);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/ShapeCast.h#L138">Jolt/Physics/Collision/ShapeCast.h:138</see>
/// <br/>
/// <c>inline float GetEarlyOutFraction() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <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. The fraction and penetration depth are combined
/// in such a way that deeper hits at fraction 0 go first.
/// </para>
/// </remarks>
public float GetEarlyOutFraction() => Jolt.PInvoke.ShapeCastResult_GetEarlyOutFraction(this);
/// <summary>
/// <para>
/// This is the fraction where the shape hit the other shape: CenterOfMassOnHit = Start + value * (End -
/// Start)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/ShapeCast.h#L169">Jolt/Physics/Collision/ShapeCast.h:169</see>
/// <br/>
/// <c>float mFraction</c>
/// </para>
/// </summary>
public float GetFraction() => Jolt.PInvoke.ShapeCastResult_GetFraction(this);
/// <summary>
/// <para>
/// This is the fraction where the shape hit the other shape: CenterOfMassOnHit = Start + value * (End -
/// Start)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/ShapeCast.h#L169">Jolt/Physics/Collision/ShapeCast.h:169</see>
/// <br/>
/// <c>float mFraction</c>
/// </para>
/// </summary>
public void SetFraction(float value) => Jolt.PInvoke.ShapeCastResult_SetFraction(this, value);
/// <summary>
/// <para>
/// True if the shape was hit from the back side
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/ShapeCast.h#L170">Jolt/Physics/Collision/ShapeCast.h:170</see>
/// <br/>
/// <c>bool mIsBackFaceHit</c>
/// </para>
/// </summary>
public bool GetIsBackFaceHit() => Jolt.PInvoke.ShapeCastResult_GetIsBackFaceHit(this);
/// <summary>
/// <para>
/// True if the shape was hit from the back side
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/ShapeCast.h#L170">Jolt/Physics/Collision/ShapeCast.h:170</see>
/// <br/>
/// <c>bool mIsBackFaceHit</c>
/// </para>
/// </summary>
public void SetIsBackFaceHit(bool value) => Jolt.PInvoke.ShapeCastResult_SetIsBackFaceHit(this, value);
public static implicit operator CollideShapeResult(ShapeCastResult value) => Jolt.PInvoke.ShapeCastResult_AsCollideShapeResult(value);
public void Dispose() => Jolt.PInvoke.ShapeCastResult_Destroy(this);
}
}