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

266 lines
14 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/Collision/Shape/TriangleShape.h#L34">Jolt/Physics/Collision/Shape/TriangleShape.h:34</see>
/// <br/>
/// <c>class TriangleShape final : public ConvexShape</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// A single triangle, not the most efficient way of creating a world filled with triangles but can be used as a
/// query shape for example.
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct TriangleShape : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L40">Jolt/Physics/Collision/Shape/TriangleShape.h:40</see>
/// <br/>
/// <c>TriangleShape()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Constructor
/// </para>
/// </remarks>
public static TriangleShape Create() => Jolt.PInvoke.TriangleShape_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L45">Jolt/Physics/Collision/Shape/TriangleShape.h:45</see>
/// <br/>
/// <c>TriangleShape(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3, float inConvexRadius = 0.0f, const PhysicsMaterial *inMaterial = nullptr)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Create a triangle with points (inV1, inV2, inV3) (counter clockwise) and convex radius inConvexRadius.
/// Note that the convex radius is currently only used for shape vs shape collision, for all other purposes the triangle is infinitely thin.
/// </code>
/// </remarks>
public static TriangleShape Create(float3 v1, float3 v2, float3 v3, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.TriangleShape_Create_2(v1, v2, v3, convexRadius, material);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L48">Jolt/Physics/Collision/Shape/TriangleShape.h:48</see>
/// <br/>
/// <c>inline Vec3 GetVertex1() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get the vertices of the triangle
/// </para>
/// </remarks>
public float3 GetVertex1() => Jolt.PInvoke.TriangleShape_GetVertex1(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L49">Jolt/Physics/Collision/Shape/TriangleShape.h:49</see>
/// <br/>
/// <c>inline Vec3 GetVertex2() const</c>
/// </para>
/// </summary>
public float3 GetVertex2() => Jolt.PInvoke.TriangleShape_GetVertex2(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L50">Jolt/Physics/Collision/Shape/TriangleShape.h:50</see>
/// <br/>
/// <c>inline Vec3 GetVertex3() const</c>
/// </para>
/// </summary>
public float3 GetVertex3() => Jolt.PInvoke.TriangleShape_GetVertex3(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L53">Jolt/Physics/Collision/Shape/TriangleShape.h:53</see>
/// <br/>
/// <c>float GetConvexRadius() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Convex radius
/// </para>
/// </remarks>
public float GetConvexRadius() => Jolt.PInvoke.TriangleShape_GetConvexRadius(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L63">Jolt/Physics/Collision/Shape/TriangleShape.h:63</see>
/// <br/>
/// <c>virtual float GetInnerRadius() const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetInnerRadius
/// </para>
/// </remarks>
public float GetInnerRadius() => Jolt.PInvoke.TriangleShape_GetInnerRadius(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L69">Jolt/Physics/Collision/Shape/TriangleShape.h:69</see>
/// <br/>
/// <c>virtual Vec3 GetSurfaceNormal(const SubShapeID &amp;inSubShapeID, Vec3Arg inLocalSurfacePosition) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetSurfaceNormal
/// </para>
/// </remarks>
public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.TriangleShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L78">Jolt/Physics/Collision/Shape/TriangleShape.h:78</see>
/// <br/>
/// <c>virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &amp;inSurface, float &amp;outTotalVolume, float &amp;outSubmergedVolume, Vec3 &amp;outCenterOfBuoyancy JPH_IF_DEBUG_RENDERER(, RVec3Arg inBaseOffset)) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetSubmergedVolume
/// </para>
/// </remarks>
public void GetSubmergedVolume(float4x4 centerOfMassTransform, float3 scale, Plane surface, out float totalVolume, out float submergedVolume, out float3 centerOfBuoyancy, float3 baseOffset) => Jolt.PInvoke.TriangleShape_GetSubmergedVolume(this, centerOfMassTransform, scale, surface, out totalVolume, out submergedVolume, out centerOfBuoyancy, baseOffset);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L82">Jolt/Physics/Collision/Shape/TriangleShape.h:82</see>
/// <br/>
/// <c>virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::Draw
/// </para>
/// </remarks>
public void Draw(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, bool useMaterialColors, bool drawWireframe) => Jolt.PInvoke.TriangleShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L93">Jolt/Physics/Collision/Shape/TriangleShape.h:93</see>
/// <br/>
/// <c>virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &amp;inVertices, uint inNumVertices, int inCollidingShapeIndex) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See: Shape::CollideSoftBodyVertices
/// </para>
/// </remarks>
public void CollideSoftBodyVertices(float4x4 centerOfMassTransform, float3 scale, CollideSoftBodyVertexIterator vertices, uint numVertices, int collidingShapeIndex) => Jolt.PInvoke.TriangleShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L96">Jolt/Physics/Collision/Shape/TriangleShape.h:96</see>
/// <br/>
/// <c>virtual void GetTrianglesStart(GetTrianglesContext &amp;ioContext, const AABox &amp;inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetTrianglesStart
/// </para>
/// </remarks>
public void GetTrianglesStart(ref Shape.GetTrianglesContext context, AABox box, float3 positionCOM, floatQuat rotation, float3 scale) => Jolt.PInvoke.TriangleShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L102">Jolt/Physics/Collision/Shape/TriangleShape.h:102</see>
/// <br/>
/// <c>virtual void SaveBinaryState(StreamOut &amp;inStream) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape
/// </para>
/// </remarks>
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.TriangleShape_SaveBinaryState(this, stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L108">Jolt/Physics/Collision/Shape/TriangleShape.h:108</see>
/// <br/>
/// <c>virtual float GetVolume() const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetVolume
/// </para>
/// </remarks>
public float GetVolume() => Jolt.PInvoke.TriangleShape_GetVolume(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L111">Jolt/Physics/Collision/Shape/TriangleShape.h:111</see>
/// <br/>
/// <c>virtual bool IsValidScale(Vec3Arg inScale) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::IsValidScale
/// </para>
/// </remarks>
public bool IsValidScale(float3 scale) => Jolt.PInvoke.TriangleShape_IsValidScale(this, scale);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L114">Jolt/Physics/Collision/Shape/TriangleShape.h:114</see>
/// <br/>
/// <c>virtual Vec3 MakeScaleValid(Vec3Arg inScale) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::MakeScaleValid
/// </para>
/// </remarks>
public float3 MakeScaleValid(float3 scale) => Jolt.PInvoke.TriangleShape_MakeScaleValid(this, scale);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L117">Jolt/Physics/Collision/Shape/TriangleShape.h:117</see>
/// <br/>
/// <c>static void sRegister()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Register shape functions with the registry
/// </para>
/// </remarks>
public static void sRegister() => Jolt.PInvoke.TriangleShape_sRegister();
public void AddRef() => Jolt.PInvoke.TriangleShape_AddRef(this);
public void Release() => Jolt.PInvoke.TriangleShape_Release(this);
public uint GetRefCount() => Jolt.PInvoke.TriangleShape_GetRefCount(this);
public static implicit operator ConvexShape(TriangleShape value) => Jolt.PInvoke.TriangleShape_AsConvexShape(value);
public static implicit operator Shape(TriangleShape value) => Jolt.PInvoke.TriangleShape_AsShape(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}