Skip to main content

Line.ixx File

Basic line shape for rendering. More...

Included Headers

Namespaces Index

namespacehelios
namespacerendering

Graphics rendering infrastructure. More...

namespaceasset

Rendering asset management. More...

namespaceshape

Geometric shape definitions. More...

namespacebasic

Basic primitive shapes. More...

Classes Index

structLine

Basic Line Shape. More...

Description

Basic line shape for rendering.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file Line.ixx
3 * @brief Basic line shape for rendering.
4 */
5module;
6
7
8#include <vector>
9
10export module helios.rendering.asset.shape.basic.Line;
11
12import helios.rendering.asset.shape.Shape;
13import helios.rendering.Vertex;
14import helios.rendering.mesh.PrimitiveType;
15
16using namespace helios::rendering;
17
19
20 /**
21 * @brief Basic Line Shape.
22 *
23 * Creates vertex and index data for a single diagonal line segment. By default, this shape
24 * defines a line spanning from (0, 0, 0) to the point (1, 1, 0).
25 */
26 struct Line : public Shape {
27
29 std::vector<Vertex>{
30
31 {{ 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
32 {{ 1.0f, 1.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
33 },
34 std::vector<unsigned int>{
35 0, 1
36 }
37 ) {}
38
39 [[nodiscard]] helios::rendering::mesh::PrimitiveType primitiveType() const noexcept override {
41 }
42
43 };
44
45}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.