mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
297
Brutal.Jolt/Generated/Classes/DebugRendererSimple.gen.cs
Normal file
297
Brutal.Jolt/Generated/Classes/DebugRendererSimple.gen.cs
Normal file
|
|
@ -0,0 +1,297 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
|
||||
namespace Brutal.JoltApi
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Inherit from this class to simplify implementing a debug renderer, start with this implementation:
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Renderer/DebugRendererSimple.h#L37">Jolt/Renderer/DebugRendererSimple.h:37</see>
|
||||
/// <br/>
|
||||
/// <c>class JPH_DEBUG_RENDERER_EXPORT DebugRendererSimple : public DebugRenderer</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Inherit from this class to simplify implementing a debug renderer, start with this implementation:
|
||||
///
|
||||
/// class MyDebugRenderer : public JPH::DebugRendererSimple
|
||||
/// {
|
||||
/// public:
|
||||
/// virtual void DrawLine(JPH::RVec3Arg inFrom, JPH::RVec3Arg inTo, JPH::ColorArg inColor) override
|
||||
/// {
|
||||
/// // Implement
|
||||
/// }
|
||||
///
|
||||
/// virtual void DrawTriangle(JPH::RVec3Arg inV1, JPH::RVec3Arg inV2, JPH::RVec3Arg inV3, JPH::ColorArg inColor, ECastShadow inCastShadow) override
|
||||
/// {
|
||||
/// // Implement
|
||||
/// }
|
||||
///
|
||||
/// virtual void DrawText3D(JPH::RVec3Arg inPosition, const string_view &inString, JPH::ColorArg inColor, float inHeight) override
|
||||
/// {
|
||||
/// // Implement
|
||||
/// }
|
||||
/// };
|
||||
///
|
||||
/// Note that this class is meant to be a quick start for implementing a debug renderer, it is not the most efficient way to implement a debug renderer.
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
[InteropHandle]
|
||||
public readonly partial struct DebugRendererSimple
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Should be called every frame by the application to provide the camera position. This is used to
|
||||
/// determine the correct LOD for rendering.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Renderer/DebugRendererSimple.h#L47">Jolt/Renderer/DebugRendererSimple.h:47</see>
|
||||
/// <br/>
|
||||
/// <c>void SetCameraPos(RVec3Arg inCameraPos)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void SetCameraPos(float3 cameraPos) => Jolt.PInvoke.DebugRendererSimple_SetCameraPos(this, cameraPos);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Fallback implementation that uses DrawLine to draw a triangle (override this if you have a version that
|
||||
/// renders solid triangles)
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Renderer/DebugRendererSimple.h#L54">Jolt/Renderer/DebugRendererSimple.h:54</see>
|
||||
/// <br/>
|
||||
/// <c>virtual void DrawTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor, ECastShadow inCastShadow) override</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void DrawTriangle(float3 v1, float3 v2, float3 v3, uint color, DebugRenderer.CastShadow castShadow) =>
|
||||
Jolt.PInvoke.DebugRendererSimple_DrawTriangle(this, v1, v2, v3, color, castShadow);
|
||||
|
||||
public static implicit operator DebugRenderer(DebugRendererSimple value) =>
|
||||
Unsafe.BitCast<DebugRendererSimple, DebugRenderer>(value);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.NextFrame()"/>
|
||||
public void NextFrame() => ((DebugRenderer)this).NextFrame();
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawLine(float3, float3, uint)"/>
|
||||
public void DrawLine(float3 from, float3 to, uint color) => ((DebugRenderer)this).DrawLine(from, to, color);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawWireBox(in AABox, uint)"/>
|
||||
public void DrawWireBox(in AABox box, uint color) => ((DebugRenderer)this).DrawWireBox(in box, color);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawWireBox(OrientedBox, uint)"/>
|
||||
public void DrawWireBox(OrientedBox box, uint color) => ((DebugRenderer)this).DrawWireBox(box, color);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawWireBox(in float4x4, in AABox, uint)"/>
|
||||
public void DrawWireBox(in float4x4 matrix, in AABox box, uint color) =>
|
||||
((DebugRenderer)this).DrawWireBox(in matrix, in box, color);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawMarker(float3, uint, float)"/>
|
||||
public void DrawMarker(float3 position, uint color, float size) =>
|
||||
((DebugRenderer)this).DrawMarker(position, color, size);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawArrow(float3, float3, uint, float)"/>
|
||||
public void DrawArrow(float3 from, float3 to, uint color, float size) =>
|
||||
((DebugRenderer)this).DrawArrow(from, to, color, size);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawCoordinateSystem(in float4x4, float)"/>
|
||||
public void DrawCoordinateSystem(in float4x4 transform, float size = 1f) =>
|
||||
((DebugRenderer)this).DrawCoordinateSystem(in transform, size);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawPlane(float3, float3, uint, float)"/>
|
||||
public void DrawPlane(float3 point, float3 normal, uint color, float size) =>
|
||||
((DebugRenderer)this).DrawPlane(point, normal, color, size);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawWireTriangle(float3, float3, float3, uint)"/>
|
||||
public void DrawWireTriangle(float3 v1, float3 v2, float3 v3, uint color) =>
|
||||
((DebugRenderer)this).DrawWireTriangle(v1, v2, v3, color);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawWireSphere(float3, float, uint, int)"/>
|
||||
public void DrawWireSphere(float3 center, float radius, uint color, int level = 3) =>
|
||||
((DebugRenderer)this).DrawWireSphere(center, radius, color, level);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawWireUnitSphere(in float4x4, uint, int)"/>
|
||||
public void DrawWireUnitSphere(in float4x4 matrix, uint color, int level = 3) =>
|
||||
((DebugRenderer)this).DrawWireUnitSphere(in matrix, color, level);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawBox(in AABox, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawBox(
|
||||
in AABox box,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) => ((DebugRenderer)this).DrawBox(in box, color, castShadow, drawMode);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawBox(in float4x4, in AABox, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawBox(
|
||||
in float4x4 matrix,
|
||||
in AABox box,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) => ((DebugRenderer)this).DrawBox(in matrix, in box, color, castShadow, drawMode);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawSphere(float3, float, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawSphere(
|
||||
float3 center,
|
||||
float radius,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) => ((DebugRenderer)this).DrawSphere(center, radius, color, castShadow, drawMode);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawUnitSphere(in float4x4, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawUnitSphere(
|
||||
in float4x4 matrix,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) => ((DebugRenderer)this).DrawUnitSphere(in matrix, color, castShadow, drawMode);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawCapsule(in float4x4, float, float, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawCapsule(
|
||||
in float4x4 matrix,
|
||||
float halfHeightOfCylinder,
|
||||
float radius,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) => ((DebugRenderer)this).DrawCapsule(in matrix, halfHeightOfCylinder, radius, color, castShadow, drawMode);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawCylinder(in float4x4, float, float, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawCylinder(
|
||||
in float4x4 matrix,
|
||||
float halfHeight,
|
||||
float radius,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) => ((DebugRenderer)this).DrawCylinder(in matrix, halfHeight, radius, color, castShadow, drawMode);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawOpenCone(float3, float3, float3, float, float, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawOpenCone(
|
||||
float3 top,
|
||||
float3 axis,
|
||||
float3 perpendicular,
|
||||
float halfAngle,
|
||||
float length,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) =>
|
||||
((DebugRenderer)this).DrawOpenCone(
|
||||
top,
|
||||
axis,
|
||||
perpendicular,
|
||||
halfAngle,
|
||||
length,
|
||||
color,
|
||||
castShadow,
|
||||
drawMode
|
||||
);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawSwingConeLimits(in float4x4, float, float, float, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawSwingConeLimits(
|
||||
in float4x4 matrix,
|
||||
float swingYHalfAngle,
|
||||
float swingZHalfAngle,
|
||||
float edgeLength,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) =>
|
||||
((DebugRenderer)this).DrawSwingConeLimits(
|
||||
in matrix,
|
||||
swingYHalfAngle,
|
||||
swingZHalfAngle,
|
||||
edgeLength,
|
||||
color,
|
||||
castShadow,
|
||||
drawMode
|
||||
);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawSwingPyramidLimits(in float4x4, float, float, float, float, float, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawSwingPyramidLimits(
|
||||
in float4x4 matrix,
|
||||
float minSwingYAngle,
|
||||
float maxSwingYAngle,
|
||||
float minSwingZAngle,
|
||||
float maxSwingZAngle,
|
||||
float edgeLength,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) =>
|
||||
((DebugRenderer)this).DrawSwingPyramidLimits(
|
||||
in matrix,
|
||||
minSwingYAngle,
|
||||
maxSwingYAngle,
|
||||
minSwingZAngle,
|
||||
maxSwingZAngle,
|
||||
edgeLength,
|
||||
color,
|
||||
castShadow,
|
||||
drawMode
|
||||
);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawPie(float3, float, float3, float3, float, float, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawPie(
|
||||
float3 center,
|
||||
float radius,
|
||||
float3 normal,
|
||||
float3 axis,
|
||||
float minAngle,
|
||||
float maxAngle,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) =>
|
||||
((DebugRenderer)this).DrawPie(
|
||||
center,
|
||||
radius,
|
||||
normal,
|
||||
axis,
|
||||
minAngle,
|
||||
maxAngle,
|
||||
color,
|
||||
castShadow,
|
||||
drawMode
|
||||
);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawTaperedCylinder(in float4x4, float, float, float, float, uint, DebugRenderer.CastShadow, DebugRenderer.DrawMode)"/>
|
||||
public void DrawTaperedCylinder(
|
||||
in float4x4 matrix,
|
||||
float top,
|
||||
float bottom,
|
||||
float topRadius,
|
||||
float bottomRadius,
|
||||
uint color,
|
||||
DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On,
|
||||
DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid
|
||||
) =>
|
||||
((DebugRenderer)this).DrawTaperedCylinder(
|
||||
in matrix,
|
||||
top,
|
||||
bottom,
|
||||
topRadius,
|
||||
bottomRadius,
|
||||
color,
|
||||
castShadow,
|
||||
drawMode
|
||||
);
|
||||
|
||||
/// <inheritdoc cref="DebugRenderer.DrawText3D(float3, RefString8, uint, float)"/>
|
||||
public unsafe void DrawText3D(float3 position, RefString8 @string, uint color, float height = 0.5f) =>
|
||||
((DebugRenderer)this).DrawText3D(position, @string, color, height);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue