Skip to main content

Triangle Struct

Basic Triangle Shape. More...

Declaration

struct helios::rendering::asset::shape::basic::Triangle { ... }

Base struct

structShape

Struct representing geometric primitives and indices for various shapes. provides immutable, shared access to vertices and indices of the represented geometric shape. More...

Public Constructors Index

Triangle ()

Public Member Functions Index

helios::rendering::mesh::PrimitiveTypeprimitiveType () const noexcept override

Returns the intended PrimitiveType for this Shape. More...

Description

Basic Triangle Shape.

Creates vertex and index data for a single Triangle line segment. By default, this shape defines three vertices (-1, -1, 0), (-1, 1, 0) to the point (1, 0, 0).

Definition at line 26 of file Triangle.ixx.

Public Constructors

Triangle()

helios::rendering::asset::shape::basic::Triangle::Triangle ()
inline

Definition at line 28 of file Triangle.ixx.

29 std::vector<Vertex>{
30
31 {{ -0.5f, -0.5f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
32 {{ -0.5f, 0.5f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
33 {{ 0.5f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}}
34 },
35 std::vector<unsigned int>{
36 0, 1, 2, 0
37 }
38 ) {}

Reference helios::rendering::asset::shape::Shape::Shape.

Public Member Functions

primitiveType()

helios::rendering::mesh::PrimitiveType helios::rendering::asset::shape::basic::Triangle::primitiveType ()
inline nodiscard noexcept virtual

Returns the intended PrimitiveType for this Shape.

This method returns the intended PrimitiveType for the Shape represented by this instance. This information can be used to properly set up the MeshConfig wrapping this Shape.

Returns

The intended PrimitiveType of this Shape.

Definition at line 40 of file Triangle.ixx.

40 [[nodiscard]] helios::rendering::mesh::PrimitiveType primitiveType() const noexcept override {
42 }

Reference helios::rendering::mesh::Lines.


The documentation for this struct was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.