Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
mnd::MeshData Struct Reference

CPU-side mesh bundle produced by Builder factory methods. More...

#include <Builder.h>

+ Collaboration diagram for mnd::MeshData:

Public Member Functions

std::shared_ptr< MeshbuildMesh ()
 Upload this geometry to the GPU and return a renderable Mesh.
 

Public Attributes

std::vector< f32vertices
 Interleaved vertex data (pos, normal, UV …).
 
std::vector< u32indices
 Triangle list indices (empty → non-indexed draw).
 
VertexLayout layout
 Attribute layout that matches the vertex data format.
 

Detailed Description

CPU-side mesh bundle produced by Builder factory methods.

Holds raw vertex data, index data, and the VertexLayout that describes how the interleaved bytes map to shader attributes. Call buildMesh() to hand the data off to the GPU.

Definition at line 43 of file Builder.h.

Member Function Documentation

◆ buildMesh()

std::shared_ptr< Mesh > mnd::MeshData::buildMesh ( )

Upload this geometry to the GPU and return a renderable Mesh.

Returns
Shared pointer to the uploaded Mesh.

Definition at line 10 of file Builder.cpp.

References indices, layout, and vertices.

Member Data Documentation

◆ indices

std::vector<u32> mnd::MeshData::indices

Triangle list indices (empty → non-indexed draw).

Definition at line 46 of file Builder.h.

Referenced by buildMesh(), mnd::Builder::CreateCube(), mnd::Builder::CreateFullscreenQuad(), mnd::Builder::CreateRectangle(), and mnd::Builder::CreateTriangle().

◆ layout

VertexLayout mnd::MeshData::layout

Attribute layout that matches the vertex data format.

Definition at line 47 of file Builder.h.

Referenced by buildMesh(), mnd::Builder::CreateCube(), mnd::Builder::CreateFullscreenQuad(), mnd::Builder::CreateRectangle(), and mnd::Builder::CreateTriangle().

◆ vertices

std::vector<f32> mnd::MeshData::vertices

Interleaved vertex data (pos, normal, UV …).

Definition at line 45 of file Builder.h.

Referenced by buildMesh(), mnd::Builder::CreateCube(), mnd::Builder::CreateFullscreenQuad(), mnd::Builder::CreateRectangle(), and mnd::Builder::CreateTriangle().


The documentation for this struct was generated from the following files: