Sparkle 0.0.1
Loading...
Searching...
No Matches
spk::MeshPainter< TMeshType > Class Template Reference

Base painter that renders a mesh through a Lumina pipeline. More...

#include <spk_mesh_painter.hpp>

Collaboration diagram for spk::MeshPainter< TMeshType >:
Collaboration graph

Public Types

using Mesh = TMeshType
 Mesh type handled by the painter.

Public Member Functions

virtual void setMesh (const Mesh *p_mesh)
 Sets the mesh to render.
const Meshmesh () const
 Returns the currently bound mesh.
void render ()
 Renders the current mesh when available.

Protected Member Functions

 MeshPainter (Lumina::Pipeline &p_pipeline)
 Builds a mesh painter bound to a pipeline.
Lumina::Pipeline::Object_objectHandle ()
 Returns the render object handle.
const Lumina::Pipeline::Object_objectHandle () const
 Returns the render object handle.

Detailed Description

template<typename TMeshType>
class spk::MeshPainter< TMeshType >

Base painter that renders a mesh through a Lumina pipeline.

Template Parameters
TMeshTypeMesh type rendered by the painter.
See also
IMesh
spk::MeshPainter<MyMesh> painter(pipeline);
painter.setMesh(&mesh);
painter.render();
Base painter that renders a mesh through a Lumina pipeline.
Definition spk_mesh_painter.hpp:24
const Mesh * mesh() const
Returns the currently bound mesh.
Definition spk_mesh_painter.hpp:86

Constructor & Destructor Documentation

◆ MeshPainter()

template<typename TMeshType>
spk::MeshPainter< TMeshType >::MeshPainter ( Lumina::Pipeline & p_pipeline)
inlineexplicitprotected

Builds a mesh painter bound to a pipeline.

Parameters
p_pipelineRendering pipeline.

Member Function Documentation

◆ _objectHandle() [1/2]

template<typename TMeshType>
Lumina::Pipeline::Object & spk::MeshPainter< TMeshType >::_objectHandle ( )
inlineprotected

Returns the render object handle.

Returns
Mutable pipeline object.

◆ _objectHandle() [2/2]

template<typename TMeshType>
const Lumina::Pipeline::Object & spk::MeshPainter< TMeshType >::_objectHandle ( ) const
inlineprotected

Returns the render object handle.

Returns
Const pipeline object.

◆ mesh()

template<typename TMeshType>
const Mesh * spk::MeshPainter< TMeshType >::mesh ( ) const
inline

Returns the currently bound mesh.

Returns
Mesh pointer or nullptr.

◆ setMesh()

template<typename TMeshType>
virtual void spk::MeshPainter< TMeshType >::setMesh ( const Mesh * p_mesh)
inlinevirtual

Sets the mesh to render.

Parameters
p_meshMesh pointer; may be null to detach.

Reimplemented in spk::FontPainter.

Here is the caller graph for this function:

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