Skip to content
Sébastien Mestrallet edited this page Oct 17, 2023 · 11 revisions

libigl is the mesh processing library of the Interactive Geometry Lab from ETH Zürich.

Its design principle are

  • header-only
  • the use of Eigen matrices to store everything, no complex data types
  • minimal dependencies
  • each function has a dedicated .h/.cpp pair of the same name

Mesh representation

to complete their documentation.

V : vertices

A nb_vertices by 3 matrix of double. Each row i represent a vertex with its $x$, $y$ and $z$ coordinates. i $\in$ [0,nb_vertices-1]

A drawing of the data stored in matrix V.

F : faces (triangles)

A nb_faces by 3 matrix of int. Each row i represent a face, with the vertices index at the 3 corners $\in {0,1,2}$. i $\in$ [0,nb_faces-1] ; {F(i,0),F(i,1),F(i,2)} $\in$ [0,nb_vertices-1]. ⚠️ the vertex order determines the orientation (right-hand rule).

A drawing of the data stored in matrix F

TT : triangle-triangle adjacency

A nb_faces by 3 matrix of integers. At (i,local_edge) is the face index of the neighbor of face i on its local_edge. i $\in$ [0,nb_faces-1] ; local_edge $\in {0,1,2}$ ; TT(i,local_edge) $\in$ [0,nb_faces-1]

⚠️ TT and TTi are the only data structure where libigl defines local edge $x$ as the local edge between corner $x$ and $(x+1)%3$. For E, EMAP, uE2E, EF, EI, local edge $x$ is the local edge opposite to corner $x$.

A drawing of the data stored in matrix TT

TTi : inverse triangle-triangle adjacency

A nb_faces by 3 matrix of integers. At (i,local_edge) is the local edge of face TT(i,local_edge) to go back to face i. i $\in$ [0,nb_faces-1] ; local_edge $\in {0,1,2}$ ; TTi(i,local_edge) $\in {0,1,2}$

⚠️ TT and TTi are the only data structure where libigl defines local edge $x$ as the local edge between corner $x$ and $(x+1)%3$. For E, EMAP, uE2E, EF, EI, local edge $x$ is the local edge opposite to corner $x$.

A drawing of the data stored in matrix TTi

Clone this wiki locally