//
// 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
{
///
///
/// Class that constructs a TaperedCapsuleShape
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:15
///
/// class TaperedCapsuleShapeSettings final : public ConvexShapeSettings
///
///
[InteropHandle]
public readonly partial struct TaperedCapsuleShapeSettings : IDisposable
{
///
///
/// Default constructor for deserialization
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:21
///
/// TaperedCapsuleShapeSettings() = default
///
///
public static TaperedCapsuleShapeSettings Create() => Jolt.PInvoke.TaperedCapsuleShapeSettings_Create();
///
///
/// Create a tapered capsule centered around the origin with one sphere cap at (0,
/// -inHalfHeightOfTaperedCylinder, 0) with radius inBottomRadius and the other at (0,
/// inHalfHeightOfTaperedCylinder, 0) with radius inTopRadius
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:24
///
/// TaperedCapsuleShapeSettings(float inHalfHeightOfTaperedCylinder, float inTopRadius, float inBottomRadius, const PhysicsMaterial *inMaterial = nullptr)
///
///
public static TaperedCapsuleShapeSettings Create(
float halfHeightOfTaperedCylinder,
float topRadius,
float bottomRadius,
PhysicsMaterial material = default
) =>
Jolt.PInvoke.TaperedCapsuleShapeSettings_Create_2(
halfHeightOfTaperedCylinder,
topRadius,
bottomRadius,
material
);
///
public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI();
///
public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti);
///
///
/// Check if the settings are valid
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:27
///
/// bool IsValid() const
///
///
public bool IsValid() => Jolt.PInvoke.TaperedCapsuleShapeSettings_IsValid(this);
///
///
/// Checks if the settings of this tapered capsule make this shape a sphere
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:30
///
/// bool IsSphere() const
///
///
public bool IsSphere() => Jolt.PInvoke.TaperedCapsuleShapeSettings_IsSphere(this);
///
public Shape CreateShape() => ((ShapeSettings)this).CreateShape();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:36
///
/// float mHalfHeightOfTaperedCylinder = 0.0f
///
///
public float GetHalfHeightOfTaperedCylinder() =>
Jolt.PInvoke.TaperedCapsuleShapeSettings_GetHalfHeightOfTaperedCylinder(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:36
///
/// float mHalfHeightOfTaperedCylinder = 0.0f
///
///
public void SetHalfHeightOfTaperedCylinder(float value) =>
Jolt.PInvoke.TaperedCapsuleShapeSettings_SetHalfHeightOfTaperedCylinder(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:37
///
/// float mTopRadius = 0.0f
///
///
public float GetTopRadius() => Jolt.PInvoke.TaperedCapsuleShapeSettings_GetTopRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:37
///
/// float mTopRadius = 0.0f
///
///
public void SetTopRadius(float value) => Jolt.PInvoke.TaperedCapsuleShapeSettings_SetTopRadius(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:38
///
/// float mBottomRadius = 0.0f
///
///
public float GetBottomRadius() => Jolt.PInvoke.TaperedCapsuleShapeSettings_GetBottomRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:38
///
/// float mBottomRadius = 0.0f
///
///
public void SetBottomRadius(float value) =>
Jolt.PInvoke.TaperedCapsuleShapeSettings_SetBottomRadius(this, value);
public void AddRef() => ((ShapeSettings)this).AddRef();
public void Release() => ((ShapeSettings)this).Release();
public uint GetRefCount() => ((ShapeSettings)this).GetRefCount();
public static implicit operator ConvexShapeSettings(TaperedCapsuleShapeSettings value) =>
Unsafe.BitCast(value);
public static implicit operator ShapeSettings(TaperedCapsuleShapeSettings value) =>
Unsafe.BitCast(value);
public void Dispose()
{
if (IsNull())
return;
Release();
}
///
public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density);
///
public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial();
///
public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value);
///
public float GetDensity() => ((ConvexShapeSettings)this).GetDensity();
///
public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult();
///
public ulong GetUserData() => ((ShapeSettings)this).GetUserData();
///
public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value);
}
}