Visual Computing Library
Loading...
Searching...
No Matches
vcl::ElemId Struct Reference

The ElemId struct enumerates the elements that can compose a mesh. More...

#include <vclib/types/mesh_elements.h>

Public Types

enum  Enum : uint { VERTEX = 0 , FACE , EDGE , ELEMENTS_NUMBER }
 

Detailed Description

The ElemId struct enumerates the elements that can compose a mesh.

The elements are identified by an unsigned integer value, that can be used to access the element of the mesh through a template parameter, without having to know the actual type of the element.

This is very useful when you want to write generic code that can work with different types of elements.

For example, you can iterate the vertices of a mesh with the following code:

for (auto& v : m.template elements<ElemId::VERTEX>()) {
// do something with the vertex v
}
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The ElemId struct enumerates the elements that can compose a mesh.
Definition mesh_elements.h:54

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