Sparkle 0.0.1
Loading...
Searching...
No Matches
spk::ColorMesh Class Reference

Mesh specialization for colored vertices. More...

#include <spk_color_painter.hpp>

Inheritance diagram for spk::ColorMesh:
Inheritance graph
Collaboration diagram for spk::ColorMesh:
Collaboration graph

Classes

class  Builder
 Helper used to build ColorMesh instances from primitives. More...

Public Types

using Base = IMesh<ColorVertex>
 Base mesh type.
using Polygon = Base::Polygon
 Polygon type for colored vertices.
Public Types inherited from spk::IMesh< ColorVertex >
using Polygon
 Polygon type stored by the mesh.
using EditionContract
 Contract type returned by edition subscriptions.
using EditionJob
 Job type invoked on mesh edits.

Protected Member Functions

void _configureBufferSet () const override
 Configures the vertex buffer layout for colored vertices.

Additional Inherited Members

Public Member Functions inherited from spk::IMesh< ColorVertex >
 IMesh ()
 Builds an empty mesh with a dynamic buffer set.
 IMesh (const IMesh &p_other)
 Copies polygon data into a new mesh instance.
IMeshoperator= (const IMesh &p_other)
 Assigns polygon data from another mesh.
 IMesh (IMesh &&p_other) noexcept
 Moves polygon data from another mesh.
IMeshoperator= (IMesh &&p_other) noexcept
 Move-assigns polygon data from another mesh.
void clear ()
 Clears all polygons and notifies subscribers.
void append (const Polygon &p_shape)
 Appends a polygon and notifies subscribers.
EditionContract subscribeToEdition (const EditionJob &p_job) const
 Subscribes to mesh edition notifications.
const std::vector< ColorVertex > & vertices () const
 Returns the cached vertex list for all polygons.
const std::vector< Polygon > & polygons () const
 Returns the stored polygons.
const std::vector< uint32_t > & indexes () const
 Returns the cached triangle indices for the mesh.
IMeshoperator+= (const IMesh &p_other)
 Appends polygons from another mesh and notifies subscribers.
const std::shared_ptr< spk::OpenGL::BufferSetObject > & bufferSet () const
 Returns the underlying buffer set.
void synchronize () const
 Updates GPU buffers when mesh data has changed.
IMesh fuze (const IMesh &p_other) const
 Returns a new mesh by concatenating another mesh.

Detailed Description

Mesh specialization for colored vertices.

See also
ColorVertex
Mesh specialization for colored vertices.
Definition spk_color_painter.hpp:41
void append(const Polygon &p_shape)
Appends a polygon and notifies subscribers.
Definition spk_mesh.hpp:270
static IPolygon< TVertex > makeTriangle(const TVertex &p_a, const TVertex &p_b, const TVertex &p_c)
Creates a triangle polygon.
Definition spk_polygon.hpp:46

Member Function Documentation

◆ _configureBufferSet()

void spk::ColorMesh::_configureBufferSet ( ) const
inlineoverrideprotectedvirtual

Configures the vertex buffer layout for colored vertices.

Implements spk::IMesh< ColorVertex >.

Here is the call graph for this function:

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