mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
182 lines
8.8 KiB
C#
182 lines
8.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/Collision/Shape/TriangleShape.h#L12">Jolt/Physics/Collision/Shape/TriangleShape.h:12</see>
|
|
/// <br/>
|
|
/// <c>class TriangleShapeSettings final : public ConvexShapeSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Class that constructs a TriangleShape
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct TriangleShapeSettings : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L18">Jolt/Physics/Collision/Shape/TriangleShape.h:18</see>
|
|
/// <br/>
|
|
/// <c>TriangleShapeSettings() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Default constructor for deserialization
|
|
/// </para>
|
|
/// </remarks>
|
|
public static TriangleShapeSettings Create() => Jolt.PInvoke.TriangleShapeSettings_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L22">Jolt/Physics/Collision/Shape/TriangleShape.h:22</see>
|
|
/// <br/>
|
|
/// <c>TriangleShapeSettings(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 TriangleShapeSettings Create(float3 v1, float3 v2, float3 v3, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.TriangleShapeSettings_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#L14">Jolt/Physics/Collision/Shape/TriangleShape.h:14</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.TriangleShapeSettings_GetRTTI(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L14">Jolt/Physics/Collision/Shape/TriangleShape.h:14</see>
|
|
/// <br/>
|
|
/// <c></c>
|
|
/// </para>
|
|
/// </summary>
|
|
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.TriangleShapeSettings_CastTo(this, rTTI);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L25">Jolt/Physics/Collision/Shape/TriangleShape.h:25</see>
|
|
/// <br/>
|
|
/// <c>virtual ShapeResult Create() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See: ShapeSettings
|
|
/// </para>
|
|
/// <para>
|
|
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Shape CreateShape()
|
|
{
|
|
var _handle = Jolt.PInvoke.TriangleShapeSettings_CreateShape(this);
|
|
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
|
|
return _handle;
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L27">Jolt/Physics/Collision/Shape/TriangleShape.h:27</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mV1</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetV1() => Jolt.PInvoke.TriangleShapeSettings_GetV1(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L27">Jolt/Physics/Collision/Shape/TriangleShape.h:27</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mV1</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetV1(float3 value) => Jolt.PInvoke.TriangleShapeSettings_SetV1(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L28">Jolt/Physics/Collision/Shape/TriangleShape.h:28</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mV2</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetV2() => Jolt.PInvoke.TriangleShapeSettings_GetV2(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L28">Jolt/Physics/Collision/Shape/TriangleShape.h:28</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mV2</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetV2(float3 value) => Jolt.PInvoke.TriangleShapeSettings_SetV2(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L29">Jolt/Physics/Collision/Shape/TriangleShape.h:29</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mV3</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetV3() => Jolt.PInvoke.TriangleShapeSettings_GetV3(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L29">Jolt/Physics/Collision/Shape/TriangleShape.h:29</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mV3</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetV3(float3 value) => Jolt.PInvoke.TriangleShapeSettings_SetV3(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L30">Jolt/Physics/Collision/Shape/TriangleShape.h:30</see>
|
|
/// <br/>
|
|
/// <c>float mConvexRadius = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetConvexRadius() => Jolt.PInvoke.TriangleShapeSettings_GetConvexRadius(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/TriangleShape.h#L30">Jolt/Physics/Collision/Shape/TriangleShape.h:30</see>
|
|
/// <br/>
|
|
/// <c>float mConvexRadius = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetConvexRadius(float value) => Jolt.PInvoke.TriangleShapeSettings_SetConvexRadius(this, value);
|
|
public void AddRef() => Jolt.PInvoke.TriangleShapeSettings_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.TriangleShapeSettings_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.TriangleShapeSettings_GetRefCount(this);
|
|
public static implicit operator ConvexShapeSettings(TriangleShapeSettings value) => Jolt.PInvoke.TriangleShapeSettings_AsConvexShapeSettings(value);
|
|
public static implicit operator ShapeSettings(TriangleShapeSettings value) => Jolt.PInvoke.TriangleShapeSettings_AsShapeSettings(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|