//
// 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 PlaneShape
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:16
///
/// class PlaneShapeSettings final : public ShapeSettings
///
///
[InteropHandle]
public readonly partial struct PlaneShapeSettings : IDisposable
{
///
///
/// Default constructor for deserialization
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:22
///
/// PlaneShapeSettings() = default
///
///
public static PlaneShapeSettings Create() => Jolt.PInvoke.PlaneShapeSettings_Create();
///
///
/// Create a plane shape.
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:25
///
/// explicit PlaneShapeSettings(const Plane &inPlane, const PhysicsMaterial *inMaterial = nullptr, float inHalfExtent = cDefaultHalfExtent)
///
///
public static PlaneShapeSettings Create(
in Plane plane,
PhysicsMaterial material = default,
float halfExtent = 1000f
) => Jolt.PInvoke.PlaneShapeSettings_Create_2(in plane, material, halfExtent);
///
public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI();
///
public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti);
///
public Shape CreateShape() => ((ShapeSettings)this).CreateShape();
///
///
/// Plane that describes the shape. The negative half space is considered solid.
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:30
///
/// Plane mPlane
///
///
public Plane GetPlane() => Jolt.PInvoke.PlaneShapeSettings_GetPlane(this);
///
///
/// Plane that describes the shape. The negative half space is considered solid.
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:30
///
/// Plane mPlane
///
///
public void SetPlane(Plane value) => Jolt.PInvoke.PlaneShapeSettings_SetPlane(this, value);
///
///
/// Surface material of the plane
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:32
///
/// RefConst<PhysicsMaterial> mMaterial
///
///
///
///
/// The returned handle carries its own reference; Dispose it once when you're done.
///
///
public PhysicsMaterial GetMaterial() => Jolt.PInvoke.PlaneShapeSettings_GetMaterial(this);
///
///
/// Surface material of the plane
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:32
///
/// RefConst<PhysicsMaterial> mMaterial
///
///
public void SetMaterial(PhysicsMaterial value) => Jolt.PInvoke.PlaneShapeSettings_SetMaterial(this, value);
///
///
/// Default half-extent of the plane (total size along 1 axis will be 2 * half-extent)
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:34
///
/// static constexpr float cDefaultHalfExtent = 1000.0f
///
///
public static float GetDefaultHalfExtent() => Jolt.PInvoke.PlaneShapeSettings_GetDefaultHalfExtent();
///
///
/// The bounding box of this plane will run from [-half_extent, half_extent]. Keep this as low as possible
/// for better broad phase performance.
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:36
///
/// float mHalfExtent = cDefaultHalfExtent
///
///
public float GetHalfExtent() => Jolt.PInvoke.PlaneShapeSettings_GetHalfExtent(this);
///
///
/// The bounding box of this plane will run from [-half_extent, half_extent]. Keep this as low as possible
/// for better broad phase performance.
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:36
///
/// float mHalfExtent = cDefaultHalfExtent
///
///
public void SetHalfExtent(float value) => Jolt.PInvoke.PlaneShapeSettings_SetHalfExtent(this, value);
public void AddRef() => ((ShapeSettings)this).AddRef();
public void Release() => ((ShapeSettings)this).Release();
public uint GetRefCount() => ((ShapeSettings)this).GetRefCount();
public static implicit operator ShapeSettings(PlaneShapeSettings value) =>
Unsafe.BitCast(value);
public void Dispose()
{
if (IsNull())
return;
Release();
}
///
public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult();
///
public ulong GetUserData() => ((ShapeSettings)this).GetUserData();
///
public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value);
}
}