mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
378 lines
16 KiB
C#
378 lines
16 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>
|
|
/// Base class for character class
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L53">Jolt/Physics/Character/CharacterBase.h:53</see>
|
|
/// <br/>
|
|
/// <c>class CharacterBase : public RefTarget<CharacterBase>, public NonCopyable</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct CharacterBase : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L87">Jolt/Physics/Character/CharacterBase.h:87</see>
|
|
/// <br/>
|
|
/// <c>enum class EGroundState</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public enum GroundState : int
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Character is on the ground and can move freely.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L89">Jolt/Physics/Character/CharacterBase.h:89</see>
|
|
/// <br/>
|
|
/// <c>OnGround</c>
|
|
/// </para>
|
|
/// </summary>
|
|
OnGround,
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Character is on a slope that is too steep and can't climb up any further. The caller should start
|
|
/// applying downward velocity if sliding from the slope is desired.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L90">Jolt/Physics/Character/CharacterBase.h:90</see>
|
|
/// <br/>
|
|
/// <c>OnSteepGround</c>
|
|
/// </para>
|
|
/// </summary>
|
|
OnSteepGround,
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Character is touching an object, but is not supported by it and should fall. The GetGroundXXX
|
|
/// functions will return information about the touched object.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L91">Jolt/Physics/Character/CharacterBase.h:91</see>
|
|
/// <br/>
|
|
/// <c>NotSupported</c>
|
|
/// </para>
|
|
/// </summary>
|
|
NotSupported,
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Character is in the air and is not touching anything.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L92">Jolt/Physics/Character/CharacterBase.h:92</see>
|
|
/// <br/>
|
|
/// <c>InAir</c>
|
|
/// </para>
|
|
/// </summary>
|
|
InAir,
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L59">Jolt/Physics/Character/CharacterBase.h:59</see>
|
|
/// <br/>
|
|
/// <c>CharacterBase(const CharacterBaseSettings *inSettings, PhysicsSystem *inSystem)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static CharacterBase Create(CharacterBaseSettings settings, PhysicsSystem system) =>
|
|
Jolt.PInvoke.CharacterBase_Create(settings, system);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set the maximum angle of slope that character can still walk on (radians)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L65">Jolt/Physics/Character/CharacterBase.h:65</see>
|
|
/// <br/>
|
|
/// <c>void SetMaxSlopeAngle(float inMaxSlopeAngle)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxSlopeAngle(float maxSlopeAngle) =>
|
|
Jolt.PInvoke.CharacterBase_SetMaxSlopeAngle(this, maxSlopeAngle);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L66">Jolt/Physics/Character/CharacterBase.h:66</see>
|
|
/// <br/>
|
|
/// <c>float GetCosMaxSlopeAngle() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetCosMaxSlopeAngle() => Jolt.PInvoke.CharacterBase_GetCosMaxSlopeAngle(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set the up vector for the character
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L69">Jolt/Physics/Character/CharacterBase.h:69</see>
|
|
/// <br/>
|
|
/// <c>void SetUp(Vec3Arg inUp)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetUp(float3 up) => Jolt.PInvoke.CharacterBase_SetUp(this, up);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L70">Jolt/Physics/Character/CharacterBase.h:70</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetUp() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetUp() => Jolt.PInvoke.CharacterBase_GetUp(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Every contact behind this plane can support the character
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L73">Jolt/Physics/Character/CharacterBase.h:73</see>
|
|
/// <br/>
|
|
/// <c>const Plane & GetSupportingVolume() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public Plane GetSupportingVolume() => Jolt.PInvoke.CharacterBase_GetSupportingVolume(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L74">Jolt/Physics/Character/CharacterBase.h:74</see>
|
|
/// <br/>
|
|
/// <c>void SetSupportingVolume(const Plane &inPlane)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetSupportingVolume(in Plane plane) =>
|
|
Jolt.PInvoke.CharacterBase_SetSupportingVolume(this, in plane);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Check if the normal of the ground surface is too steep to walk on
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L77">Jolt/Physics/Character/CharacterBase.h:77</see>
|
|
/// <br/>
|
|
/// <c>bool IsSlopeTooSteep(Vec3Arg inNormal) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsSlopeTooSteep(float3 normal) => Jolt.PInvoke.CharacterBase_IsSlopeTooSteep(this, normal);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Get the current shape that the character is using.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L85">Jolt/Physics/Character/CharacterBase.h:85</see>
|
|
/// <br/>
|
|
/// <c>const Shape * GetShape() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle carries its own reference; Dispose it once when you're done.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Shape GetShape() => Jolt.PInvoke.CharacterBase_GetShape(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Debug function to convert enum values to string
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L96">Jolt/Physics/Character/CharacterBase.h:96</see>
|
|
/// <br/>
|
|
/// <c>static const char * sToString(EGroundState inState)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe RefString8 ToDisplayString(CharacterBase.GroundState state) =>
|
|
(Ptr<byte>)Jolt.PInvoke.CharacterBase_ToDisplayString(state);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Current ground state
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L101">Jolt/Physics/Character/CharacterBase.h:101</see>
|
|
/// <br/>
|
|
/// <c>EGroundState GetGroundState() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public CharacterBase.GroundState GetGroundState() => Jolt.PInvoke.CharacterBase_GetGroundState(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Returns true if the player is supported by normal or steep ground
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L104">Jolt/Physics/Character/CharacterBase.h:104</see>
|
|
/// <br/>
|
|
/// <c>bool IsSupported() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsSupported() => Jolt.PInvoke.CharacterBase_IsSupported(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Get the contact point with the ground
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L107">Jolt/Physics/Character/CharacterBase.h:107</see>
|
|
/// <br/>
|
|
/// <c>RVec3 GetGroundPosition() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetGroundPosition() => Jolt.PInvoke.CharacterBase_GetGroundPosition(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Get the contact normal with the ground
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L110">Jolt/Physics/Character/CharacterBase.h:110</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetGroundNormal() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetGroundNormal() => Jolt.PInvoke.CharacterBase_GetGroundNormal(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Velocity in world space of ground
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L113">Jolt/Physics/Character/CharacterBase.h:113</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetGroundVelocity() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetGroundVelocity() => Jolt.PInvoke.CharacterBase_GetGroundVelocity(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Material that the character is standing on
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L116">Jolt/Physics/Character/CharacterBase.h:116</see>
|
|
/// <br/>
|
|
/// <c>const PhysicsMaterial * GetGroundMaterial() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle carries its own reference; Dispose it once when you're done.
|
|
/// </para>
|
|
/// </remarks>
|
|
public PhysicsMaterial GetGroundMaterial() => Jolt.PInvoke.CharacterBase_GetGroundMaterial(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// BodyID of the object the character is standing on. Note may have been removed!
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L119">Jolt/Physics/Character/CharacterBase.h:119</see>
|
|
/// <br/>
|
|
/// <c>BodyID GetGroundBodyID() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint GetGroundBodyID() => Jolt.PInvoke.CharacterBase_GetGroundBodyID(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sub part of the body that we're standing on.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L122">Jolt/Physics/Character/CharacterBase.h:122</see>
|
|
/// <br/>
|
|
/// <c>SubShapeID GetGroundSubShapeID() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint GetGroundSubShapeID() => Jolt.PInvoke.CharacterBase_GetGroundSubShapeID(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// User data value of the body that we're standing on
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L125">Jolt/Physics/Character/CharacterBase.h:125</see>
|
|
/// <br/>
|
|
/// <c>uint64 GetGroundUserData() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public ulong GetGroundUserData() => Jolt.PInvoke.CharacterBase_GetGroundUserData(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Saving / restoring state for replay
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L128">Jolt/Physics/Character/CharacterBase.h:128</see>
|
|
/// <br/>
|
|
/// <c>virtual void SaveState(StateRecorder &inStream) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SaveState(StateRecorder stream) => Jolt.PInvoke.CharacterBase_SaveState(this, stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterBase.h#L129">Jolt/Physics/Character/CharacterBase.h:129</see>
|
|
/// <br/>
|
|
/// <c>virtual void RestoreState(StateRecorder &inStream)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void RestoreState(StateRecorder stream) => Jolt.PInvoke.CharacterBase_RestoreState(this, stream);
|
|
|
|
public void AddRef() => Jolt.PInvoke.CharacterBase_AddRef(this);
|
|
|
|
public void Release() => Jolt.PInvoke.CharacterBase_Release(this);
|
|
|
|
public uint GetRefCount() => Jolt.PInvoke.CharacterBase_GetRefCount(this);
|
|
|
|
public void Dispose()
|
|
{
|
|
if (IsNull())
|
|
return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|