This library does not contain any ready-to-execute remeshing algorithms. It simply provides a friendly way to manipulate a surface/volume mesh, it is meant to be used by your geometry processing software. Here you will find serialization, attributes, basic algebra, helpers like k-NN queries and few other things.
There are many mesh processing libraries in the wild, excellent specimens are:
I am, however, not satisfied with either of those. At the moment of this writing, Geogram, for instance, has 847 thousands (sic!) of lines of code. I strive to make a library under 10K loc able to do common mesh handling tasks for surfaces and volumes. Another reason to create yet-another-mesh-library is that I like explicit types and avoid auto
as long as it reasonable. In practice it means that I cannot use libigl for the simple reason that I do not know what this data represents:
Eigen::MatrixXd V;
Eigen::MatrixXi F;
Is it a polygonal surface or a tetrahedral mesh? If surface, is it triangulated or is it a generic polygonal mesh? I simply can not tell... Thus, ultimaille provides several classes that allow to represent meshes:
PointSet
PolyLine
Triangles, Quads, Polygons
Tetrahedra, Hexahedra, Wedges, Pyramids
You can not mix tetrahedra and hexahedra in a single mesh, I believe that it is confusing to do otherwise. If you need a mixed mesh, create a separate mesh for each cell type: these classes allow to share a common set of vertices via a std::shared_ptr
.
- This library is meant to have a reasonable performance. It means that I strive to make it as rapid as possible as long as it does not deteriorate the readability of the source code.
- All the library is built around STL containers (mainly
std::vector<int>
), normally it will have nomalloc/free/new/delete
instructions. - Despite that, there will be no
size_t
anditerator::
in the code. Anint
is anint
. End of discussion. - There will be as little templates as it is reasonable, the default data types are
int
anddouble
.
git clone --recurse-submodules https://github.com/ssloy/ultimaille.git &&
cd ultimaille &&
mkdir build &&
cd build &&
cmake -DUM_UNIT_TESTS:BOOL=ON .. &&
make -j &&
ctest .