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

Mesh specialization for textured vertices. More...

#include <spk_texture_painter.hpp>

Inheritance diagram for spk::TextureMesh:
Inheritance graph
Collaboration diagram for spk::TextureMesh:
Collaboration graph

Classes

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

Public Types

using Base = IMesh<TextureVertex>
 Base mesh type.
using Polygon = Base::Polygon
 Polygon type for textured vertices.
Public Types inherited from spk::IMesh< TextureVertex >
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 textured vertices.

Additional Inherited Members

Public Member Functions inherited from spk::IMesh< TextureVertex >
 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< TextureVertex > & 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 textured vertices.

See also
TextureVertex
void append(const Polygon &p_shape)
Appends a polygon and notifies subscribers.
Definition spk_mesh.hpp:270
Mesh specialization for textured vertices.
Definition spk_texture_painter.hpp:42
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::TextureMesh::_configureBufferSet ( ) const
inlineoverrideprotectedvirtual

Configures the vertex buffer layout for textured vertices.

Implements spk::IMesh< TextureVertex >.

Here is the call graph for this function:

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