//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:46
///
/// class JPH_DEBUG_RENDERER_EXPORT DebugRenderer : public NonCopyable
///
///
///
///
/// Simple triangle renderer for debugging purposes.
///
/// Inherit from this class to provide your own implementation.
///
/// Implement the following virtual functions:
/// - DrawLine
/// - DrawTriangle
/// - DrawText3D
/// - CreateTriangleBatch
/// - DrawGeometry
///
/// Make sure you call Initialize() from the constructor of your implementation.
///
/// The CreateTriangleBatch is used to prepare a batch of triangles to be drawn by a single DrawGeometry call,
/// which means that Jolt can render a complex scene much more efficiently than when each triangle in that scene would have been drawn through DrawTriangle.
///
/// Note that an implementation that implements CreateTriangleBatch and DrawGeometry is provided by DebugRendererSimple which can be used to start quickly.
///
///
[InteropHandle]
public readonly partial struct DebugRenderer
{
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:90
///
/// enum class ECastShadow
///
///
///
///
/// Enum that determines if a shadow should be cast or not
///
///
public enum ECastShadow : int
{
///
///
/// This shape should cast a shadow
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:92
///
/// On
///
///
On,
///
///
/// This shape should not cast a shadow
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:93
///
/// Off
///
///
Off,
}
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:97
///
/// enum class EDrawMode
///
///
///
///
/// Determines how triangles are drawn
///
///
public enum EDrawMode : int
{
///
///
/// Draw as a solid shape
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:99
///
/// Solid
///
///
Solid,
///
///
/// Draw as wireframe
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:100
///
/// Wireframe
///
///
Wireframe,
}
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:264
///
/// enum class ECullMode
///
///
///
///
/// Determines which polygons are culled
///
///
public enum ECullMode : int
{
///
///
/// Don't draw backfacing polygons
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:266
///
/// CullBackFace
///
///
CullBackFace,
///
///
/// Don't draw front facing polygons
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:267
///
/// CullFrontFace
///
///
CullFrontFace,
///
///
/// Don't do culling and draw both sides
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:268
///
/// Off
///
///
Off,
}
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:316
///
/// struct SwingConeLimits
///
///
[StructLayout(LayoutKind.Explicit, Size = 8)]
public struct SwingConeLimits
{
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:324
///
/// float mSwingYHalfAngle
///
///
[FieldOffset(0)]
public float mSwingYHalfAngle;
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:325
///
/// float mSwingZHalfAngle
///
///
[FieldOffset(4)]
public float mSwingZHalfAngle;
}
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:334
///
/// struct SwingPyramidLimits
///
///
[StructLayout(LayoutKind.Explicit, Size = 16)]
public struct SwingPyramidLimits
{
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:344
///
/// float mMinSwingYAngle
///
///
[FieldOffset(0)]
public float mMinSwingYAngle;
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:345
///
/// float mMaxSwingYAngle
///
///
[FieldOffset(4)]
public float mMaxSwingYAngle;
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:346
///
/// float mMinSwingZAngle
///
///
[FieldOffset(8)]
public float mMinSwingZAngle;
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:347
///
/// float mMaxSwingZAngle
///
///
[FieldOffset(12)]
public float mMaxSwingZAngle;
}
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:360
///
/// struct TaperedCylinder
///
///
[StructLayout(LayoutKind.Explicit, Size = 16)]
public struct TaperedCylinder
{
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:370
///
/// float mTop
///
///
[FieldOffset(0)]
public float mTop;
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:371
///
/// float mBottom
///
///
[FieldOffset(4)]
public float mBottom;
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:372
///
/// float mTopRadius
///
///
[FieldOffset(8)]
public float mTopRadius;
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:373
///
/// float mBottomRadius
///
///
[FieldOffset(12)]
public float mBottomRadius;
}
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:56
///
/// void NextFrame()
///
///
///
///
/// Call once after frame is complete. Releases unused dynamically generated geometry assets.
///
///
public void NextFrame() => Jolt.PInvoke.DebugRenderer_NextFrame(this);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:59
///
/// virtual void DrawLine(RVec3Arg inFrom, RVec3Arg inTo, ColorArg inColor) = 0
///
///
///
///
/// Draw line
///
///
public void DrawLine(float3 from, float3 to, uint color) => Jolt.PInvoke.DebugRenderer_DrawLine(this, from, to, color);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:62
///
/// void DrawWireBox(const AABox &inBox, ColorArg inColor)
///
///
///
///
/// Draw wireframe box
///
///
public void DrawWireBox(AABox box, uint color) => Jolt.PInvoke.DebugRenderer_DrawWireBox(this, box, color);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:63
///
/// void DrawWireBox(const OrientedBox &inBox, ColorArg inColor)
///
///
public void DrawWireBox(OrientedBox box, uint color) => Jolt.PInvoke.DebugRenderer_DrawWireBox_2(this, box, color);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:64
///
/// void DrawWireBox(RMat44Arg inMatrix, const AABox &inBox, ColorArg inColor)
///
///
public void DrawWireBox(float4x4 matrix, AABox box, uint color) => Jolt.PInvoke.DebugRenderer_DrawWireBox_3(this, matrix, box, color);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:67
///
/// void DrawMarker(RVec3Arg inPosition, ColorArg inColor, float inSize)
///
///
///
///
/// Draw a marker on a position
///
///
public void DrawMarker(float3 position, uint color, float size) => Jolt.PInvoke.DebugRenderer_DrawMarker(this, position, color, size);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:70
///
/// void DrawArrow(RVec3Arg inFrom, RVec3Arg inTo, ColorArg inColor, float inSize)
///
///
///
///
/// Draw an arrow
///
///
public void DrawArrow(float3 from, float3 to, uint color, float size) => Jolt.PInvoke.DebugRenderer_DrawArrow(this, from, to, color, size);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:73
///
/// void DrawCoordinateSystem(RMat44Arg inTransform, float inSize = 1.0f)
///
///
///
///
/// Draw coordinate system (3 arrows, x = red, y = green, z = blue)
///
///
public void DrawCoordinateSystem(float4x4 transform, float size) => Jolt.PInvoke.DebugRenderer_DrawCoordinateSystem(this, transform, size);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:76
///
/// void DrawPlane(RVec3Arg inPoint, Vec3Arg inNormal, ColorArg inColor, float inSize)
///
///
///
///
/// Draw a plane through inPoint with normal inNormal
///
///
public void DrawPlane(float3 point, float3 normal, uint color, float size) => Jolt.PInvoke.DebugRenderer_DrawPlane(this, point, normal, color, size);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:79
///
/// void DrawWireTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor)
///
///
///
///
/// Draw wireframe triangle
///
///
public void DrawWireTriangle(float3 v1, float3 v2, float3 v3, uint color) => Jolt.PInvoke.DebugRenderer_DrawWireTriangle(this, v1, v2, v3, color);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:86
///
/// void DrawWireSphere(RVec3Arg inCenter, float inRadius, ColorArg inColor, int inLevel = 3)
///
///
///
///
/// Draw wireframe sphere
///
///
public void DrawWireSphere(float3 center, float radius, uint color, int level) => Jolt.PInvoke.DebugRenderer_DrawWireSphere(this, center, radius, color, level);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:87
///
/// void DrawWireUnitSphere(RMat44Arg inMatrix, ColorArg inColor, int inLevel = 3)
///
///
public void DrawWireUnitSphere(float4x4 matrix, uint color, int level) => Jolt.PInvoke.DebugRenderer_DrawWireUnitSphere(this, matrix, color, level);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:104
///
/// virtual void DrawTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::Off) = 0
///
///
///
///
/// Draw a single back face culled triangle
///
///
public void DrawTriangle(float3 v1, float3 v2, float3 v3, uint color, DebugRenderer.ECastShadow castShadow) => Jolt.PInvoke.DebugRenderer_DrawTriangle(this, v1, v2, v3, color, castShadow);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:107
///
/// void DrawBox(const AABox &inBox, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draw a box
///
///
public void DrawBox(AABox box, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawBox(this, box, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:108
///
/// void DrawBox(RMat44Arg inMatrix, const AABox &inBox, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
public void DrawBox(float4x4 matrix, AABox box, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawBox_2(this, matrix, box, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:111
///
/// void DrawSphere(RVec3Arg inCenter, float inRadius, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draw a sphere
///
///
public void DrawSphere(float3 center, float radius, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawSphere(this, center, radius, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:112
///
/// void DrawUnitSphere(RMat44Arg inMatrix, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
public void DrawUnitSphere(float4x4 matrix, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawUnitSphere(this, matrix, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:116
///
/// void DrawCapsule(RMat44Arg inMatrix, float inHalfHeightOfCylinder, float inRadius, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draw a capsule with one half sphere at (0, -inHalfHeightOfCylinder, 0) and the other half sphere at (0, inHalfHeightOfCylinder, 0) and radius inRadius.
/// The capsule will be transformed by inMatrix.
///
///
public void DrawCapsule(float4x4 matrix, float halfHeightOfCylinder, float radius, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawCapsule(this, matrix, halfHeightOfCylinder, radius, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:120
///
/// void DrawCylinder(RMat44Arg inMatrix, float inHalfHeight, float inRadius, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draw a cylinder with top (0, inHalfHeight, 0) and bottom (0, -inHalfHeight, 0) and radius inRadius.
/// The cylinder will be transformed by inMatrix
///
///
public void DrawCylinder(float4x4 matrix, float halfHeight, float radius, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawCylinder(this, matrix, halfHeight, radius, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:131
///
/// void DrawOpenCone(RVec3Arg inTop, Vec3Arg inAxis, Vec3Arg inPerpendicular, float inHalfAngle, float inLength, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draw a bottomless cone.
/// @param inTop Top of cone, center of base is at inTop + inAxis.
/// @param inAxis Height and direction of cone
/// @param inPerpendicular Perpendicular vector to inAxis.
/// @param inHalfAngle Specifies the cone angle in radians (angle measured between inAxis and cone surface).
/// @param inLength The length of the cone.
/// @param inColor Color to use for drawing the cone.
/// @param inCastShadow determines if this geometry should cast a shadow or not.
/// @param inDrawMode determines if we draw the geometry solid or in wireframe.
///
///
public void DrawOpenCone(float3 top, float3 axis, float3 perpendicular, float halfAngle, float length, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawOpenCone(this, top, axis, perpendicular, halfAngle, length, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:141
///
/// void DrawSwingConeLimits(RMat44Arg inMatrix, float inSwingYHalfAngle, float inSwingZHalfAngle, float inEdgeLength, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draws cone rotation limits as used by the SwingTwistConstraintPart.
/// @param inMatrix Matrix that transforms from constraint space to world space
/// @param inSwingYHalfAngle See SwingTwistConstraintPart
/// @param inSwingZHalfAngle See SwingTwistConstraintPart
/// @param inEdgeLength Size of the edge of the cone shape
/// @param inColor Color to use for drawing the cone.
/// @param inCastShadow determines if this geometry should cast a shadow or not.
/// @param inDrawMode determines if we draw the geometry solid or in wireframe.
///
///
public void DrawSwingConeLimits(float4x4 matrix, float swingYHalfAngle, float swingZHalfAngle, float edgeLength, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawSwingConeLimits(this, matrix, swingYHalfAngle, swingZHalfAngle, edgeLength, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:153
///
/// void DrawSwingPyramidLimits(RMat44Arg inMatrix, float inMinSwingYAngle, float inMaxSwingYAngle, float inMinSwingZAngle, float inMaxSwingZAngle, float inEdgeLength, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draws rotation limits as used by the SwingTwistConstraintPart.
/// @param inMatrix Matrix that transforms from constraint space to world space
/// @param inMinSwingYAngle See SwingTwistConstraintPart
/// @param inMaxSwingYAngle See SwingTwistConstraintPart
/// @param inMinSwingZAngle See SwingTwistConstraintPart
/// @param inMaxSwingZAngle See SwingTwistConstraintPart
/// @param inEdgeLength Size of the edge of the cone shape
/// @param inColor Color to use for drawing the cone.
/// @param inCastShadow determines if this geometry should cast a shadow or not.
/// @param inDrawMode determines if we draw the geometry solid or in wireframe.
///
///
public void DrawSwingPyramidLimits(float4x4 matrix, float minSwingYAngle, float maxSwingYAngle, float minSwingZAngle, float maxSwingZAngle, float edgeLength, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawSwingPyramidLimits(this, matrix, minSwingYAngle, maxSwingYAngle, minSwingZAngle, maxSwingZAngle, edgeLength, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:165
///
/// void DrawPie(RVec3Arg inCenter, float inRadius, Vec3Arg inNormal, Vec3Arg inAxis, float inMinAngle, float inMaxAngle, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draw a pie (part of a circle).
/// @param inCenter The center of the circle.
/// @param inRadius Radius of the circle.
/// @param inNormal The plane normal in which the pie resides.
/// @param inAxis The axis that defines an angle of 0 radians.
/// @param inMinAngle The pie will be drawn between [inMinAngle, inMaxAngle] (in radians).
/// @param inMaxAngle The pie will be drawn between [inMinAngle, inMaxAngle] (in radians).
/// @param inColor Color to use for drawing the pie.
/// @param inCastShadow determines if this geometry should cast a shadow or not.
/// @param inDrawMode determines if we draw the geometry solid or in wireframe.
///
///
public void DrawPie(float3 center, float radius, float3 normal, float3 axis, float minAngle, float maxAngle, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawPie(this, center, radius, normal, axis, minAngle, maxAngle, color, castShadow, drawMode);
///
///
/// C++:
/// Jolt/Renderer/DebugRenderer.h:176
///
/// void DrawTaperedCylinder(RMat44Arg inMatrix, float inTop, float inBottom, float inTopRadius, float inBottomRadius, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid)
///
///
///
///
/// Draw a tapered cylinder
/// @param inMatrix Matrix that transforms the cylinder to world space.
/// @param inTop Top of cylinder (along Y axis)
/// @param inBottom Bottom of cylinder (along Y axis)
/// @param inTopRadius Radius at the top
/// @param inBottomRadius Radius at the bottom
/// @param inColor Color to use for drawing the pie.
/// @param inCastShadow determines if this geometry should cast a shadow or not.
/// @param inDrawMode determines if we draw the geometry solid or in wireframe.
///
///
public void DrawTaperedCylinder(float4x4 matrix, float top, float bottom, float topRadius, float bottomRadius, uint color, DebugRenderer.ECastShadow castShadow, DebugRenderer.EDrawMode drawMode) => Jolt.PInvoke.DebugRenderer_DrawTaperedCylinder(this, matrix, top, bottom, topRadius, bottomRadius, color, castShadow, drawMode);
}
}