mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
153 lines
6.5 KiB
C#
153 lines
6.5 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>
|
|
/// A path that follows a Hermite spline
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/PathConstraintPathHermite.h#L12">Jolt/Physics/Constraints/PathConstraintPathHermite.h:12</see>
|
|
/// <br/>
|
|
/// <c>class PathConstraintPathHermite final : public PathConstraintPath</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct PathConstraintPathHermite : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/PathConstraintPathHermite.h#L32">Jolt/Physics/Constraints/PathConstraintPathHermite.h:32</see>
|
|
/// <br/>
|
|
/// <c>struct Point</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 48)]
|
|
public partial struct Point
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Position on the path
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/PathConstraintPathHermite.h#L36">Jolt/Physics/Constraints/PathConstraintPathHermite.h:36</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mPosition</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public float3 Position;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Tangent of the path, does not need to be normalized (in the direction of the path)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/PathConstraintPathHermite.h#L37">Jolt/Physics/Constraints/PathConstraintPathHermite.h:37</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mTangent</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(16)]
|
|
public float3 Tangent;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Normal of the path (together with the tangent along the curve this forms a basis for the constraint)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/PathConstraintPathHermite.h#L38">Jolt/Physics/Constraints/PathConstraintPathHermite.h:38</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mNormal</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(32)]
|
|
public float3 Normal;
|
|
}
|
|
|
|
public static PathConstraintPathHermite Create() => Jolt.PInvoke.PathConstraintPathHermite_Create();
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.GetRTTI()"/>
|
|
public RTTI GetRTTI() => ((PathConstraintPath)this).GetRTTI();
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.CastTo(RTTI)"/>
|
|
public unsafe Ptr CastTo(RTTI rtti) => ((PathConstraintPath)this).CastTo(rtti);
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.GetPathMaxFraction()"/>
|
|
public float GetPathMaxFraction() => ((PathConstraintPath)this).GetPathMaxFraction();
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.GetClosestPoint(float3, float)"/>
|
|
public float GetClosestPoint(float3 position, float fractionHint) =>
|
|
((PathConstraintPath)this).GetClosestPoint(position, fractionHint);
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.GetPointOnPath(float, out float3, out float3, out float3, out float3)"/>
|
|
public void GetPointOnPath(
|
|
float fraction,
|
|
out float3 pathPosition,
|
|
out float3 pathTangent,
|
|
out float3 pathNormal,
|
|
out float3 pathBinormal
|
|
) =>
|
|
((PathConstraintPath)this).GetPointOnPath(
|
|
fraction,
|
|
out pathPosition,
|
|
out pathTangent,
|
|
out pathNormal,
|
|
out pathBinormal
|
|
);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Adds a point to the path
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/PathConstraintPathHermite.h#L27">Jolt/Physics/Constraints/PathConstraintPathHermite.h:27</see>
|
|
/// <br/>
|
|
/// <c>void AddPoint(Vec3Arg inPosition, Vec3Arg inTangent, Vec3Arg inNormal)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void AddPoint(float3 position, float3 tangent, float3 normal) =>
|
|
Jolt.PInvoke.PathConstraintPathHermite_AddPoint(this, position, tangent, normal);
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.SaveBinaryState(StreamOut)"/>
|
|
public void SaveBinaryState(StreamOut stream) => ((PathConstraintPath)this).SaveBinaryState(stream);
|
|
|
|
public void AddRef() => ((PathConstraintPath)this).AddRef();
|
|
|
|
public void Release() => ((PathConstraintPath)this).Release();
|
|
|
|
public uint GetRefCount() => ((PathConstraintPath)this).GetRefCount();
|
|
|
|
public static implicit operator PathConstraintPath(PathConstraintPathHermite value) =>
|
|
Unsafe.BitCast<PathConstraintPathHermite, PathConstraintPath>(value);
|
|
|
|
public void Dispose()
|
|
{
|
|
if (IsNull())
|
|
return;
|
|
Release();
|
|
}
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.SetIsLooping(bool)"/>
|
|
public void SetIsLooping(bool isLooping) => ((PathConstraintPath)this).SetIsLooping(isLooping);
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.IsLooping()"/>
|
|
public bool IsLooping() => ((PathConstraintPath)this).IsLooping();
|
|
|
|
/// <inheritdoc cref="PathConstraintPath.DrawPath(DebugRenderer, in float4x4)"/>
|
|
public void DrawPath(DebugRenderer renderer, in float4x4 baseTransform) =>
|
|
((PathConstraintPath)this).DrawPath(renderer, in baseTransform);
|
|
}
|
|
}
|