|
Monad Engine da02fba2
> Undercity Codex_
|
Factory that generates MeshData for common geometric primitives. More...
#include <Builder.h>
Static Public Member Functions | |
| static MeshData | CreateRectangle (f32 width, f32 height) |
| Create a flat quad with the given dimensions. | |
| static MeshData | CreateCube (f32 width, f32 height) |
| Create a box (6 faces) with the given dimensions. | |
| static MeshData | CreateTriangle (f32 size) |
| Create an equilateral triangle centred at the origin. | |
| static MeshData | CreateFullscreenQuad () |
| Create a clip-space quad covering the entire screen. | |
Factory that generates MeshData for common geometric primitives.
All methods are static — Builder is never instantiated. Generated shapes follow a consistent winding order (counter-clockwise front face) compatible with the engine's default back-face culling state.
Create a box (6 faces) with the given dimensions.
| width | Extent along X. |
| height | Extent along Y (also used for Z in the current implementation). |
Definition at line 15 of file Builder.cpp.
References mnd::VertexLayout::elements, mnd::MeshData::indices, mnd::MeshData::layout, mnd::VertexLayout::stride, and mnd::MeshData::vertices.
|
static |
Create a clip-space quad covering the entire screen.
Useful for post-processing or Shadertoy-style full-screen fragment shaders. The quad spans NDC [-1, 1] in both X and Y.
Definition at line 151 of file Builder.cpp.
References mnd::VertexLayout::elements, mnd::MeshData::indices, mnd::MeshData::layout, mnd::VertexLayout::stride, and mnd::MeshData::vertices.
Create a flat quad with the given dimensions.
| width | Extent along the X axis. |
| height | Extent along the Y axis. |
Definition at line 97 of file Builder.cpp.
References mnd::VertexLayout::elements, mnd::MeshData::indices, mnd::MeshData::layout, mnd::VertexLayout::stride, and mnd::MeshData::vertices.
Referenced by mnd::ParticleSystem::Init().
Create an equilateral triangle centred at the origin.
| size | Side length. |
Definition at line 124 of file Builder.cpp.
References mnd::VertexLayout::elements, mnd::MeshData::indices, mnd::MeshData::layout, mnd::VertexLayout::stride, and mnd::MeshData::vertices.