//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:13
///
/// class TaperedCylinderShapeSettings final : public ConvexShapeSettings
///
///
///
///
/// Class that constructs a TaperedCylinderShape
///
///
[InteropHandle]
public readonly partial struct TaperedCylinderShapeSettings : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:19
///
/// TaperedCylinderShapeSettings() = default
///
///
///
///
/// Default constructor for deserialization
///
///
public static TaperedCylinderShapeSettings Create() => Jolt.PInvoke.TaperedCylinderShapeSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:22
///
/// TaperedCylinderShapeSettings(float inHalfHeightOfTaperedCylinder, float inTopRadius, float inBottomRadius, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr)
///
///
///
///
/// Create a tapered cylinder centered around the origin with bottom at (0, -inHalfHeightOfTaperedCylinder,
/// 0) with radius inBottomRadius and top at (0, inHalfHeightOfTaperedCylinder, 0) with radius inTopRadius
///
///
public static TaperedCylinderShapeSettings Create(float halfHeightOfTaperedCylinder, float topRadius, float bottomRadius, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.TaperedCylinderShapeSettings_Create_2(halfHeightOfTaperedCylinder, topRadius, bottomRadius, convexRadius, material);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:15
///
///
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public RTTI GetRTTI() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetRTTI(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:15
///
///
///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.TaperedCylinderShapeSettings_CastTo(this, rTTI);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:25
///
/// virtual ShapeResult Create() const override
///
///
///
///
/// See: ShapeSettings
///
///
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
///
///
public Shape CreateShape()
{
var _handle = Jolt.PInvoke.TaperedCylinderShapeSettings_CreateShape(this);
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
return _handle;
}
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:27
///
/// float mHalfHeight = 0.0f
///
///
public float GetHalfHeight() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetHalfHeight(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:27
///
/// float mHalfHeight = 0.0f
///
///
public void SetHalfHeight(float value) => Jolt.PInvoke.TaperedCylinderShapeSettings_SetHalfHeight(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:28
///
/// float mTopRadius = 0.0f
///
///
public float GetTopRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetTopRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:28
///
/// float mTopRadius = 0.0f
///
///
public void SetTopRadius(float value) => Jolt.PInvoke.TaperedCylinderShapeSettings_SetTopRadius(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:29
///
/// float mBottomRadius = 0.0f
///
///
public float GetBottomRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetBottomRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:29
///
/// float mBottomRadius = 0.0f
///
///
public void SetBottomRadius(float value) => Jolt.PInvoke.TaperedCylinderShapeSettings_SetBottomRadius(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:30
///
/// float mConvexRadius = 0.0f
///
///
public float GetConvexRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetConvexRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:30
///
/// float mConvexRadius = 0.0f
///
///
public void SetConvexRadius(float value) => Jolt.PInvoke.TaperedCylinderShapeSettings_SetConvexRadius(this, value);
public void AddRef() => Jolt.PInvoke.TaperedCylinderShapeSettings_AddRef(this);
public void Release() => Jolt.PInvoke.TaperedCylinderShapeSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetRefCount(this);
public static implicit operator ConvexShapeSettings(TaperedCylinderShapeSettings value) => Jolt.PInvoke.TaperedCylinderShapeSettings_AsConvexShapeSettings(value);
public static implicit operator ShapeSettings(TaperedCylinderShapeSettings value) => Jolt.PInvoke.TaperedCylinderShapeSettings_AsShapeSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}