mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
119 lines
5.9 KiB
C#
119 lines
5.9 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>
|
|
/// BroadPhaseLayerInterface implementation. This defines a mapping between object and broadphase layers. This
|
|
/// implementation works together with ObjectLayerPairFilterMask and ObjectVsBroadPhaseLayerFilterMask. A
|
|
/// broadphase layer is suitable for an object if its group & inGroupsToInclude is not zero and its group
|
|
/// & inGroupsToExclude is zero. The broadphase layers are iterated from lowest to highest value and the
|
|
/// first one that matches is taken. If none match then it takes the last layer.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h#L17">Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:17</see>
|
|
/// <br/>
|
|
/// <c>class BroadPhaseLayerInterfaceMask : public BroadPhaseLayerInterface</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct BroadPhaseLayerInterfaceMask : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h#L80">Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:80</see>
|
|
/// <br/>
|
|
/// <c>struct Mapping</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 8)]
|
|
public partial struct Mapping
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h#L82">Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:82</see>
|
|
/// <br/>
|
|
/// <c>uint32 mGroupsToInclude = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public uint GroupsToInclude;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h#L83">Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:83</see>
|
|
/// <br/>
|
|
/// <c>uint32 mGroupsToExclude = ~uint32(0)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(4)]
|
|
public uint GroupsToExclude;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h#L22">Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:22</see>
|
|
/// <br/>
|
|
/// <c>explicit BroadPhaseLayerInterfaceMask(uint inNumBroadPhaseLayers)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static BroadPhaseLayerInterfaceMask Create(uint numBroadPhaseLayers) =>
|
|
Jolt.PInvoke.BroadPhaseLayerInterfaceMask_Create(numBroadPhaseLayers);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Configures a broadphase layer.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h#L33">Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:33</see>
|
|
/// <br/>
|
|
/// <c>void ConfigureLayer(BroadPhaseLayer inBroadPhaseLayer, uint32 inGroupsToInclude, uint32 inGroupsToExclude)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void ConfigureLayer(byte broadPhaseLayer, uint groupsToInclude, uint groupsToExclude) =>
|
|
Jolt.PInvoke.BroadPhaseLayerInterfaceMask_ConfigureLayer(
|
|
this,
|
|
broadPhaseLayer,
|
|
groupsToInclude,
|
|
groupsToExclude
|
|
);
|
|
|
|
/// <inheritdoc cref="BroadPhaseLayerInterface.GetNumBroadPhaseLayers()"/>
|
|
public uint GetNumBroadPhaseLayers() => ((BroadPhaseLayerInterface)this).GetNumBroadPhaseLayers();
|
|
|
|
/// <inheritdoc cref="BroadPhaseLayerInterface.GetBroadPhaseLayer(ushort)"/>
|
|
public byte GetBroadPhaseLayer(ushort layer) => ((BroadPhaseLayerInterface)this).GetBroadPhaseLayer(layer);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Returns true if an object layer should collide with a broadphase layer, this function is being called
|
|
/// from ObjectVsBroadPhaseLayerFilterMask
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h#L59">Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:59</see>
|
|
/// <br/>
|
|
/// <c>inline bool ShouldCollide(ObjectLayer inLayer1, BroadPhaseLayer inLayer2) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool ShouldCollide(ushort layer1, byte layer2) =>
|
|
Jolt.PInvoke.BroadPhaseLayerInterfaceMask_ShouldCollide(this, layer1, layer2);
|
|
|
|
public static implicit operator BroadPhaseLayerInterface(BroadPhaseLayerInterfaceMask value) =>
|
|
Unsafe.BitCast<BroadPhaseLayerInterfaceMask, BroadPhaseLayerInterface>(value);
|
|
|
|
public void Dispose() => Jolt.PInvoke.BroadPhaseLayerInterfaceMask_Destroy(this);
|
|
}
|
|
}
|