//
// 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 CylinderShape
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:13
///
/// class CylinderShapeSettings final : public ConvexShapeSettings
///
///
[InteropHandle]
public readonly partial struct CylinderShapeSettings : IDisposable
{
///
///
/// Default constructor for deserialization
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:19
///
/// CylinderShapeSettings() = default
///
///
public static CylinderShapeSettings Create() => Jolt.PInvoke.CylinderShapeSettings_Create();
///
///
/// Create a shape centered around the origin with one top at (0, -inHalfHeight, 0) and the other at (0,
/// inHalfHeight, 0) and radius inRadius. (internally the convex radius will be subtracted from the cylinder
/// the total cylinder will not grow with the convex radius, but the edges of the cylinder will be rounded a
/// bit).
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:23
///
/// CylinderShapeSettings(float inHalfHeight, float inRadius, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr)
///
///
public static CylinderShapeSettings Create(
float halfHeight,
float radius,
float convexRadius = 0.05f,
PhysicsMaterial material = default
) => Jolt.PInvoke.CylinderShapeSettings_Create_2(halfHeight, radius, 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/CylinderShape.h:28
///
/// float mHalfHeight = 0.0f
///
///
public float GetHalfHeight() => Jolt.PInvoke.CylinderShapeSettings_GetHalfHeight(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:28
///
/// float mHalfHeight = 0.0f
///
///
public void SetHalfHeight(float value) => Jolt.PInvoke.CylinderShapeSettings_SetHalfHeight(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:29
///
/// float mRadius = 0.0f
///
///
public float GetRadius() => Jolt.PInvoke.CylinderShapeSettings_GetRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:29
///
/// float mRadius = 0.0f
///
///
public void SetRadius(float value) => Jolt.PInvoke.CylinderShapeSettings_SetRadius(this, value);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:30
///
/// float mConvexRadius = 0.0f
///
///
public float GetConvexRadius() => Jolt.PInvoke.CylinderShapeSettings_GetConvexRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:30
///
/// float mConvexRadius = 0.0f
///
///
public void SetConvexRadius(float value) => Jolt.PInvoke.CylinderShapeSettings_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(CylinderShapeSettings value) =>
Unsafe.BitCast(value);
public static implicit operator ShapeSettings(CylinderShapeSettings 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);
}
}