//
// 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/CylinderShape.h:34
///
/// class CylinderShape final : public ConvexShape
///
///
///
///
/// A cylinder
///
///
[InteropHandle]
public readonly partial struct CylinderShape : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:40
///
/// CylinderShape()
///
///
///
///
/// Constructor
///
///
public static CylinderShape Create() => Jolt.PInvoke.CylinderShape_Create();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:45
///
/// CylinderShape(float inHalfHeight, float inRadius, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr)
///
///
///
///
/// 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).
///
///
public static CylinderShape Create(float halfHeight, float radius, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.CylinderShape_Create_2(halfHeight, radius, convexRadius, material);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:48
///
/// float GetHalfHeight() const
///
///
///
///
/// Get half height of cylinder
///
///
public float GetHalfHeight() => Jolt.PInvoke.CylinderShape_GetHalfHeight(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:51
///
/// float GetRadius() const
///
///
///
///
/// Get radius of cylinder
///
///
public float GetRadius() => Jolt.PInvoke.CylinderShape_GetRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:57
///
/// virtual float GetInnerRadius() const override
///
///
///
///
/// See Shape::GetInnerRadius
///
///
public float GetInnerRadius() => Jolt.PInvoke.CylinderShape_GetInnerRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:63
///
/// virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override
///
///
///
///
/// See Shape::GetSurfaceNormal
///
///
public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.CylinderShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:73
///
/// 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.CylinderShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:84
///
/// 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.CylinderShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:87
///
/// 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.CylinderShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:93
///
/// virtual void SaveBinaryState(StreamOut &inStream) const override
///
///
///
///
/// See Shape
///
///
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.CylinderShape_SaveBinaryState(this, stream);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:99
///
/// virtual float GetVolume() const override
///
///
///
///
/// See Shape::GetVolume
///
///
public float GetVolume() => Jolt.PInvoke.CylinderShape_GetVolume(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:102
///
/// float GetConvexRadius() const
///
///
///
///
/// Get the convex radius of this cylinder
///
///
public float GetConvexRadius() => Jolt.PInvoke.CylinderShape_GetConvexRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:105
///
/// virtual bool IsValidScale(Vec3Arg inScale) const override
///
///
///
///
/// See Shape::IsValidScale
///
///
public bool IsValidScale(float3 scale) => Jolt.PInvoke.CylinderShape_IsValidScale(this, scale);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:108
///
/// virtual Vec3 MakeScaleValid(Vec3Arg inScale) const override
///
///
///
///
/// See Shape::MakeScaleValid
///
///
public float3 MakeScaleValid(float3 scale) => Jolt.PInvoke.CylinderShape_MakeScaleValid(this, scale);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/CylinderShape.h:111
///
/// static void sRegister()
///
///
///
///
/// Register shape functions with the registry
///
///
public static void sRegister() => Jolt.PInvoke.CylinderShape_sRegister();
public void AddRef() => Jolt.PInvoke.CylinderShape_AddRef(this);
public void Release() => Jolt.PInvoke.CylinderShape_Release(this);
public uint GetRefCount() => Jolt.PInvoke.CylinderShape_GetRefCount(this);
public static implicit operator ConvexShape(CylinderShape value) => Jolt.PInvoke.CylinderShape_AsConvexShape(value);
public static implicit operator Shape(CylinderShape value) => Jolt.PInvoke.CylinderShape_AsShape(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}