This detailed documentation browser is automatically generated from the comments in libigl header (.h) files.
In general, each libigl function (e.g., igl::func) will be defined in a
correspondingly named header file (e.g., #include <igl/func.h>).
The core library only depends on the standard template library (std::) and
Eigen. These functions reside directly the igl:: namespace
Functions with further dependencies reside in a corresonding sub-namespace. For
example, the function igl::spectra::lscm depends on the Spectra library so it
resides in the igl::spectra:: namespace.
Functions which depend on external code under a copyleft license reside in the
igl::copyleft:: namepsace.
Most libigl functions are templated over the Eigen matrix inputs and outputs.
Callers can choose their own scalar types (e.g., double/float) and storage
orders (Eigen::ColMajor/Eigen::RowMajor). Libigl can be used as a:
LIBIGL_USE_STATIC_LIBRARY=OFF) and insure that IGL_STATIC_LIBRARY is
not defined_ when compiling --- easiest if you're new to libigl, orLIBIGL_USE_STATIC_LIBRARY=ON → IGL_STATIC_LIBRARY is
defined) --- speeds up repeated compilation.The libigl static library is filled with explicit template instantiations for
common Eigen inputs and outputs. If the library doesn't contain your types, you
may get some form of linker error (e.g., Undefined symbols for architecture,
undefined reference to or unresolved external symbol).
You can fix this by:
Making a file in your project to compile the missing templates. E.g., my_templates.cpp
#ifdef IGL_STATIC_LIBRARY
#undef IGL_STATIC_LIBRARY
#endif
#include <igl/per_vertex_normals.h>
template void igl::per_vertex_normals<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >&);
Submit a PR containing your missing template to the development branch of libigl
Change your input/output types to match existing templates (e.g., Eigen::MatrixXd).