Visual Computing Library
|
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 } |
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: