Classes

PhysicsJolt/Debug Renderer

Brief descriptions

Detailed information

physics::jolt::JoltBodyDrawFilterImpl

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_debug_renderer.h

class JoltBodyDrawFilterImpl : public JPH::BodyDrawFilter

Public Functions

bool ShouldDraw(const JPH::Body &body) const override

physics::jolt::DebugRendererImp

engine/core/modules/physicsJolt/include/nau/physics/jolt/jolt_debug_renderer.h

class DebugRendererImp : public JPH::DebugRendererSimple

Public Functions

virtual void DrawLine(JPH::RVec3Arg from, JPH::RVec3Arg to, JPH::ColorArg color) override

Draws a debug line segment.

Parameters:
  • from, to[in] Segment tips positions.

  • color[in] Segment color.

virtual void DrawTriangle(JPH::RVec3Arg inV1, JPH::RVec3Arg inV2, JPH::RVec3Arg inV3, JPH::ColorArg inColor, ECastShadow inCastShadow = ECastShadow::Off) override

Draws a debug triangle.

Note

inCastShadow is currently unused.

Parameters:
  • inV1, inV2, inV3[in] Triangle vertices.

  • inColor[in] Triangle outline color.

  • inCastShadow[in] Indicates whether the triangle should cast a shadow.

virtual void DrawText3D(JPH::RVec3Arg inPosition, const std::string_view &inString, JPH::ColorArg inColor, float inHeight) override
virtual void DrawSphere(JPH::RMat44Arg transform, float radius, JPH::ColorArg color) override

Renders a debug sphere.

Parameters:
  • transform[in] Sphere center transform.

  • radius[in] Sphere radius.

  • color[in] Sphere wireframe color.

void setDebugRenderer(nau::DebugRenderSystem *renderer)

Sets the debug renderer that will be responsible for physics debug drawing.

Parameters:

renderer[in] A pointer to the renderer to bind.

Private Members

nau::DebugRenderSystem *m_renderer = nullptr

Debug renderer that is responsible for physics debug drawing.