Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::RenderEntryRegistry< T > Class Template Reference

Registry used to keep track of DrawObjectsRenderPass objects that contain render entries. More...

#include <kanzi/core.ui/graphics3d/render_entry_registry_3d.hpp>

Public Member Functions

void cleanRenderEntryRegistry ()
 Clean references to this node from each DrawObjectsRenderPass that refers to this node. More...
 
TgetThisObject ()
 Gets the pointer to this object. More...
 
void insertReferringDrawPass (DrawObjectsRenderPassWeakPtr drawPass)
 Insert a referring draw pass. More...
 
 ~RenderEntryRegistry ()
 Destructor. More...
 

Protected Attributes

flat_set< DrawObjectsRenderPassWeakPtr, owner_less< DrawObjectsRenderPassWeakPtr > > m_referringRenderPasses
 Render passes referring to the Node deriving this template class. More...
 
Node3D::RenderEntryParameterContainer m_renderEntryParameters
 Cached render entry parameters. More...
 

Detailed Description

template<typename T>
class kanzi::RenderEntryRegistry< T >

Registry used to keep track of DrawObjectsRenderPass objects that contain render entries.

The classes that are rendered by DrawObjectsRenderPass or its derivatives must implement bookkeeping for the render entries generated for them. This class provides a default implementation for that bookkeeping. Derive from this class when you implement your own renderable Node3D classes that generate render states.

A Node3D class that inherits from RenderEntryRegistry must call:

void CustomDataDrivenNode3D::registerDrawPassOverride(DrawObjectsRenderPassSharedPtr drawPass)
{
}
Since
Kanzi 3.9.0

Constructor & Destructor Documentation

template<typename T>
kanzi::RenderEntryRegistry< T >::~RenderEntryRegistry ( )
inline

Destructor.

Member Function Documentation

template<typename T>
T* kanzi::RenderEntryRegistry< T >::getThisObject ( )
inline

Gets the pointer to this object.

(CRTP).

Returns
This pointer.
template<typename T>
void kanzi::RenderEntryRegistry< T >::insertReferringDrawPass ( DrawObjectsRenderPassWeakPtr  drawPass)
inline

Insert a referring draw pass.

Call this function when a DrawObjectsRenderPass registers the derived node for rendering. This usually happens within Node3D::registerDrawPassOverride().

Parameters
drawPassWeak reference to a draw pass.
template<typename T>
void kanzi::RenderEntryRegistry< T >::cleanRenderEntryRegistry ( )
inline

Clean references to this node from each DrawObjectsRenderPass that refers to this node.

Call this function when the render entries for the inheriting node become obsolete because:

  • That node is detached from the node tree.
  • The render entries for that node change.

Member Data Documentation

template<typename T>
flat_set<DrawObjectsRenderPassWeakPtr, owner_less<DrawObjectsRenderPassWeakPtr> > kanzi::RenderEntryRegistry< T >::m_referringRenderPasses
protected

Render passes referring to the Node deriving this template class.

template<typename T>
Node3D::RenderEntryParameterContainer kanzi::RenderEntryRegistry< T >::m_renderEntryParameters
protected

Cached render entry parameters.

This container is updated whenever the rendering parameters of the node change.


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