brutal/brutal.jolt/Brutal.Jolt/Generated/Classes/SphereShape.gen.cs
2026-10-15 14:12:02 +13:00

233 lines
12 KiB
C#

// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L31">Jolt/Physics/Collision/Shape/SphereShape.h:31</see>
/// <br/>
/// <c>class SphereShape final : public ConvexShape</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// A sphere, centered around the origin.
/// Note that it is implemented as a point with convex radius.
/// </code>
/// </remarks>
[InteropHandle]
public readonly partial struct SphereShape : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L37">Jolt/Physics/Collision/Shape/SphereShape.h:37</see>
/// <br/>
/// <c>SphereShape()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Constructor
/// </para>
/// </remarks>
public static SphereShape Create() => Jolt.PInvoke.SphereShape_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L41">Jolt/Physics/Collision/Shape/SphereShape.h:41</see>
/// <br/>
/// <c>explicit SphereShape(float inRadius, const PhysicsMaterial *inMaterial = nullptr)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Create a sphere with radius inRadius
/// </para>
/// </remarks>
public static SphereShape Create(float radius, PhysicsMaterial material) => Jolt.PInvoke.SphereShape_Create_2(radius, material);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L44">Jolt/Physics/Collision/Shape/SphereShape.h:44</see>
/// <br/>
/// <c>float GetRadius() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Radius of the sphere
/// </para>
/// </remarks>
public float GetRadius() => Jolt.PInvoke.SphereShape_GetRadius(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L54">Jolt/Physics/Collision/Shape/SphereShape.h:54</see>
/// <br/>
/// <c>virtual float GetInnerRadius() const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetInnerRadius
/// </para>
/// </remarks>
public float GetInnerRadius() => Jolt.PInvoke.SphereShape_GetInnerRadius(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L60">Jolt/Physics/Collision/Shape/SphereShape.h:60</see>
/// <br/>
/// <c>virtual Vec3 GetSurfaceNormal(const SubShapeID &amp;inSubShapeID, Vec3Arg inLocalSurfacePosition) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetSurfaceNormal
/// </para>
/// </remarks>
public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.SphereShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L69">Jolt/Physics/Collision/Shape/SphereShape.h:69</see>
/// <br/>
/// <c>virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &amp;inSurface, float &amp;outTotalVolume, float &amp;outSubmergedVolume, Vec3 &amp;outCenterOfBuoyancy JPH_IF_DEBUG_RENDERER(, RVec3Arg inBaseOffset)) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetSubmergedVolume
/// </para>
/// </remarks>
public void GetSubmergedVolume(float4x4 centerOfMassTransform, float3 scale, Plane surface, out float totalVolume, out float submergedVolume, out float3 centerOfBuoyancy, float3 baseOffset) => Jolt.PInvoke.SphereShape_GetSubmergedVolume(this, centerOfMassTransform, scale, surface, out totalVolume, out submergedVolume, out centerOfBuoyancy, baseOffset);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L73">Jolt/Physics/Collision/Shape/SphereShape.h:73</see>
/// <br/>
/// <c>virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::Draw
/// </para>
/// </remarks>
public void Draw(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, bool useMaterialColors, bool drawWireframe) => Jolt.PInvoke.SphereShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L84">Jolt/Physics/Collision/Shape/SphereShape.h:84</see>
/// <br/>
/// <c>virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &amp;inVertices, uint inNumVertices, int inCollidingShapeIndex) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See: Shape::CollideSoftBodyVertices
/// </para>
/// </remarks>
public void CollideSoftBodyVertices(float4x4 centerOfMassTransform, float3 scale, CollideSoftBodyVertexIterator vertices, uint numVertices, int collidingShapeIndex) => Jolt.PInvoke.SphereShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L87">Jolt/Physics/Collision/Shape/SphereShape.h:87</see>
/// <br/>
/// <c>virtual void GetTrianglesStart(GetTrianglesContext &amp;ioContext, const AABox &amp;inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetTrianglesStart
/// </para>
/// </remarks>
public void GetTrianglesStart(ref Shape.GetTrianglesContext context, AABox box, float3 positionCOM, floatQuat rotation, float3 scale) => Jolt.PInvoke.SphereShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L93">Jolt/Physics/Collision/Shape/SphereShape.h:93</see>
/// <br/>
/// <c>virtual void SaveBinaryState(StreamOut &amp;inStream) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape
/// </para>
/// </remarks>
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.SphereShape_SaveBinaryState(this, stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L99">Jolt/Physics/Collision/Shape/SphereShape.h:99</see>
/// <br/>
/// <c>virtual float GetVolume() const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::GetVolume
/// </para>
/// </remarks>
public float GetVolume() => Jolt.PInvoke.SphereShape_GetVolume(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L102">Jolt/Physics/Collision/Shape/SphereShape.h:102</see>
/// <br/>
/// <c>virtual bool IsValidScale(Vec3Arg inScale) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::IsValidScale
/// </para>
/// </remarks>
public bool IsValidScale(float3 scale) => Jolt.PInvoke.SphereShape_IsValidScale(this, scale);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L105">Jolt/Physics/Collision/Shape/SphereShape.h:105</see>
/// <br/>
/// <c>virtual Vec3 MakeScaleValid(Vec3Arg inScale) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape::MakeScaleValid
/// </para>
/// </remarks>
public float3 MakeScaleValid(float3 scale) => Jolt.PInvoke.SphereShape_MakeScaleValid(this, scale);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L108">Jolt/Physics/Collision/Shape/SphereShape.h:108</see>
/// <br/>
/// <c>static void sRegister()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Register shape functions with the registry
/// </para>
/// </remarks>
public static void sRegister() => Jolt.PInvoke.SphereShape_sRegister();
public void AddRef() => Jolt.PInvoke.SphereShape_AddRef(this);
public void Release() => Jolt.PInvoke.SphereShape_Release(this);
public uint GetRefCount() => Jolt.PInvoke.SphereShape_GetRefCount(this);
public static implicit operator ConvexShape(SphereShape value) => Jolt.PInvoke.SphereShape_AsConvexShape(value);
public static implicit operator Shape(SphereShape value) => Jolt.PInvoke.SphereShape_AsShape(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}