Rumba C++ SDK
maquina::RenderablePlugin Class Referenceabstract

#include <RenderablePlugin.h>

Inheritance diagram for maquina::RenderablePlugin:
maquina::NodePlugin

Public Member Functions

 RenderablePlugin (Node *node)
 
virtual ~RenderablePlugin ()
 
virtual void release_GL_resources ()
 The OpenGL resources allocated by the renderer plug-in must be released during this callback, not in the destructor. More...
 
virtual void render (const RenderParameters &parameters)=0
 
virtual void pick (const RenderParameters &parameters, Imath::V2i position, std::vector< PickingResult > &picked)
 
virtual void select (const RenderParameters &parameters, const Imath::V4i &trap, std::vector< std::string > &delegate_paths)
 
virtual void free_viewport_data (uint64_t viewport_identifier)
 
virtual int rendering_order ()=0
 
- Public Member Functions inherited from maquina::NodePlugin
 NodePlugin (Node *node)
 
virtual ~NodePlugin ()
 
virtual void on_first_init (bool)
 Perform the one shot initialization tasks for this node. More...
 
virtual void on_delete (bool)
 Prepare the node to be deleted. More...
 
virtual void on_add_to_document ()
 Callback called when the node is added to the document. More...
 
virtual void on_remove_from_document ()
 Callback called when the node is removed from the document. More...
 
virtual void on_input_connection (const Plug &, const Plug &, bool)
 Callback called when an a connection has been done between an output plug and a plug of this node as input. More...
 
virtual void on_output_connection (const Plug &, const Plug &, bool)
 Callback called when an a connection has been done between a plug of this node as output and an input plug. More...
 
virtual void on_input_disconnection (const Plug &, const Plug &)
 Callback called when an a connection has been broken between an output plug and a plug of this node as input. More...
 
virtual void on_output_disconnection (const Plug &, const Plug &)
 Callback called when an a connection has been broken between a plug of this node as output and an input plug. More...
 
virtual void relationship (NodeSet &set) const
 Return the node relationships. More...
 
virtual std::shared_ptr< NodeDelegatenode_delegate () const
 Return a node delegate for this node. More...
 
virtual std::optional< Plugchannel_switch_output () const
 If that not is a channel switch node, return the output channel plug. More...
 
virtual std::vector< Plugchannel_switch_inputs () const
 Return the input channel plugs. More...
 
virtual std::optional< Plugchannel_switch_sub_channel (const std::string_view &sub_channel) const
 Return the plug for the sub channel name if available. More...
 
Node node () const
 Returns the Node interface for this object. More...
 
virtual std::string selection_path () const
 Returns the node delegate path to use to select that node. More...
 

Static Public Member Functions

static void cache (const Plug &plug)
 
static void uncache (const Plug &plug)
 

Constructor & Destructor Documentation

◆ RenderablePlugin()

maquina::RenderablePlugin::RenderablePlugin ( Node node)
inline

◆ ~RenderablePlugin()

virtual maquina::RenderablePlugin::~RenderablePlugin ( )
inlinevirtual

Member Function Documentation

◆ cache()

static void maquina::RenderablePlugin::cache ( const Plug plug)
static

Add a plug to the rendering evaluation subgraph.

A call to this method will ensure the plug is cached. Then, before each rendering, this plug will be refreshed if necessary at the current frame (retrieving its value at the current frame during render() will not trigger an evaluation). Also, this plug will be evaluated in background, to fill its cache if it is not constant.

◆ free_viewport_data()

virtual void maquina::RenderablePlugin::free_viewport_data ( uint64_t  viewport_identifier)
inlinevirtual

Ask the renderable plug-in to delete any viewport specific resources allocated for viewport_identifier.

◆ pick()

virtual void maquina::RenderablePlugin::pick ( const RenderParameters parameters,
Imath::V2i  position,
std::vector< PickingResult > &  picked 
)
virtual

Implements picking.

Parameters
parametersAll current rendering parameters.
positionPicking position in window coordinates.
pickedSet of picked elements, you can remove some previously inserted elements if those picked by this plugin are more prioritary.

◆ release_GL_resources()

virtual void maquina::RenderablePlugin::release_GL_resources ( )
inlinevirtual

The OpenGL resources allocated by the renderer plug-in must be released during this callback, not in the destructor.

◆ render()

virtual void maquina::RenderablePlugin::render ( const RenderParameters parameters)
pure virtual

◆ rendering_order()

virtual int maquina::RenderablePlugin::rendering_order ( )
pure virtual

Return the rendering order of this renderable plug-in.

The node with the lower rendering order are rendered first. For information, the rendering order of the Hydra renderer is 100, the motion trail renderer is 200.

◆ select()

virtual void maquina::RenderablePlugin::select ( const RenderParameters parameters,
const Imath::V4i trap,
std::vector< std::string > &  delegate_paths 
)
virtual

Implements a selection trap.

Parameters
parametersAll current rendering parameters.
trap(x,y,w,h) where (x,y) is the position of the selection trap lower corner in window coordinates, and (w,y) is the dimension of the trap in window coordinates.
delegate_pathsNode delegate paths that are selected by the selection trap.

◆ uncache()

static void maquina::RenderablePlugin::uncache ( const Plug plug)
static

Undo the effect of any previous call to cache(plug)


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