Element

class Element

Class that represents an element.

Public Functions

Element(ElementType type, const std::vector<Index> &vtx_ids)

Build an element.

Parameters:
  • typeElement type

  • vtx_ids – Vertex IDs composing the element

ElementType type() const

Get element type.

Returns:

Element type

u8 num_vertices() const

Get number of vertices.

Returns:

Number of vertices

Index index(u8 idx) const

Get vertex ID fom local index.

Parameters:

idx – Local vertex index

Returns:

Vertex ID

Span<const Index> indices() const

Get vertex IDs.

Returns:

Vertex IDs

void shift(Index ofst)

Shift element indices by offset.

Parameters:

ofst – Offset by which we shift the indices