Kanzi  3.9.5
Kanzi Engine API
kanzi::DebugRenderRegistry Class Reference

The debug render registry enables you to register custom debug render functions for Node3D nodes. More...

#include <kanzi/core.ui/node/debug_render_registry.hpp>

Public Types

using DebugObjectRenderingFunction = void(*)(Renderer3D &renderer, NodeSharedPtr object)
 Debug object rendering function pointer. More...
 

Public Member Functions

void addMapping (const Metaclass *metaclass, DebugObjectRenderingFunction function)
 Add mapping from metaclass to rendering function. More...
 
DebugObjectRenderingFunction getRenderingFunction (const Metaclass *metaclass) const
 Wrapper for getting debug rendering function for a given metaclass. More...
 

Detailed Description

The debug render registry enables you to register custom debug render functions for Node3D nodes.

Kanzi Studio runs the debug render functions when the Kanzi Studio Preview is in Analyse mode. The central registry allows the Preview and custom plugins to register custom functions.

You can use a debug rendering function for a custom node type to draw information that is helpful during development. For example, the debug rendering function for camera nodes renders a wireframe visualization of a camera.

Member Typedef Documentation

◆ DebugObjectRenderingFunction

Debug object rendering function pointer.

Member Function Documentation

◆ addMapping()

void kanzi::DebugRenderRegistry::addMapping ( const Metaclass metaclass,
DebugObjectRenderingFunction  function 
)

Add mapping from metaclass to rendering function.

Parameters
metaclassMetaclass to register.
functionFunction to render given nodes.

◆ getRenderingFunction()

DebugObjectRenderingFunction kanzi::DebugRenderRegistry::getRenderingFunction ( const Metaclass metaclass) const

Wrapper for getting debug rendering function for a given metaclass.

Parameters
metaclassMetaclass to look for.
Returns
Returns debug object rendering function. If it does not find the function for the metaclass, returns nullptr.

The documentation for this class was generated from the following file: