WireframeCube Struct
Static wireframe cube mesh definition. More...
Declaration
Public Static Functions Index
| static MeshData | meshData () |
|
Creates a lightweight MeshData view over the static cube buffers. More... | |
| static helios::math::aabbf | boundsData () |
|
Returns the local bounds of this mesh. More... | |
Public Static Attributes Index
| static constexpr std::array< Vertex, 8 > | vertices = ... |
| static constexpr std::array< unsigned int, 24 > | indices = ... |
|
Line index buffer. More... | |
| static constexpr PrimitiveType | primitiveType = PrimitiveType::Lines |
|
Primitive topology used to interpret indices. More... | |
Description
Static wireframe cube mesh definition.
The cube is centered at the origin and spans from -0.5 to +0.5 on all three axes. It is rendered as line segments.
Definition at line 28 of file WireframeCube.ixx.
Public Static Functions
boundsData()
| inline static |
Returns the local bounds of this mesh.
- Returns
local bounds as aabb
Definition at line 94 of file WireframeCube.ixx.
meshData()
| inline static |
Creates a lightweight MeshData view over the static cube buffers.
- Returns
MeshData referencing vertices, indices, and primitiveType.
Definition at line 82 of file WireframeCube.ixx.
References indices, primitiveType and vertices.
Public Static Attributes
indices
| constexpr static |
Line index buffer.
- Initialiser
-
= { 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 }
Every pair of indices describes one edge.
Definition at line 53 of file WireframeCube.ixx.
Referenced by meshData.
primitiveType
| constexpr static |
Primitive topology used to interpret indices.
Definition at line 76 of file WireframeCube.ixx.
Referenced by meshData.
vertices
| constexpr static |
Cube corner vertices.
- Initialiser
-
{{ {{-0.5f, -0.5f, -0.5f}, {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f}}, {{ 0.5f, -0.5f, -0.5f}, {0.0f, 0.0f, 1.0f}, {1.0f, 0.0f}}, {{ 0.5f, 0.5f, -0.5f}, {0.0f, 0.0f, 1.0f}, {1.0f, 1.0f}}, {{-0.5f, 0.5f, -0.5f}, {0.0f, 0.0f, 1.0f}, {0.0f, 1.0f}}, {{-0.5f, -0.5f, 0.5f}, {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f}}, {{ 0.5f, -0.5f, 0.5f}, {0.0f, 0.0f, 1.0f}, {1.0f, 0.0f}}, {{ 0.5f, 0.5f, 0.5f}, {0.0f, 0.0f, 1.0f}, {1.0f, 1.0f}}, {{-0.5f, 0.5f, 0.5f}, {0.0f, 0.0f, 1.0f}, {0.0f, 1.0f}} }}
Normals and UVs are included to match the common Vertex layout, but are not relevant for simple wireframe rendering.
Definition at line 36 of file WireframeCube.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.