//
// 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 TaperedCylinderShape
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:13
///
/// class TaperedCylinderShapeSettings final : public ConvexShapeSettings
///
///
[InteropHandle]
public readonly partial struct TaperedCylinderShapeSettings : IDisposable
{
///
///
/// Default constructor for deserialization
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:19
///
/// TaperedCylinderShapeSettings() = default
///
///
public static TaperedCylinderShapeSettings Create() => Jolt.PInvoke.TaperedCylinderShapeSettings_Create();
///
///
/// 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
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:22
///
/// TaperedCylinderShapeSettings(float inHalfHeightOfTaperedCylinder, float inTopRadius, float inBottomRadius, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr)
///
///
public static TaperedCylinderShapeSettings Create(
float halfHeightOfTaperedCylinder,
float topRadius,
float bottomRadius,
float convexRadius = 0.05f,
PhysicsMaterial material = default
) =>
Jolt.PInvoke.TaperedCylinderShapeSettings_Create_2(
halfHeightOfTaperedCylinder,
topRadius,
bottomRadius,
convexRadius,
material
);
///
public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI();
///
public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti);
///
public Shape CreateShape() => ((ShapeSettings)this).CreateShape();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:28
///
/// float mHalfHeight = 0.0f
///
///
public float GetHalfHeight() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetHalfHeight(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:28
///
/// float mHalfHeight = 0.0f
///
///
public void SetHalfHeight(float value) => Jolt.PInvoke.TaperedCylinderShapeSettings_SetHalfHeight(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:29
///
/// float mTopRadius = 0.0f
///
///
public float GetTopRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetTopRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:29
///
/// float mTopRadius = 0.0f
///
///
public void SetTopRadius(float value) => Jolt.PInvoke.TaperedCylinderShapeSettings_SetTopRadius(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:30
///
/// float mBottomRadius = 0.0f
///
///
public float GetBottomRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetBottomRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:30
///
/// float mBottomRadius = 0.0f
///
///
public void SetBottomRadius(float value) =>
Jolt.PInvoke.TaperedCylinderShapeSettings_SetBottomRadius(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:31
///
/// float mConvexRadius = 0.0f
///
///
public float GetConvexRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetConvexRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:31
///
/// float mConvexRadius = 0.0f
///
///
public void SetConvexRadius(float value) =>
Jolt.PInvoke.TaperedCylinderShapeSettings_SetConvexRadius(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(TaperedCylinderShapeSettings value) =>
Unsafe.BitCast(value);
public static implicit operator ShapeSettings(TaperedCylinderShapeSettings 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);
}
}