Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
Builder.h File Reference

Static factory methods for creating common primitive mesh shapes. More...

#include <cstdint>
#include <memory>
#include <vector>
#include "Types.h"
#include "graphics/VertexLayout.h"
#include "render/Mesh.h"
+ Include dependency graph for Builder.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mnd::MeshData
 CPU-side mesh bundle produced by Builder factory methods. More...
 
class  mnd::Builder
 Factory that generates MeshData for common geometric primitives. More...
 

Namespaces

namespace  mnd
 

Detailed Description

Static factory methods for creating common primitive mesh shapes.

Builder produces MeshData — plain CPU-side geometry bundles (vertices, indices, layout). Call buildMesh() on the result to upload to the GPU and get a Mesh ready for rendering.

Typical usage

MeshData data = Builder::CreateRectangle(1.0f, 1.0f);
auto mesh = data.buildMesh(); // uploads to GPU → shared_ptr<Mesh>
// mesh is now ready to submit in a RenderCommand
std::shared_ptr< Mesh > mesh

All generated meshes include position, normal, and UV attributes laid out according to VertexElement::PositionIndex / NormalIndex / UVIndex.

See also
MeshData, Mesh, VertexLayout

Definition in file Builder.h.