mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
54
Brutal.Jolt/Generated/Classes/MortonCode.gen.cs
Normal file
54
Brutal.Jolt/Generated/Classes/MortonCode.gen.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
// <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>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/MortonCode.h#L11">Jolt/Geometry/MortonCode.h:11</see>
|
||||
/// <br/>
|
||||
/// <c>class MortonCode</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct MortonCode : IDisposable
|
||||
{
|
||||
public static MortonCode Create() => Jolt.PInvoke.MortonCode_Create();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// 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.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/MortonCode.h#L16">Jolt/Geometry/MortonCode.h:16</see>
|
||||
/// <br/>
|
||||
/// <c>static uint32 sExpandBits(float inV)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static uint ExpandBits(float v) => Jolt.PInvoke.MortonCode_ExpandBits(v);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Calculate the morton code for inVector, given that all vectors lie in inVectorBounds
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/MortonCode.h#L29">Jolt/Geometry/MortonCode.h:29</see>
|
||||
/// <br/>
|
||||
/// <c>static uint32 sGetMortonCode(Vec3Arg inVector, const AABox &inVectorBounds)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static uint GetMortonCode(float3 vector, in AABox vectorBounds) =>
|
||||
Jolt.PInvoke.MortonCode_GetMortonCode(vector, in vectorBounds);
|
||||
|
||||
public void Dispose() => Jolt.PInvoke.MortonCode_Destroy(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue