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

182 lines
9.4 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/Constraints/PathConstraintPath.h#L20">Jolt/Physics/Constraints/PathConstraintPath.h:20</see>
/// <br/>
/// <c>class PathConstraintPath : public SerializableObject, public RefTarget&lt;PathConstraintPath&gt;</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The path for a path constraint. It allows attaching two bodies to each other while giving the second body
/// the freedom to move along a path relative to the first.
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct PathConstraintPath : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L22">Jolt/Physics/Constraints/PathConstraintPath.h:22</see>
/// <br/>
/// <c></c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The returned handle is borrowed from its owner; don't Dispose it.
/// </para>
/// </remarks>
public RTTI GetRTTI() => Jolt.PInvoke.PathConstraintPath_GetRTTI(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L22">Jolt/Physics/Constraints/PathConstraintPath.h:22</see>
/// <br/>
/// <c></c>
/// </para>
/// </summary>
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.PathConstraintPath_CastTo(this, rTTI);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L31">Jolt/Physics/Constraints/PathConstraintPath.h:31</see>
/// <br/>
/// <c>virtual float GetPathMaxFraction() const = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Gets the max fraction along the path. I.e. sort of the length of the path.
/// </para>
/// </remarks>
public float GetPathMaxFraction() => Jolt.PInvoke.PathConstraintPath_GetPathMaxFraction(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L37">Jolt/Physics/Constraints/PathConstraintPath.h:37</see>
/// <br/>
/// <c>virtual float GetClosestPoint(Vec3Arg inPosition, float inFractionHint) const = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Get the globally closest point on the curve (Could be slow!)
/// @param inPosition Position to find closest point for
/// @param inFractionHint Last known fraction along the path (can be used to speed up the search)
/// @return Fraction of closest point along the path
/// </code>
/// </remarks>
public float GetClosestPoint(float3 position, float fractionHint) => Jolt.PInvoke.PathConstraintPath_GetClosestPoint(this, position, fractionHint);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L45">Jolt/Physics/Constraints/PathConstraintPath.h:45</see>
/// <br/>
/// <c>virtual void GetPointOnPath(float inFraction, Vec3 &amp;outPathPosition, Vec3 &amp;outPathTangent, Vec3 &amp;outPathNormal, Vec3 &amp;outPathBinormal) const = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Given the fraction along the path, get the point, tangent and normal.
/// @param inFraction Fraction along the path [0, GetPathMaxFraction()].
/// @param outPathPosition Returns the closest position to inSearchPosition on the path.
/// @param outPathTangent Returns the tangent to the path at outPathPosition (the vector that follows the direction of the path)
/// @param outPathNormal Return the normal to the path at outPathPosition (a vector that's perpendicular to outPathTangent)
/// @param outPathBinormal Returns the binormal to the path at outPathPosition (a vector so that normal cross tangent = binormal)
/// </code>
/// </remarks>
public void GetPointOnPath(float fraction, out float3 pathPosition, out float3 pathTangent, out float3 pathNormal, out float3 pathBinormal) => Jolt.PInvoke.PathConstraintPath_GetPointOnPath(this, fraction, out pathPosition, out pathTangent, out pathNormal, out pathBinormal);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L48">Jolt/Physics/Constraints/PathConstraintPath.h:48</see>
/// <br/>
/// <c>void SetIsLooping(bool inIsLooping)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// If the path is looping or not. If a path is looping, the first and last point are automatically
/// connected to each other. They should not be the same points.
/// </para>
/// </remarks>
public void SetIsLooping(bool isLooping) => Jolt.PInvoke.PathConstraintPath_SetIsLooping(this, isLooping);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L49">Jolt/Physics/Constraints/PathConstraintPath.h:49</see>
/// <br/>
/// <c>bool IsLooping() const</c>
/// </para>
/// </summary>
public bool IsLooping() => Jolt.PInvoke.PathConstraintPath_IsLooping(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L53">Jolt/Physics/Constraints/PathConstraintPath.h:53</see>
/// <br/>
/// <c>void DrawPath(DebugRenderer *inRenderer, RMat44Arg inBaseTransform) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Draw the path relative to inBaseTransform. Used for debug purposes.
/// </para>
/// </remarks>
public void DrawPath(DebugRenderer renderer, float4x4 baseTransform) => Jolt.PInvoke.PathConstraintPath_DrawPath(this, renderer, baseTransform);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L57">Jolt/Physics/Constraints/PathConstraintPath.h:57</see>
/// <br/>
/// <c>virtual void SaveBinaryState(StreamOut &amp;inStream) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Saves the contents of the path in binary form to inStream.
/// </para>
/// </remarks>
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.PathConstraintPath_SaveBinaryState(this, stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraintPath.h#L60">Jolt/Physics/Constraints/PathConstraintPath.h:60</see>
/// <br/>
/// <c>static PathResult sRestoreFromBinaryState(StreamIn &amp;inStream)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Creates a Shape of the correct type and restores its contents from the binary stream inStream.
/// </para>
/// <para>
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
/// </para>
/// </remarks>
public static PathConstraintPath sRestoreFromBinaryState(StreamIn stream)
{
var _handle = Jolt.PInvoke.PathConstraintPath_sRestoreFromBinaryState(stream);
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
return _handle;
}
public void AddRef() => Jolt.PInvoke.PathConstraintPath_AddRef(this);
public void Release() => Jolt.PInvoke.PathConstraintPath_Release(this);
public uint GetRefCount() => Jolt.PInvoke.PathConstraintPath_GetRefCount(this);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}