mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
267 lines
13 KiB
C#
267 lines
13 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/PathConstraint.h#L41">Jolt/Physics/Constraints/PathConstraint.h:41</see>
|
|
/// <br/>
|
|
/// <c>class PathConstraintSettings final : public TwoBodyConstraintSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Path constraint settings, used to constrain the degrees of freedom between two bodies to a path
|
|
///
|
|
/// The requirements of the path are that:
|
|
/// * Tangent, normal and bi-normal form an orthonormal basis with: tangent cross bi-normal = normal
|
|
/// * The path points along the tangent vector
|
|
/// * The path is continuous so doesn't contain any sharp corners
|
|
///
|
|
/// The reason for all this is that the constraint acts like a slider constraint with the sliding axis being the tangent vector (the assumption here is that delta time will be small enough so that the path is linear for that delta time).
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct PathConstraintSettings : IDisposable
|
|
{
|
|
public static PathConstraintSettings Create() => Jolt.PInvoke.PathConstraintSettings_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L43">Jolt/Physics/Constraints/PathConstraint.h:43</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.PathConstraintSettings_GetRTTI(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L43">Jolt/Physics/Constraints/PathConstraint.h:43</see>
|
|
/// <br/>
|
|
/// <c></c>
|
|
/// </para>
|
|
/// </summary>
|
|
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.PathConstraintSettings_CastTo(this, rTTI);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L47">Jolt/Physics/Constraints/PathConstraint.h:47</see>
|
|
/// <br/>
|
|
/// <c>virtual void SaveBinaryState(StreamOut &inStream) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See: ConstraintSettings::SaveBinaryState
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.PathConstraintSettings_SaveBinaryState(this, stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L50">Jolt/Physics/Constraints/PathConstraint.h:50</see>
|
|
/// <br/>
|
|
/// <c>virtual TwoBodyConstraint * Create(Body &inBody1, Body &inBody2) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Create an instance of this constraint
|
|
/// </para>
|
|
/// </remarks>
|
|
public TwoBodyConstraint Create(Body body1, Body body2) => Jolt.PInvoke.PathConstraintSettings_Create_2(this, body1, body2);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L53">Jolt/Physics/Constraints/PathConstraint.h:53</see>
|
|
/// <br/>
|
|
/// <c>RefConst<PathConstraintPath> mPath</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The path that constrains the two bodies
|
|
/// </para>
|
|
/// </remarks>
|
|
public PathConstraintPath GetPath() => Jolt.PInvoke.PathConstraintSettings_GetPath(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L53">Jolt/Physics/Constraints/PathConstraint.h:53</see>
|
|
/// <br/>
|
|
/// <c>RefConst<PathConstraintPath> mPath</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The path that constrains the two bodies
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetPath(PathConstraintPath value) => Jolt.PInvoke.PathConstraintSettings_SetPath(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L56">Jolt/Physics/Constraints/PathConstraint.h:56</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mPathPosition = Vec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The position of the path start relative to world transform of body 1
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetPathPosition() => Jolt.PInvoke.PathConstraintSettings_GetPathPosition(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L56">Jolt/Physics/Constraints/PathConstraint.h:56</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mPathPosition = Vec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The position of the path start relative to world transform of body 1
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetPathPosition(float3 value) => Jolt.PInvoke.PathConstraintSettings_SetPathPosition(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L59">Jolt/Physics/Constraints/PathConstraint.h:59</see>
|
|
/// <br/>
|
|
/// <c>Quat mPathRotation = Quat::sIdentity()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The rotation of the path start relative to world transform of body 1
|
|
/// </para>
|
|
/// </remarks>
|
|
public floatQuat GetPathRotation() => Jolt.PInvoke.PathConstraintSettings_GetPathRotation(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L59">Jolt/Physics/Constraints/PathConstraint.h:59</see>
|
|
/// <br/>
|
|
/// <c>Quat mPathRotation = Quat::sIdentity()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The rotation of the path start relative to world transform of body 1
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetPathRotation(floatQuat value) => Jolt.PInvoke.PathConstraintSettings_SetPathRotation(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L62">Jolt/Physics/Constraints/PathConstraint.h:62</see>
|
|
/// <br/>
|
|
/// <c>float mPathFraction = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The fraction along the path that corresponds to the initial position of body 2. Usually this is 0, the
|
|
/// beginning of the path. But if you want to start an object halfway the path you can calculate this with
|
|
/// mPath->GetClosestPoint(point on path to attach body to).
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetPathFraction() => Jolt.PInvoke.PathConstraintSettings_GetPathFraction(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L62">Jolt/Physics/Constraints/PathConstraint.h:62</see>
|
|
/// <br/>
|
|
/// <c>float mPathFraction = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The fraction along the path that corresponds to the initial position of body 2. Usually this is 0, the
|
|
/// beginning of the path. But if you want to start an object halfway the path you can calculate this with
|
|
/// mPath->GetClosestPoint(point on path to attach body to).
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetPathFraction(float value) => Jolt.PInvoke.PathConstraintSettings_SetPathFraction(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L65">Jolt/Physics/Constraints/PathConstraint.h:65</see>
|
|
/// <br/>
|
|
/// <c>float mMaxFrictionForce = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Maximum amount of friction force to apply (N) when not driven by a motor.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetMaxFrictionForce() => Jolt.PInvoke.PathConstraintSettings_GetMaxFrictionForce(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L65">Jolt/Physics/Constraints/PathConstraint.h:65</see>
|
|
/// <br/>
|
|
/// <c>float mMaxFrictionForce = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Maximum amount of friction force to apply (N) when not driven by a motor.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetMaxFrictionForce(float value) => Jolt.PInvoke.PathConstraintSettings_SetMaxFrictionForce(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L71">Jolt/Physics/Constraints/PathConstraint.h:71</see>
|
|
/// <br/>
|
|
/// <c>EPathRotationConstraintType mRotationConstraintType = EPathRotationConstraintType::Free</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// How to constrain the rotation of the body to the path
|
|
/// </para>
|
|
/// </remarks>
|
|
public EPathRotationConstraintType GetRotationConstraintType() => Jolt.PInvoke.PathConstraintSettings_GetRotationConstraintType(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/PathConstraint.h#L71">Jolt/Physics/Constraints/PathConstraint.h:71</see>
|
|
/// <br/>
|
|
/// <c>EPathRotationConstraintType mRotationConstraintType = EPathRotationConstraintType::Free</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// How to constrain the rotation of the body to the path
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetRotationConstraintType(EPathRotationConstraintType value) => Jolt.PInvoke.PathConstraintSettings_SetRotationConstraintType(this, value);
|
|
public void AddRef() => Jolt.PInvoke.PathConstraintSettings_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.PathConstraintSettings_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.PathConstraintSettings_GetRefCount(this);
|
|
public static implicit operator TwoBodyConstraintSettings(PathConstraintSettings value) => Jolt.PInvoke.PathConstraintSettings_AsTwoBodyConstraintSettings(value);
|
|
public static implicit operator ConstraintSettings(PathConstraintSettings value) => Jolt.PInvoke.PathConstraintSettings_AsConstraintSettings(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|