mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 21:18:24 +01:00
257 lines
13 KiB
C#
257 lines
13 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/ConvexShape.h#L35">Jolt/Physics/Collision/Shape/ConvexShape.h:35</see>
|
|
/// <br/>
|
|
/// <c>class ConvexShape : public Shape</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Base class for all convex shapes. Defines a virtual interface.
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct ConvexShape : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L91">Jolt/Physics/Collision/Shape/ConvexShape.h:91</see>
|
|
/// <br/>
|
|
/// <c>enum class ESupportMode</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// How the GetSupport function should behave
|
|
/// </para>
|
|
/// </remarks>
|
|
public enum ESupportMode : int
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Return the shape excluding the convex radius, Support::GetConvexRadius will return the convex radius
|
|
/// if there is one, but adding this radius may not result in the most accurate/efficient representation
|
|
/// of shapes with sharp edges
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L93">Jolt/Physics/Collision/Shape/ConvexShape.h:93</see>
|
|
/// <br/>
|
|
/// <c>ExcludeConvexRadius</c>
|
|
/// </para>
|
|
/// </summary>
|
|
ExcludeConvexRadius,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Return the shape including the convex radius, Support::GetSupport includes the convex radius if
|
|
/// there is one, Support::GetConvexRadius will return 0
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L94">Jolt/Physics/Collision/Shape/ConvexShape.h:94</see>
|
|
/// <br/>
|
|
/// <c>IncludeConvexRadius</c>
|
|
/// </para>
|
|
/// </summary>
|
|
IncludeConvexRadius,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Use both Support::GetSupport add Support::GetConvexRadius to get a support point that matches the
|
|
/// original shape as accurately/efficiently as possible
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L95">Jolt/Physics/Collision/Shape/ConvexShape.h:95</see>
|
|
/// <br/>
|
|
/// <c>Default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
Default,
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// Convex shapes don't have sub shapes
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L46">Jolt/Physics/Collision/Shape/ConvexShape.h:46</see>
|
|
/// <br/>
|
|
/// <c>virtual uint GetSubShapeIDBitsRecursive() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetSubShapeIDBitsRecursive
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint GetSubShapeIDBitsRecursive() => Jolt.PInvoke.ConvexShape_GetSubShapeIDBitsRecursive(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L49">Jolt/Physics/Collision/Shape/ConvexShape.h:49</see>
|
|
/// <br/>
|
|
/// <c>virtual const PhysicsMaterial * GetMaterial(const SubShapeID &inSubShapeID) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetMaterial
|
|
/// </para>
|
|
/// </remarks>
|
|
public PhysicsMaterial GetMaterial(uint subShapeID) => Jolt.PInvoke.ConvexShape_GetMaterial(this, subShapeID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L59">Jolt/Physics/Collision/Shape/ConvexShape.h:59</see>
|
|
/// <br/>
|
|
/// <c>virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &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.ConvexShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L65">Jolt/Physics/Collision/Shape/ConvexShape.h:65</see>
|
|
/// <br/>
|
|
/// <c>virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &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.ConvexShape_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/ConvexShape.h#L105">Jolt/Physics/Collision/Shape/ConvexShape.h:105</see>
|
|
/// <br/>
|
|
/// <c>void SetMaterial(const PhysicsMaterial *inMaterial)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Material of the shape
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetMaterial(PhysicsMaterial material) => Jolt.PInvoke.ConvexShape_SetMaterial(this, material);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L106">Jolt/Physics/Collision/Shape/ConvexShape.h:106</see>
|
|
/// <br/>
|
|
/// <c>const PhysicsMaterial * GetMaterial() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public PhysicsMaterial GetMaterial() => Jolt.PInvoke.ConvexShape_GetMaterial_2(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L109">Jolt/Physics/Collision/Shape/ConvexShape.h:109</see>
|
|
/// <br/>
|
|
/// <c>void SetDensity(float inDensity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Set density of the shape (kg / m^3)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetDensity(float density) => Jolt.PInvoke.ConvexShape_SetDensity(this, density);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L112">Jolt/Physics/Collision/Shape/ConvexShape.h:112</see>
|
|
/// <br/>
|
|
/// <c>float GetDensity() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get density of the shape (kg / m^3)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetDensity() => Jolt.PInvoke.ConvexShape_GetDensity(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L116">Jolt/Physics/Collision/Shape/ConvexShape.h:116</see>
|
|
/// <br/>
|
|
/// <c>virtual void DrawGetSupportFunction(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inDrawSupportDirection) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::DrawGetSupportFunction
|
|
/// </para>
|
|
/// </remarks>
|
|
public void DrawGetSupportFunction(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, bool drawSupportDirection) => Jolt.PInvoke.ConvexShape_DrawGetSupportFunction(this, renderer, centerOfMassTransform, scale, color, drawSupportDirection);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L119">Jolt/Physics/Collision/Shape/ConvexShape.h:119</see>
|
|
/// <br/>
|
|
/// <c>virtual void DrawGetSupportingFace(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::DrawGetSupportingFace
|
|
/// </para>
|
|
/// </remarks>
|
|
public void DrawGetSupportingFace(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale) => Jolt.PInvoke.ConvexShape_DrawGetSupportingFace(this, renderer, centerOfMassTransform, scale);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L123">Jolt/Physics/Collision/Shape/ConvexShape.h:123</see>
|
|
/// <br/>
|
|
/// <c>virtual void SaveBinaryState(StreamOut &inStream) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.ConvexShape_SaveBinaryState(this, stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexShape.h#L128">Jolt/Physics/Collision/Shape/ConvexShape.h:128</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.ConvexShape_sRegister();
|
|
public void AddRef() => Jolt.PInvoke.ConvexShape_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.ConvexShape_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.ConvexShape_GetRefCount(this);
|
|
public static implicit operator Shape(ConvexShape value) => Jolt.PInvoke.ConvexShape_AsShape(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|