Cube Struct
Static cube mesh definition with per-face vertices. More...
Declaration
Public Static Functions Index
| static MeshData | meshData () |
|
Creates a lightweight MeshData view over the static cube buffers. More... | |
Public Static Attributes Index
| static constexpr std::array< Vertex, 24 > | vertices |
|
Interleaved vertex data (position, normal, UV), grouped by face. More... | |
| static constexpr std::array< unsigned int, 36 > | indices = ... |
| static constexpr helios::engine::rendering::mesh::types::PrimitiveType | primitiveType = mesh::types::PrimitiveType::Triangles |
|
Primitive topology used to interpret indices. More... | |
Description
Static cube mesh definition with per-face vertices.
The cube uses 24 vertices (4 per face) so each face can provide distinct normals and texture coordinates. Indices define 12 triangles (36 indices).
Definition at line 27 of file Cube.ixx.
Public Static Functions
meshData()
| inline static |
Creates a lightweight MeshData view over the static cube buffers.
- Returns
MeshData referencing vertices, indices, and primitiveType.
Definition at line 99 of file Cube.ixx.
References indices, primitiveType and vertices.
Public Static Attributes
indices
| constexpr static |
Triangle index buffer (counter-clockwise winding).
- Initialiser
-
= { 0, 1, 2, 2, 3, 0, 4, 5, 6, 6, 7, 4, 8, 9, 10, 10, 11, 8, 12, 13, 14, 14, 15, 12, 16, 17, 18, 18, 19, 16, 20, 21, 22, 22, 23, 20 }
Definition at line 74 of file Cube.ixx.
Referenced by meshData.
primitiveType
| constexpr static |
vertices
| constexpr static |
Interleaved vertex data (position, normal, UV), grouped by face.
Definition at line 32 of file Cube.ixx.
Referenced by meshData.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.