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
|
|
@ -0,0 +1,162 @@
|
|||
// <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>
|
||||
/// Simple collision checker that loops over all registered characters. This is a brute force checking
|
||||
/// algorithm. If you have a lot of characters you may want to store your characters in a hierarchical structure
|
||||
/// to make this more efficient. Note that this is not thread safe, so make sure that only one CharacterVirtual
|
||||
/// is checking collision at a time.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L246">Jolt/Physics/Character/CharacterVirtual.h:246</see>
|
||||
/// <br/>
|
||||
/// <c>class CharacterVsCharacterCollisionSimple : public CharacterVsCharacterCollision</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct CharacterVsCharacterCollisionSimple : IDisposable
|
||||
{
|
||||
public static CharacterVsCharacterCollisionSimple Create() =>
|
||||
Jolt.PInvoke.CharacterVsCharacterCollisionSimple_Create();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Add a character to the list of characters to check collision against.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L250">Jolt/Physics/Character/CharacterVirtual.h:250</see>
|
||||
/// <br/>
|
||||
/// <c>void Add(CharacterVirtual *inCharacter)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void Add(CharacterVirtual character) =>
|
||||
Jolt.PInvoke.CharacterVsCharacterCollisionSimple_Add(this, character);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Remove a character from the list of characters to check collision against.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L253">Jolt/Physics/Character/CharacterVirtual.h:253</see>
|
||||
/// <br/>
|
||||
/// <c>void Remove(const CharacterVirtual *inCharacter)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void Remove(CharacterVirtual character) =>
|
||||
Jolt.PInvoke.CharacterVsCharacterCollisionSimple_Remove(this, character);
|
||||
|
||||
/// <inheritdoc cref="CharacterVsCharacterCollision.CollideCharacter(CharacterVirtual, in float4x4, CollideShapeSettings, float3, Span{CollideShapeResult}, out uint)"/>
|
||||
public unsafe uint CollideCharacter(
|
||||
CharacterVirtual character,
|
||||
in float4x4 centerOfMassTransform,
|
||||
CollideShapeSettings collideShapeSettings,
|
||||
float3 baseOffset,
|
||||
Span<CollideShapeResult> results,
|
||||
out uint totalHits
|
||||
) =>
|
||||
((CharacterVsCharacterCollision)this).CollideCharacter(
|
||||
character,
|
||||
in centerOfMassTransform,
|
||||
collideShapeSettings,
|
||||
baseOffset,
|
||||
results,
|
||||
out totalHits
|
||||
);
|
||||
|
||||
/// <inheritdoc cref="CharacterVsCharacterCollision.CollideCharacterClosest(CharacterVirtual, in float4x4, CollideShapeSettings, float3, out CollideShapeResult)"/>
|
||||
public bool CollideCharacterClosest(
|
||||
CharacterVirtual character,
|
||||
in float4x4 centerOfMassTransform,
|
||||
CollideShapeSettings collideShapeSettings,
|
||||
float3 baseOffset,
|
||||
out CollideShapeResult result
|
||||
) =>
|
||||
((CharacterVsCharacterCollision)this).CollideCharacterClosest(
|
||||
character,
|
||||
in centerOfMassTransform,
|
||||
collideShapeSettings,
|
||||
baseOffset,
|
||||
out result
|
||||
);
|
||||
|
||||
/// <inheritdoc cref="CharacterVsCharacterCollision.CastCharacter(CharacterVirtual, in float4x4, float3, ShapeCastSettings, float3, Span{ShapeCastResult}, out uint)"/>
|
||||
public unsafe uint CastCharacter(
|
||||
CharacterVirtual character,
|
||||
in float4x4 centerOfMassTransform,
|
||||
float3 direction,
|
||||
ShapeCastSettings shapeCastSettings,
|
||||
float3 baseOffset,
|
||||
Span<ShapeCastResult> results,
|
||||
out uint totalHits
|
||||
) =>
|
||||
((CharacterVsCharacterCollision)this).CastCharacter(
|
||||
character,
|
||||
in centerOfMassTransform,
|
||||
direction,
|
||||
shapeCastSettings,
|
||||
baseOffset,
|
||||
results,
|
||||
out totalHits
|
||||
);
|
||||
|
||||
/// <inheritdoc cref="CharacterVsCharacterCollision.CastCharacterClosest(CharacterVirtual, in float4x4, float3, ShapeCastSettings, float3, out ShapeCastResult)"/>
|
||||
public bool CastCharacterClosest(
|
||||
CharacterVirtual character,
|
||||
in float4x4 centerOfMassTransform,
|
||||
float3 direction,
|
||||
ShapeCastSettings shapeCastSettings,
|
||||
float3 baseOffset,
|
||||
out ShapeCastResult result
|
||||
) =>
|
||||
((CharacterVsCharacterCollision)this).CastCharacterClosest(
|
||||
character,
|
||||
in centerOfMassTransform,
|
||||
direction,
|
||||
shapeCastSettings,
|
||||
baseOffset,
|
||||
out result
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// The list of characters to check collision against
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L259">Jolt/Physics/Character/CharacterVirtual.h:259</see>
|
||||
/// <br/>
|
||||
/// <c>Array<CharacterVirtual *> mCharacters</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. The handles in it are borrowed from the
|
||||
/// object that owns them: don't Dispose them, and don't read them once that owner is gone - the buffer
|
||||
/// keeps the pointers alive, not the objects.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[return: Brutal.Attributes.Fixed]
|
||||
public unsafe ReadOnlySpan<CharacterVirtual> GetCharacters()
|
||||
{
|
||||
Jolt.PInvoke.CharacterVsCharacterCollisionSimple_GetCharacters(this, out var _outResult);
|
||||
return new ReadOnlySpan<CharacterVirtual>((void*)_outResult.Data, checked((int)_outResult.Count));
|
||||
}
|
||||
|
||||
public static implicit operator CharacterVsCharacterCollision(CharacterVsCharacterCollisionSimple value) =>
|
||||
Unsafe.BitCast<CharacterVsCharacterCollisionSimple, CharacterVsCharacterCollision>(value);
|
||||
|
||||
public void Dispose() => Jolt.PInvoke.CharacterVsCharacterCollisionSimple_Destroy(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue