Skip to main content

Rectangle Struct

Basic Rectangle Shape. More...

Declaration

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

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

Rectangle ()

Public Member Functions Index

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

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

Description

Basic Rectangle Shape.

Creates vertex and index data for a single 2D rectangle.

info

Uses indices {0, 1, 2, 3, 0} with PrimitiveType::LineStrip to render the rectangle outline.

Definition at line 27 of file Rectangle.ixx.

Public Constructors

Rectangle()

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

Definition at line 29 of file Rectangle.ixx.

30 std::vector<Vertex>{
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.5f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
34 {{ 0.5f, -0.5f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
35 },
36 std::vector<unsigned int>{
37 0, 1, 2, 3, 0
38 }
39 ) {}

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

Public Member Functions

primitiveType()

helios::rendering::mesh::PrimitiveType helios::rendering::asset::shape::basic::Rectangle::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 41 of file Rectangle.ixx.

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

Reference helios::rendering::mesh::LineStrip.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.