//
// 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
{
///
///
/// Base class for configuration of a character
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:20
///
/// class CharacterBaseSettings : public RefTarget<CharacterBaseSettings>
///
///
[InteropHandle]
public readonly partial struct CharacterBaseSettings : IDisposable
{
///
///
/// Constructor
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:26
///
/// CharacterBaseSettings() = default
///
///
public static CharacterBaseSettings Create() => Jolt.PInvoke.CharacterBaseSettings_Create();
///
///
/// Vector indicating the up direction of the character
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:34
///
/// Vec3 mUp = Vec3::sAxisY()
///
///
public float3 GetUp() => Jolt.PInvoke.CharacterBaseSettings_GetUp(this);
///
///
/// Vector indicating the up direction of the character
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:34
///
/// Vec3 mUp = Vec3::sAxisY()
///
///
public void SetUp(float3 value) => Jolt.PInvoke.CharacterBaseSettings_SetUp(this, value);
///
///
/// Plane, defined in local space relative to the character. Every contact behind this plane can support the
/// character, every contact in front of this plane is treated as only colliding with the player. Default:
/// Accept any contact.
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:39
///
/// Plane mSupportingVolume { Vec3::sAxisY(), -1.0e10f }
///
///
public Plane GetSupportingVolume() => Jolt.PInvoke.CharacterBaseSettings_GetSupportingVolume(this);
///
///
/// Plane, defined in local space relative to the character. Every contact behind this plane can support the
/// character, every contact in front of this plane is treated as only colliding with the player. Default:
/// Accept any contact.
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:39
///
/// Plane mSupportingVolume { Vec3::sAxisY(), -1.0e10f }
///
///
public void SetSupportingVolume(Plane value) =>
Jolt.PInvoke.CharacterBaseSettings_SetSupportingVolume(this, value);
///
///
/// Maximum angle of slope that character can still walk on (radians).
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:42
///
/// float mMaxSlopeAngle = DegreesToRadians(50.0f)
///
///
public float GetMaxSlopeAngle() => Jolt.PInvoke.CharacterBaseSettings_GetMaxSlopeAngle(this);
///
///
/// Maximum angle of slope that character can still walk on (radians).
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:42
///
/// float mMaxSlopeAngle = DegreesToRadians(50.0f)
///
///
public void SetMaxSlopeAngle(float value) => Jolt.PInvoke.CharacterBaseSettings_SetMaxSlopeAngle(this, value);
///
///
/// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with
/// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex
/// edges.
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:45
///
/// bool mEnhancedInternalEdgeRemoval = false
///
///
public bool GetEnhancedInternalEdgeRemoval() =>
Jolt.PInvoke.CharacterBaseSettings_GetEnhancedInternalEdgeRemoval(this);
///
///
/// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with
/// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex
/// edges.
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:45
///
/// bool mEnhancedInternalEdgeRemoval = false
///
///
public void SetEnhancedInternalEdgeRemoval(bool value) =>
Jolt.PInvoke.CharacterBaseSettings_SetEnhancedInternalEdgeRemoval(this, value);
///
///
/// Initial shape that represents the character's volume. Usually this is a capsule, make sure the shape is
/// made so that the bottom of the shape is at (0, 0, 0).
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:49
///
/// RefConst<Shape> mShape
///
///
///
///
/// The returned handle carries its own reference; Dispose it once when you're done.
///
///
public Shape GetShape() => Jolt.PInvoke.CharacterBaseSettings_GetShape(this);
///
///
/// Initial shape that represents the character's volume. Usually this is a capsule, make sure the shape is
/// made so that the bottom of the shape is at (0, 0, 0).
///
///
/// C++:
/// Jolt/Physics/Character/CharacterBase.h:49
///
/// RefConst<Shape> mShape
///
///
public void SetShape(Shape value) => Jolt.PInvoke.CharacterBaseSettings_SetShape(this, value);
public void AddRef() => Jolt.PInvoke.CharacterBaseSettings_AddRef(this);
public void Release() => Jolt.PInvoke.CharacterBaseSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.CharacterBaseSettings_GetRefCount(this);
public void Dispose()
{
if (IsNull())
return;
Release();
}
}
}