//
// 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:42
///
/// class PlaneShape final : public Shape
///
///
///
///
/// A plane shape. The negative half space is considered solid. Planes cannot be dynamic objects, only static or kinematic.
/// The plane is considered an infinite shape, but testing collision outside of its bounding box (defined by the half-extent parameter) will not return a collision result.
/// At the edge of the bounding box collision with the plane will be inconsistent. If you need something of a well defined size, a box shape may be better.
///
///
[InteropHandle]
public readonly partial struct PlaneShape : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:48
///
/// PlaneShape()
///
///
///
///
/// Constructor
///
///
public static PlaneShape Create() => Jolt.PInvoke.PlaneShape_Create();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:49
///
/// explicit PlaneShape(const Plane &inPlane, const PhysicsMaterial *inMaterial = nullptr, float inHalfExtent = PlaneShapeSettings::cDefaultHalfExtent)
///
///
public static PlaneShape Create(Plane plane, PhysicsMaterial material, float halfExtent) => Jolt.PInvoke.PlaneShape_Create_2(plane, material, halfExtent);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:53
///
/// const Plane & GetPlane() const
///
///
///
///
/// Get the plane
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public Plane GetPlane() => Jolt.PInvoke.PlaneShape_GetPlane(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:56
///
/// float GetHalfExtent() const
///
///
///
///
/// Get the half-extent of the bounding box of the plane
///
///
public float GetHalfExtent() => Jolt.PInvoke.PlaneShape_GetHalfExtent(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:59
///
/// virtual bool MustBeStatic() const override
///
///
///
///
/// See Shape::MustBeStatic
///
///
public bool MustBeStatic() => Jolt.PInvoke.PlaneShape_MustBeStatic(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:65
///
/// virtual uint GetSubShapeIDBitsRecursive() const override
///
///
///
///
/// See Shape::GetSubShapeIDBitsRecursive
///
///
public uint GetSubShapeIDBitsRecursive() => Jolt.PInvoke.PlaneShape_GetSubShapeIDBitsRecursive(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:68
///
/// virtual float GetInnerRadius() const override
///
///
///
///
/// See Shape::GetInnerRadius
///
///
public float GetInnerRadius() => Jolt.PInvoke.PlaneShape_GetInnerRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:74
///
/// virtual const PhysicsMaterial * GetMaterial(const SubShapeID &inSubShapeID) const override
///
///
///
///
/// See Shape::GetMaterial
///
///
public PhysicsMaterial GetMaterial(uint subShapeID) => Jolt.PInvoke.PlaneShape_GetMaterial(this, subShapeID);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:77
///
/// virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override
///
///
///
///
/// See Shape::GetSurfaceNormal
///
///
public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.PlaneShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:84
///
/// virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override
///
///
///
///
/// See Shape::Draw
///
///
public void Draw(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, bool useMaterialColors, bool drawWireframe) => Jolt.PInvoke.PlaneShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:95
///
/// virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &inVertices, uint inNumVertices, int inCollidingShapeIndex) const override
///
///
///
///
/// See: Shape::CollideSoftBodyVertices
///
///
public void CollideSoftBodyVertices(float4x4 centerOfMassTransform, float3 scale, CollideSoftBodyVertexIterator vertices, uint numVertices, int collidingShapeIndex) => Jolt.PInvoke.PlaneShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:98
///
/// virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override
///
///
///
///
/// See Shape::GetTrianglesStart
///
///
public void GetTrianglesStart(ref Shape.GetTrianglesContext context, AABox box, float3 positionCOM, floatQuat rotation, float3 scale) => Jolt.PInvoke.PlaneShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:104
///
/// virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy JPH_IF_DEBUG_RENDERER(, RVec3Arg inBaseOffset)) const override
///
///
///
///
/// See Shape::GetSubmergedVolume
///
///
public void GetSubmergedVolume(float4x4 centerOfMassTransform, float3 scale, Plane surface, out float totalVolume, out float submergedVolume, out float3 centerOfBuoyancy, float3 baseOffset) => Jolt.PInvoke.PlaneShape_GetSubmergedVolume(this, centerOfMassTransform, scale, surface, out totalVolume, out submergedVolume, out centerOfBuoyancy, baseOffset);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:107
///
/// virtual void SaveBinaryState(StreamOut &inStream) const override
///
///
///
///
/// See Shape
///
///
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.PlaneShape_SaveBinaryState(this, stream);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:115
///
/// virtual float GetVolume() const override
///
///
///
///
/// See Shape::GetVolume
///
///
public float GetVolume() => Jolt.PInvoke.PlaneShape_GetVolume(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:118
///
/// void SetMaterial(const PhysicsMaterial *inMaterial)
///
///
///
///
/// Material of the shape
///
///
public void SetMaterial(PhysicsMaterial material) => Jolt.PInvoke.PlaneShape_SetMaterial(this, material);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:119
///
/// const PhysicsMaterial * GetMaterial() const
///
///
public PhysicsMaterial GetMaterial() => Jolt.PInvoke.PlaneShape_GetMaterial_2(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/PlaneShape.h:122
///
/// static void sRegister()
///
///
///
///
/// Register shape functions with the registry
///
///
public static void sRegister() => Jolt.PInvoke.PlaneShape_sRegister();
public void AddRef() => Jolt.PInvoke.PlaneShape_AddRef(this);
public void Release() => Jolt.PInvoke.PlaneShape_Release(this);
public uint GetRefCount() => Jolt.PInvoke.PlaneShape_GetRefCount(this);
public static implicit operator Shape(PlaneShape value) => Jolt.PInvoke.PlaneShape_AsShape(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}