#include "mesh_with_skeleton.h" #include #include #include #include #include bool igl::mesh_with_skeleton( const Eigen::MatrixXd & V, const Eigen::MatrixXi & F, const Eigen::MatrixXd & C, const Eigen::VectorXi & /*P*/, const Eigen::MatrixXi & BE, const Eigen::MatrixXi & CE, const int samples_per_bone, Eigen::MatrixXd & VV, Eigen::MatrixXi & TT, Eigen::MatrixXi & FF) { using namespace Eigen; using namespace igl; using namespace std; // Collect all edges that need samples: MatrixXi BECE = cat(1,BE,CE); MatrixXd S; // Sample each edge with 10 samples. (Choice of 10 doesn't seem to matter so // much, but could under some circumstances) sample_edges(C,BECE,samples_per_bone,S); // Vertices we'll constrain tet mesh to meet MatrixXd VS = cat(1,V,S); // Boundary faces MatrixXi BF; // Use tetgen to mesh the interior of surface, this assumes surface: // * has no holes // * has no non-manifold edges or vertices // * has consistent orientation // * has no self-intersections // * has no 0-volume pieces // Default settings pq100 tell tetgen to mesh interior of triangle mesh and // to produce a graded tet mesh //writeOFF("mesh_with_skeleton.off",VS,F); cerr<<"tetgen begin()"<