brutal/Brutal.Jolt/Generated/Classes/AABBTreeBuilder.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

65 lines
2.5 KiB
C#

// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
/// <summary>
/// <para>
/// Helper class to build an AABB tree
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L35">Jolt/AABBTree/AABBTreeBuilder.h:35</see>
/// <br/>
/// <c>class AABBTreeBuilder</c>
/// </para>
/// </summary>
[InteropHandle]
public readonly partial struct AABBTreeBuilder : IDisposable
{
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L101">Jolt/AABBTree/AABBTreeBuilder.h:101</see>
/// <br/>
/// <c>explicit AABBTreeBuilder(TriangleSplitter &amp;inSplitter, uint inMaxTrianglesPerLeaf = 16)</c>
/// </para>
/// </summary>
public static AABBTreeBuilder Create(TriangleSplitter splitter, uint maxTrianglesPerLeaf = 16) =>
Jolt.PInvoke.AABBTreeBuilder_Create(splitter, maxTrianglesPerLeaf);
/// <summary>
/// <para>
/// Get all triangles
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L110">Jolt/AABBTree/AABBTreeBuilder.h:110</see>
/// <br/>
/// <c>const Array&lt;IndexedTriangle&gt; &amp;GetTriangles() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only
/// valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe ReadOnlySpan<IndexedTriangle> GetTriangles()
{
Jolt.PInvoke.AABBTreeBuilder_GetTriangles(this, out var _outResult);
return new ReadOnlySpan<IndexedTriangle>((void*)_outResult.Data, checked((int)_outResult.Count));
}
public void Dispose() => Jolt.PInvoke.AABBTreeBuilder_Destroy(this);
}
}