Skip to main content

PrimitiveType.ixx File

Enum of primitive types for mesh rendering. More...

Namespaces Index

namespacehelios
namespacerendering

Graphics rendering infrastructure. More...

namespacemesh

Mesh rendering abstractions and command types. More...

Description

Enum of primitive types for mesh rendering.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file PrimitiveType.ixx
3 * @brief Enum of primitive types for mesh rendering.
4 */
5module;
6
7export module helios.rendering.mesh.PrimitiveType;
8
9
10export namespace helios::rendering::mesh {
11
12 /**
13 * @brief Defines how vertices are assembled into primitives during rendering.
14 *
15 * This enum provides API-agnostic representations for common primitive
16 * assembly modes (points, lines, triangles, and their strip/fan variants).
17 * Backends should map these values to the corresponding native topology
18 * constants.
19 *
20 * Example (pseudo-code mapping to OpenGL):
21 * @code{.cpp}
22 * switch (primitiveType) {
23 * case PrimitiveType::Points: return GL_POINTS;
24 * case PrimitiveType::Lines: return GL_LINES;
25 * case PrimitiveType::LineLoop: return GL_LINE_LOOP;
26 * case PrimitiveType::LineStrip: return GL_LINE_STRIP;
27 * case PrimitiveType::Triangles: return GL_TRIANGLES;
28 * case PrimitiveType::TriangleStrip: return GL_TRIANGLE_STRIP;
29 * case PrimitiveType::TriangleFan: return GL_TRIANGLE_FAN;
30 * default: // unreachable return GL_TRIANGLES;
31 * }
32 * @endcode
33 *
34 * @see MeshConfig (default is `PrimitiveType::Triangles`)
35 */
36 enum class PrimitiveType {
37 /**
38 * Draw each vertex as a single point.
39 */
41
42 /**
43 * Treat each pair of vertices as an independent line segment.
44 */
46
47 /**
48 * Connect vertices in sequence and close the loop (last -> first).
49 */
51
52 /**
53 * Connect vertices in sequence forming a continuous polyline.
54 */
56
57 /**
58 * Interpret each group of three vertices as an independent triangle.
59 */
61
62 /**
63 * Build a connected strip of triangles sharing vertices.
64 */
66
67 /**
68 * Build triangles sharing the first vertex (fan topology).
69 */
71
72 /**
73 * @brief Sentinel value equal to the number of primitive types.
74 */
76 };
77
78}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.