// // 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/PlaneShape.h:16 ///
/// class PlaneShapeSettings final : public ShapeSettings ///
///
/// /// /// Class that constructs a PlaneShape /// /// [InteropHandle] public readonly partial struct PlaneShapeSettings : IDisposable { /// /// /// C++: /// Jolt/Physics/Collision/Shape/PlaneShape.h:22 ///
/// PlaneShapeSettings() = default ///
///
/// /// /// Default constructor for deserialization /// /// public static PlaneShapeSettings Create() => Jolt.PInvoke.PlaneShapeSettings_Create(); /// /// /// C++: /// Jolt/Physics/Collision/Shape/PlaneShape.h:25 ///
/// explicit PlaneShapeSettings(const Plane &inPlane, const PhysicsMaterial *inMaterial = nullptr, float inHalfExtent = cDefaultHalfExtent) ///
///
/// /// /// Create a plane shape. /// /// public static PlaneShapeSettings Create(Plane plane, PhysicsMaterial material, float halfExtent) => Jolt.PInvoke.PlaneShapeSettings_Create_2(plane, material, halfExtent); /// /// /// C++: /// Jolt/Physics/Collision/Shape/PlaneShape.h:18 ///
/// ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public RTTI GetRTTI() => Jolt.PInvoke.PlaneShapeSettings_GetRTTI(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/PlaneShape.h:18 ///
/// ///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.PlaneShapeSettings_CastTo(this, rTTI); /// /// /// C++: /// Jolt/Physics/Collision/Shape/PlaneShape.h:28 ///
/// 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.PlaneShapeSettings_CreateShape(this); if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError()); return _handle; } /// /// /// Surface material of the plane /// /// /// C++: /// Jolt/Physics/Collision/Shape/PlaneShape.h:32 ///
/// RefConst<PhysicsMaterial> mMaterial ///
///
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); /// /// /// 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() => Jolt.PInvoke.PlaneShapeSettings_AddRef(this); public void Release() => Jolt.PInvoke.PlaneShapeSettings_Release(this); public uint GetRefCount() => Jolt.PInvoke.PlaneShapeSettings_GetRefCount(this); public static implicit operator ShapeSettings(PlaneShapeSettings value) => Jolt.PInvoke.PlaneShapeSettings_AsShapeSettings(value); public void Dispose() { if (IsNull()) return; Release(); } } }