Skip to main content

Rhombus Struct

A 2D rhombus (diamond) shape primitive. More...

Declaration

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

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

Rhombus ()

Constructs a rhombus shape with predefined vertices. More...

Public Member Functions Index

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

Returns the primitive type for rendering. More...

Description

A 2D rhombus (diamond) shape primitive.

Creates a diamond shape centered at the origin with vertices at:

  • Left: (-0.5, 0.0)
  • Top: (0.0, 0.25)
  • Right: (0.5, 0.0)
  • Bottom: (0.0, -0.25)

The shape spans 1.0 units horizontally and 0.5 units vertically.

``` (0, 0.25) /\ / \ / \ (-0.5,0) (0.5,0) \ / \ / \/ (0, -0.25) ```

Default primitive type is Lines (wireframe rendering).

Definition at line 44 of file Rhombus.ixx.

Public Constructors

Rhombus()

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

Constructs a rhombus shape with predefined vertices.

Definition at line 49 of file Rhombus.ixx.

50 std::vector<Vertex>{
51
52 {{ -0.5f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
53 {{ 0.0f, 0.25f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
54 {{ 0.0f, -0.25f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}},
55 {{ 0.5f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f}}
56
57 },
58 std::vector<unsigned int>{
59 2, 3, 1, 0, 2, 1,
60 }
61 ) {}

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

Public Member Functions

primitiveType()

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

Returns the primitive type for rendering.

Returns

PrimitiveType::Lines for wireframe rendering.

Definition at line 68 of file Rhombus.ixx.

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

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.