//
// 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
{
///
///
/// C++:
/// Jolt/Geometry/MortonCode.h:11
///
/// class MortonCode
///
///
[InteropHandle]
public readonly partial struct MortonCode : IDisposable
{
public static MortonCode Create() => Jolt.PInvoke.MortonCode_Create();
///
///
/// First converts a floating point value in the range [0, 1] to a 10 bit fixed point integer. Then expands
/// a 10-bit integer into 30 bits by inserting 2 zeros after each bit.
///
///
/// C++:
/// Jolt/Geometry/MortonCode.h:16
///
/// static uint32 sExpandBits(float inV)
///
///
public static uint ExpandBits(float v) => Jolt.PInvoke.MortonCode_ExpandBits(v);
///
///
/// Calculate the morton code for inVector, given that all vectors lie in inVectorBounds
///
///
/// C++:
/// Jolt/Geometry/MortonCode.h:29
///
/// static uint32 sGetMortonCode(Vec3Arg inVector, const AABox &inVectorBounds)
///
///
public static uint GetMortonCode(float3 vector, in AABox vectorBounds) =>
Jolt.PInvoke.MortonCode_GetMortonCode(vector, in vectorBounds);
public void Dispose() => Jolt.PInvoke.MortonCode_Destroy(this);
}
}