mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
152 lines
7 KiB
C#
152 lines
7 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/BoxShape.h#L13">Jolt/Physics/Collision/Shape/BoxShape.h:13</see>
|
|
/// <br/>
|
|
/// <c>class BoxShapeSettings final : public ConvexShapeSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Class that constructs a BoxShape
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct BoxShapeSettings : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L19">Jolt/Physics/Collision/Shape/BoxShape.h:19</see>
|
|
/// <br/>
|
|
/// <c>BoxShapeSettings() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Default constructor for deserialization
|
|
/// </para>
|
|
/// </remarks>
|
|
public static BoxShapeSettings Create() => Jolt.PInvoke.BoxShapeSettings_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L23">Jolt/Physics/Collision/Shape/BoxShape.h:23</see>
|
|
/// <br/>
|
|
/// <c>explicit BoxShapeSettings(Vec3Arg inHalfExtent, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Create a box with half edge length inHalfExtent and convex radius inConvexRadius.
|
|
/// (internally the convex radius will be subtracted from the half extent so the total box will not grow with the convex radius).
|
|
/// </code>
|
|
/// </remarks>
|
|
public static BoxShapeSettings Create(float3 halfExtent, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.BoxShapeSettings_Create_2(halfExtent, convexRadius, material);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L15">Jolt/Physics/Collision/Shape/BoxShape.h:15</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.BoxShapeSettings_GetRTTI(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L15">Jolt/Physics/Collision/Shape/BoxShape.h:15</see>
|
|
/// <br/>
|
|
/// <c></c>
|
|
/// </para>
|
|
/// </summary>
|
|
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.BoxShapeSettings_CastTo(this, rTTI);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L26">Jolt/Physics/Collision/Shape/BoxShape.h:26</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.BoxShapeSettings_CreateShape(this);
|
|
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
|
|
return _handle;
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// Half the size of the box (including convex radius)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L28">Jolt/Physics/Collision/Shape/BoxShape.h:28</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mHalfExtent = Vec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetHalfExtent() => Jolt.PInvoke.BoxShapeSettings_GetHalfExtent(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// Half the size of the box (including convex radius)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L28">Jolt/Physics/Collision/Shape/BoxShape.h:28</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mHalfExtent = Vec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetHalfExtent(float3 value) => Jolt.PInvoke.BoxShapeSettings_SetHalfExtent(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L29">Jolt/Physics/Collision/Shape/BoxShape.h:29</see>
|
|
/// <br/>
|
|
/// <c>float mConvexRadius = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetConvexRadius() => Jolt.PInvoke.BoxShapeSettings_GetConvexRadius(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L29">Jolt/Physics/Collision/Shape/BoxShape.h:29</see>
|
|
/// <br/>
|
|
/// <c>float mConvexRadius = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetConvexRadius(float value) => Jolt.PInvoke.BoxShapeSettings_SetConvexRadius(this, value);
|
|
public void AddRef() => Jolt.PInvoke.BoxShapeSettings_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.BoxShapeSettings_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.BoxShapeSettings_GetRefCount(this);
|
|
public static implicit operator ConvexShapeSettings(BoxShapeSettings value) => Jolt.PInvoke.BoxShapeSettings_AsConvexShapeSettings(value);
|
|
public static implicit operator ShapeSettings(BoxShapeSettings value) => Jolt.PInvoke.BoxShapeSettings_AsShapeSettings(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|