Skip to main content

Shape Struct

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

Declaration

struct helios::rendering::asset::shape::Shape { ... }

Derived Structs

structCircle

Basic Circle Shape (2D, in XY plane). More...

structCube

Basic Cube Shape. More...

structEllipse

Basic Ellipse Shape (2D, in XY plane). More...

structGrid

A configurable grid shape for rendering reference lines in 3D space. More...

structLine

Basic Line Shape. More...

structRectangle

Basic Rectangle Shape. More...

structRhombus

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

structTriangle

Basic Triangle Shape. More...

Public Constructors Index

Shape (std::vector< Vertex > vertices, std::vector< unsigned int > indices)

Creates a new shape from the given vertices and indices. The data is copied into immutable shared vectors. More...

Public Destructor Index

~Shape ()=default

Public Member Functions Index

helios::rendering::mesh::PrimitiveTypeprimitiveType () const noexcept=0

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

Public Member Attributes Index

std::shared_ptr< const std::vector< Vertex > >vertices = {}

Shared pointer to an immutable vector of vertices for this shape. More...

std::shared_ptr< const std::vector< unsigned int > >indices = {}

Shared pointer to an immutable vector of indices for this shape. More...

Description

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

Definition at line 24 of file Shape.ixx.

Public Constructors

Shape()

helios::rendering::asset::shape::Shape::Shape (std::vector< Vertex > vertices, std::vector< unsigned int > indices)
inline

Creates a new shape from the given vertices and indices. The data is copied into immutable shared vectors.

Parameters
vertices

A vector of vertices representing the shape's geometry

indices

A vector of unsigned integers representing the shape's indices.

Definition at line 45 of file Shape.ixx.

45 Shape(std::vector<Vertex> vertices, std::vector<unsigned int> indices) :
46 vertices(std::make_shared<const std::vector<Vertex>>(std::move(vertices))),
47 indices(std::make_shared<const std::vector<unsigned int>>(std::move(indices)))
48 {}

References indices and vertices.

Referenced by helios::rendering::asset::shape::basic::Circle::Circle, helios::rendering::asset::shape::basic::Cube::Cube, helios::rendering::asset::shape::basic::Ellipse::Ellipse, helios::rendering::asset::shape::basic::Line::Line, helios::rendering::asset::shape::basic::Rectangle::Rectangle, helios::rendering::asset::shape::basic::Rhombus::Rhombus and helios::rendering::asset::shape::basic::Triangle::Triangle.

Public Destructor

~Shape()

virtual helios::rendering::asset::shape::Shape::~Shape ()
virtual default

Definition at line 26 of file Shape.ixx.

Public Member Functions

primitiveType()

virtual helios::rendering::mesh::PrimitiveType helios::rendering::asset::shape::Shape::primitiveType ()
nodiscard noexcept

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 58 of file Shape.ixx.

Public Member Attributes

indices

std::shared_ptr<const std::vector<unsigned int> > helios::rendering::asset::shape::Shape::indices = {}

Shared pointer to an immutable vector of indices for this shape.

Definition at line 36 of file Shape.ixx.

36 std::shared_ptr<const std::vector<unsigned int>> indices = {};

Referenced by Shape.

vertices

std::shared_ptr<const std::vector<Vertex> > helios::rendering::asset::shape::Shape::vertices = {}

Shared pointer to an immutable vector of vertices for this shape.

Definition at line 31 of file Shape.ixx.

31 std::shared_ptr<const std::vector<Vertex>> vertices = {};

Referenced by Shape.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.