Crafter.Graphics
C++ graphics library using Wayland and Vulkan.
 
Loading...
Searching...
No Matches
Crafter::Mesh< VertexType > Class Template Referenceexport

Holder for a indexed mesh. More...

Public Member Functions

 Mesh (std::uint32_t vertexCount, std::uint32_t indexCount)
 Constructs Mesh with empty vertex and index buffer.
 
 Mesh (const char *asset)
 Constructs Mesh from an in memory char buffer.
 
 Mesh (const char *asset)
 Constructs UV Mesh from an in memory char buffer.
 
 Mesh (float *heights, uint32_t sizeX, uint32_t sizeZ, float spacing)
 Constructs heightmap Mesh from an in memory char buffer.
 

Public Attributes

std::uint32_t vertexCount
 
std::uint32_t indexCount
 
Buffer< VertexType > verticies
 
Buffer< std::uint32_t > indicies
 

Detailed Description

template<typename VertexType>
class Crafter::Mesh< VertexType >

Holder for a indexed mesh.

Template Parameters
VertexTypeThe vertex type to use that is internally stored, this must match the type the glsl shader expects.

Constructor & Destructor Documentation

◆ Mesh() [1/4]

template<typename VertexType>
Crafter::Mesh< VertexType >::Mesh ( std::uint32_t vertexCount,
std::uint32_t indexCount )
inline

Constructs Mesh with empty vertex and index buffer.

Parameters
vertexCountcount of the vertex buffer
vertexCountcount of the index buffer

◆ Mesh() [2/4]

template<typename VertexType>
Crafter::Mesh< VertexType >::Mesh ( const char * asset)
inline

Constructs Mesh from an in memory char buffer.

Parameters
assetpointer to the char buffer.

◆ Mesh() [3/4]

template<typename VertexType>
Crafter::Mesh< VertexType >::Mesh ( const char * asset)
inline

Constructs UV Mesh from an in memory char buffer.

Parameters
assetpointer to the char buffer.

◆ Mesh() [4/4]

template<typename VertexType>
Crafter::Mesh< VertexType >::Mesh ( float * heights,
uint32_t sizeX,
uint32_t sizeZ,
float spacing )
inline

Constructs heightmap Mesh from an in memory char buffer.

Parameters
heightspointer to heights.
sizeXsize in the X dimension.
sizeZsize in the Y dimension.
spacingspacing between the points .

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