// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { public static partial class Jolt { public static unsafe partial class PInvoke { /// /// /// C++: /// Jolt/Physics/Collision/ShapeCast.h:119 ///
/// ShapeCastResult() = default ///
///
/// /// /// Default constructor /// /// [LibraryImport("jolt", EntryPoint = "ShapeCastResult_Create")] public static partial ShapeCastResult ShapeCastResult_Create(); /// /// /// C++: /// Jolt/Physics/Collision/ShapeCast.h:130 ///
/// ShapeCastResult(float inFraction, Vec3Arg inContactPoint1, Vec3Arg inContactPoint2, Vec3Arg inContactNormalOrPenetrationDepth, bool inBackFaceHit, const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2, const BodyID &inBodyID2) ///
///
/// /// /// 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 /// /// [LibraryImport("jolt", EntryPoint = "ShapeCastResult_Create_2")] public static partial ShapeCastResult ShapeCastResult_Create_2(float fraction, float3 contactPoint1, float3 contactPoint2, float3 contactNormalOrPenetrationDepth, Brutal.Bool8 backFaceHit, uint subShapeID1, uint subShapeID2, uint bodyID2); [LibraryImport("jolt", EntryPoint = "ShapeCastResult_Destroy")] public static partial void ShapeCastResult_Destroy(ShapeCastResult self); /// /// /// C++: /// Jolt/Physics/Collision/ShapeCast.h:138 ///
/// 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. The fraction and penetration depth are /// combined in such a way that deeper hits at fraction 0 go first. /// /// [LibraryImport("jolt", EntryPoint = "ShapeCastResult_GetEarlyOutFraction")] public static partial float ShapeCastResult_GetEarlyOutFraction(ShapeCastResult self); /// /// /// This is the fraction where the shape hit the other shape: CenterOfMassOnHit = Start + value * (End - /// Start) /// /// /// C++: /// Jolt/Physics/Collision/ShapeCast.h:169 ///
/// float mFraction ///
///
[LibraryImport("jolt", EntryPoint = "ShapeCastResult_GetFraction")] public static partial float ShapeCastResult_GetFraction(ShapeCastResult self); /// /// /// This is the fraction where the shape hit the other shape: CenterOfMassOnHit = Start + value * (End - /// Start) /// /// /// C++: /// Jolt/Physics/Collision/ShapeCast.h:169 ///
/// float mFraction ///
///
[LibraryImport("jolt", EntryPoint = "ShapeCastResult_SetFraction")] public static partial void ShapeCastResult_SetFraction(ShapeCastResult self, float value); /// /// /// True if the shape was hit from the back side /// /// /// C++: /// Jolt/Physics/Collision/ShapeCast.h:170 ///
/// bool mIsBackFaceHit ///
///
[LibraryImport("jolt", EntryPoint = "ShapeCastResult_GetIsBackFaceHit")] public static partial Brutal.Bool8 ShapeCastResult_GetIsBackFaceHit(ShapeCastResult self); /// /// /// True if the shape was hit from the back side /// /// /// C++: /// Jolt/Physics/Collision/ShapeCast.h:170 ///
/// bool mIsBackFaceHit ///
///
[LibraryImport("jolt", EntryPoint = "ShapeCastResult_SetIsBackFaceHit")] public static partial void ShapeCastResult_SetIsBackFaceHit(ShapeCastResult self, Brutal.Bool8 value); [LibraryImport("jolt", EntryPoint = "ShapeCastResult_AsCollideShapeResult")] public static partial CollideShapeResult ShapeCastResult_AsCollideShapeResult(ShapeCastResult self); } } }