7#ifndef JPH_DEBUG_RENDERER
8 #error This file should only be included when JPH_DEBUG_RENDERER is defined
49 mCameraPos = inCameraPos;
64 virtual Batch
CreateTriangleBatch(
const Vertex *inVertices,
int inVertexCount,
const uint32 *inIndices,
int inIndexCount)
override;
65 virtual void DrawGeometry(
RMat44Arg inModelMatrix,
const AABox &inWorldSpaceBounds,
float inLODScaleSq,
ColorArg inModelColor,
const GeometryRef &inGeometry, ECullMode inCullMode, ECastShadow inCastShadow, EDrawMode inDrawMode)
override;
74 virtual void AddRef()
override { ++mRefCount; }
75 virtual void Release()
override {
if (--mRefCount == 0)
delete this; }
80 atomic<uint32> mRefCount = 0;
85 bool mCameraPosSet =
false;
#define JPH_NAMESPACE_END
Definition: Core.h:378
std::uint32_t uint32
Definition: Core.h:455
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
#define JPH_DEBUG_RENDERER_EXPORT
Definition: DebugRenderer.h:13
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition: Memory.h:31
Axis aligned box.
Definition: AABox.h:16
Class that holds an RGBA color with 8-bits per component.
Definition: Color.h:16
Definition: DebugRenderer.h:47
virtual Batch CreateTriangleBatch(const Triangle *inTriangles, int inTriangleCount)=0
Create a batch of triangles that can be drawn efficiently.
virtual void DrawGeometry(RMat44Arg inModelMatrix, const AABox &inWorldSpaceBounds, float inLODScaleSq, ColorArg inModelColor, const GeometryRef &inGeometry, ECullMode inCullMode=ECullMode::CullBackFace, ECastShadow inCastShadow=ECastShadow::On, EDrawMode inDrawMode=EDrawMode::Solid)=0
ECastShadow
Enum that determines if a shadow should be cast or not.
Definition: DebugRenderer.h:91
virtual void DrawLine(RVec3Arg inFrom, RVec3Arg inTo, ColorArg inColor)=0
Draw line.
Definition: DebugRendererSimple.h:38
void SetCameraPos(RVec3Arg inCameraPos)
Definition: DebugRendererSimple.h:47
virtual void DrawTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor, ECastShadow inCastShadow) override
Fallback implementation that uses DrawLine to draw a triangle (override this if you have a version th...
Definition: DebugRendererSimple.h:54
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition: Mat44.h:13
Pure virtual version of RefTarget.
Definition: Reference.h:88
A simple triangle and its material.
Definition: Triangle.h:11