mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
164 lines
7.8 KiB
C#
164 lines
7.8 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/TwoBodyConstraint.h#L26">Jolt/Physics/Constraints/TwoBodyConstraint.h:26</see>
|
|
/// <br/>
|
|
/// <c>class TwoBodyConstraint : public Constraint</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Base class for all constraints that involve 2 bodies. Body1 is usually considered the parent, Body2 the
|
|
/// child.
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct TwoBodyConstraint : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L35">Jolt/Physics/Constraints/TwoBodyConstraint.h:35</see>
|
|
/// <br/>
|
|
/// <c>virtual EConstraintType GetType() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the type of a constraint
|
|
/// </para>
|
|
/// </remarks>
|
|
public EConstraintType GetConstraintType() => Jolt.PInvoke.TwoBodyConstraint_GetConstraintType(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L38">Jolt/Physics/Constraints/TwoBodyConstraint.h:38</see>
|
|
/// <br/>
|
|
/// <c>virtual bool IsActive() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Solver interface
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsActive() => Jolt.PInvoke.TwoBodyConstraint_IsActive(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L40">Jolt/Physics/Constraints/TwoBodyConstraint.h:40</see>
|
|
/// <br/>
|
|
/// <c>virtual void DrawConstraintReferenceFrame(DebugRenderer *inRenderer) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void DrawConstraintReferenceFrame(DebugRenderer renderer) => Jolt.PInvoke.TwoBodyConstraint_DrawConstraintReferenceFrame(this, renderer);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L44">Jolt/Physics/Constraints/TwoBodyConstraint.h:44</see>
|
|
/// <br/>
|
|
/// <c>Body * GetBody1() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Access to the connected bodies
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Body GetBody1() => Jolt.PInvoke.TwoBodyConstraint_GetBody1(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L45">Jolt/Physics/Constraints/TwoBodyConstraint.h:45</see>
|
|
/// <br/>
|
|
/// <c>Body * GetBody2() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Body GetBody2() => Jolt.PInvoke.TwoBodyConstraint_GetBody2(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L48">Jolt/Physics/Constraints/TwoBodyConstraint.h:48</see>
|
|
/// <br/>
|
|
/// <c>virtual Mat44 GetConstraintToBody1Matrix() const = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculates the transform that transforms from constraint space to body 1 space. The first column of the
|
|
/// matrix is the primary constraint axis (e.g. the hinge axis / slider direction), second column the
|
|
/// secondary etc.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetConstraintToBody1Matrix() => Jolt.PInvoke.TwoBodyConstraint_GetConstraintToBody1Matrix(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L51">Jolt/Physics/Constraints/TwoBodyConstraint.h:51</see>
|
|
/// <br/>
|
|
/// <c>virtual Mat44 GetConstraintToBody2Matrix() const = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculates the transform that transforms from constraint space to body 2 space. The first column of the
|
|
/// matrix is the primary constraint axis (e.g. the hinge axis / slider direction), second column the
|
|
/// secondary etc.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetConstraintToBody2Matrix() => Jolt.PInvoke.TwoBodyConstraint_GetConstraintToBody2Matrix(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L54">Jolt/Physics/Constraints/TwoBodyConstraint.h:54</see>
|
|
/// <br/>
|
|
/// <c>virtual void BuildIslands(uint32 inConstraintIndex, IslandBuilder &ioBuilder, BodyManager &inBodyManager) override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Link bodies that are connected by this constraint in the island builder
|
|
/// </para>
|
|
/// </remarks>
|
|
public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => Jolt.PInvoke.TwoBodyConstraint_BuildIslands(this, constraintIndex, builder, bodyManager);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/TwoBodyConstraint.h#L57">Jolt/Physics/Constraints/TwoBodyConstraint.h:57</see>
|
|
/// <br/>
|
|
/// <c>virtual uint BuildIslandSplits(LargeIslandSplitter &ioSplitter) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Link bodies that are connected by this constraint in the same split. Returns the split index.
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint BuildIslandSplits(LargeIslandSplitter splitter) => Jolt.PInvoke.TwoBodyConstraint_BuildIslandSplits(this, splitter);
|
|
public void AddRef() => Jolt.PInvoke.TwoBodyConstraint_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.TwoBodyConstraint_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.TwoBodyConstraint_GetRefCount(this);
|
|
public static implicit operator Constraint(TwoBodyConstraint value) => Jolt.PInvoke.TwoBodyConstraint_AsConstraint(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|