mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
230 lines
11 KiB
C#
230 lines
11 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>
|
|
/// Rack and pinion constraint (slider & gear) settings
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L13">Jolt/Physics/Constraints/RackAndPinionConstraint.h:13</see>
|
|
/// <br/>
|
|
/// <c>class RackAndPinionConstraintSettings final : public TwoBodyConstraintSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct RackAndPinionConstraintSettings : IDisposable
|
|
{
|
|
public static RackAndPinionConstraintSettings Create() => Jolt.PInvoke.RackAndPinionConstraintSettings_Create();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetRTTI()"/>
|
|
public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.CastTo(RTTI)"/>
|
|
public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SaveBinaryState(StreamOut)"/>
|
|
public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream);
|
|
|
|
/// <inheritdoc cref="TwoBodyConstraintSettings.Create(Body, Body)"/>
|
|
public TwoBodyConstraint Create(Body body1, Body body2) =>
|
|
((TwoBodyConstraintSettings)this).Create(body1, body2);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Defines the ratio between the rotation of the pinion and the translation of the rack. The ratio is
|
|
/// defined as: PinionRotation(t) = ratio * RackTranslation(t)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L30">Jolt/Physics/Constraints/RackAndPinionConstraint.h:30</see>
|
|
/// <br/>
|
|
/// <c>void SetRatio(int inNumTeethRack, float inRackLength, int inNumTeethPinion)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Defines the ratio between the rotation of the pinion and the translation of the rack.
|
|
/// The ratio is defined as: PinionRotation(t) = ratio * RackTranslation(t)
|
|
/// @param inNumTeethRack Number of teeth that the rack has
|
|
/// @param inRackLength Length of the rack
|
|
/// @param inNumTeethPinion Number of teeth the pinion has
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetRatio(int numTeethRack, float rackLength, int numTeethPinion) =>
|
|
Jolt.PInvoke.RackAndPinionConstraintSettings_SetRatio(this, numTeethRack, rackLength, numTeethPinion);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// This determines in which space the constraint is setup, all properties below should be in the specified
|
|
/// space
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L36">Jolt/Physics/Constraints/RackAndPinionConstraint.h:36</see>
|
|
/// <br/>
|
|
/// <c>EConstraintSpace mSpace = EConstraintSpace::WorldSpace</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public ConstraintSpace GetSpace() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetSpace(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// This determines in which space the constraint is setup, all properties below should be in the specified
|
|
/// space
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L36">Jolt/Physics/Constraints/RackAndPinionConstraint.h:36</see>
|
|
/// <br/>
|
|
/// <c>EConstraintSpace mSpace = EConstraintSpace::WorldSpace</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetSpace(ConstraintSpace value) =>
|
|
Jolt.PInvoke.RackAndPinionConstraintSettings_SetSpace(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body 1 (pinion) constraint reference frame (space determined by mSpace).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L39">Jolt/Physics/Constraints/RackAndPinionConstraint.h:39</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mHingeAxis = Vec3::sAxisX()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetHingeAxis() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetHingeAxis(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body 1 (pinion) constraint reference frame (space determined by mSpace).
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L39">Jolt/Physics/Constraints/RackAndPinionConstraint.h:39</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mHingeAxis = Vec3::sAxisX()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetHingeAxis(float3 value) =>
|
|
Jolt.PInvoke.RackAndPinionConstraintSettings_SetHingeAxis(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body 2 (rack) constraint reference frame (space determined by mSpace)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L42">Jolt/Physics/Constraints/RackAndPinionConstraint.h:42</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mSliderAxis = Vec3::sAxisX()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetSliderAxis() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetSliderAxis(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Body 2 (rack) constraint reference frame (space determined by mSpace)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L42">Jolt/Physics/Constraints/RackAndPinionConstraint.h:42</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mSliderAxis = Vec3::sAxisX()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetSliderAxis(float3 value) =>
|
|
Jolt.PInvoke.RackAndPinionConstraintSettings_SetSliderAxis(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Ratio between the rack and pinion, see SetRatio.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L45">Jolt/Physics/Constraints/RackAndPinionConstraint.h:45</see>
|
|
/// <br/>
|
|
/// <c>float mRatio = 1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetRatio() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetRatio(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Ratio between the rack and pinion, see SetRatio.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Constraints/RackAndPinionConstraint.h#L45">Jolt/Physics/Constraints/RackAndPinionConstraint.h:45</see>
|
|
/// <br/>
|
|
/// <c>float mRatio = 1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetRatio(float value) => Jolt.PInvoke.RackAndPinionConstraintSettings_SetRatio_2(this, value);
|
|
|
|
public void AddRef() => ((ConstraintSettings)this).AddRef();
|
|
|
|
public void Release() => ((ConstraintSettings)this).Release();
|
|
|
|
public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount();
|
|
|
|
public static implicit operator TwoBodyConstraintSettings(RackAndPinionConstraintSettings value) =>
|
|
Unsafe.BitCast<RackAndPinionConstraintSettings, TwoBodyConstraintSettings>(value);
|
|
|
|
public static implicit operator ConstraintSettings(RackAndPinionConstraintSettings value) =>
|
|
Unsafe.BitCast<RackAndPinionConstraintSettings, ConstraintSettings>(value);
|
|
|
|
public void Dispose()
|
|
{
|
|
if (IsNull())
|
|
return;
|
|
Release();
|
|
}
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetEnabled()"/>
|
|
public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetEnabled(bool)"/>
|
|
public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetConstraintPriority()"/>
|
|
public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetConstraintPriority(uint)"/>
|
|
public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetNumVelocityStepsOverride()"/>
|
|
public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetNumVelocityStepsOverride(uint)"/>
|
|
public void SetNumVelocityStepsOverride(uint value) =>
|
|
((ConstraintSettings)this).SetNumVelocityStepsOverride(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetNumPositionStepsOverride()"/>
|
|
public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetNumPositionStepsOverride(uint)"/>
|
|
public void SetNumPositionStepsOverride(uint value) =>
|
|
((ConstraintSettings)this).SetNumPositionStepsOverride(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetDrawConstraintSize()"/>
|
|
public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetDrawConstraintSize(float)"/>
|
|
public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value);
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.GetUserData()"/>
|
|
public ulong GetUserData() => ((ConstraintSettings)this).GetUserData();
|
|
|
|
/// <inheritdoc cref="ConstraintSettings.SetUserData(ulong)"/>
|
|
public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value);
|
|
}
|
|
}
|