candlewick 0.1.0
A renderer
Loading...
Searching...
No Matches
candlewick::MeshView Class Reference

A view into a Mesh object. More...

#include <candlewick/core/Mesh.h>

Public Member Functions

bool isIndexed () const
 
 MeshView (const MeshView &parent, Uint32 subVertexOffset, Uint32 vertexSubCount, Uint32 subIndexOffset, Uint32 indexSubCount)
 

Public Attributes

std::vector< SDL_GPUBuffer * > vertexBuffers
 Vertex buffers.
 
SDL_GPUBuffer * indexBuffer
 Index buffer.
 
Uint32 vertexOffset
 Vertex offsets, expressed in elements.
 
Uint32 vertexCount
 Number of vertices in the mesh view.
 
Uint32 indexOffset
 Index offset (in elements).
 
Uint32 indexCount
 Number of indices in the mesh view.
 

Friends

class Mesh
 

Detailed Description

A view into a Mesh object.

Objects of this class are copyable and movable, since they only "borrow" the buffers.

Warning
A MeshView is expected to be non-empty: positive vertex count and index count (if initial Mesh is indexed).
See also
Mesh

Constructor & Destructor Documentation

◆ MeshView()

candlewick::MeshView::MeshView ( const MeshView & parent,
Uint32 subVertexOffset,
Uint32 vertexSubCount,
Uint32 subIndexOffset,
Uint32 indexSubCount )

Member Function Documentation

◆ isIndexed()

bool candlewick::MeshView::isIndexed ( ) const
inline

Friends And Related Symbol Documentation

◆ Mesh

friend class Mesh
friend

Member Data Documentation

◆ indexBuffer

SDL_GPUBuffer* candlewick::MeshView::indexBuffer

Index buffer.

◆ indexCount

Uint32 candlewick::MeshView::indexCount

Number of indices in the mesh view.

◆ indexOffset

Uint32 candlewick::MeshView::indexOffset

Index offset (in elements).

◆ vertexBuffers

std::vector<SDL_GPUBuffer *> candlewick::MeshView::vertexBuffers

Vertex buffers.

◆ vertexCount

Uint32 candlewick::MeshView::vertexCount

Number of vertices in the mesh view.

◆ vertexOffset

Uint32 candlewick::MeshView::vertexOffset

Vertex offsets, expressed in elements.


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