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

205 lines
9.9 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#L33">Jolt/Physics/Collision/Shape/BoxShape.h:33</see>
/// <br/>
/// <c>class BoxShape final : public ConvexShape</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// A box, centered around the origin
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct BoxShape : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L39">Jolt/Physics/Collision/Shape/BoxShape.h:39</see>
/// <br/>
/// <c>BoxShape()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Constructor
/// </para>
/// </remarks>
public static BoxShape Create() => Jolt.PInvoke.BoxShape_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L44">Jolt/Physics/Collision/Shape/BoxShape.h:44</see>
/// <br/>
/// <c>explicit BoxShape(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 BoxShape Create(float3 halfExtent, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.BoxShape_Create_2(halfExtent, convexRadius, material);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L47">Jolt/Physics/Collision/Shape/BoxShape.h:47</see>
/// <br/>
/// <c>Vec3 GetHalfExtent() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get half extent of box
/// </para>
/// </remarks>
public float3 GetHalfExtent() => Jolt.PInvoke.BoxShape_GetHalfExtent(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L53">Jolt/Physics/Collision/Shape/BoxShape.h:53</see>
/// <br/>
/// <c>virtual float GetInnerRadius() const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetInnerRadius
/// </para>
/// </remarks>
public float GetInnerRadius() => Jolt.PInvoke.BoxShape_GetInnerRadius(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L59">Jolt/Physics/Collision/Shape/BoxShape.h:59</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.BoxShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L69">Jolt/Physics/Collision/Shape/BoxShape.h:69</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.BoxShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L80">Jolt/Physics/Collision/Shape/BoxShape.h:80</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.BoxShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L83">Jolt/Physics/Collision/Shape/BoxShape.h:83</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.BoxShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L89">Jolt/Physics/Collision/Shape/BoxShape.h:89</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.BoxShape_SaveBinaryState(this, stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L95">Jolt/Physics/Collision/Shape/BoxShape.h:95</see>
/// <br/>
/// <c>virtual float GetVolume() const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetVolume
/// </para>
/// </remarks>
public float GetVolume() => Jolt.PInvoke.BoxShape_GetVolume(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L98">Jolt/Physics/Collision/Shape/BoxShape.h:98</see>
/// <br/>
/// <c>float GetConvexRadius() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Get the convex radius of this box
/// </para>
/// </remarks>
public float GetConvexRadius() => Jolt.PInvoke.BoxShape_GetConvexRadius(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/BoxShape.h#L101">Jolt/Physics/Collision/Shape/BoxShape.h:101</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.BoxShape_sRegister();
public void AddRef() => Jolt.PInvoke.BoxShape_AddRef(this);
public void Release() => Jolt.PInvoke.BoxShape_Release(this);
public uint GetRefCount() => Jolt.PInvoke.BoxShape_GetRefCount(this);
public static implicit operator ConvexShape(BoxShape value) => Jolt.PInvoke.BoxShape_AsConvexShape(value);
public static implicit operator Shape(BoxShape value) => Jolt.PInvoke.BoxShape_AsShape(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}