4 #include <igl/remove_duplicate_vertices.h>
8 std::tuple<std::pair<std::vector<double>, uint32_t>, std::pair<std::vector<uint32_t>, uint32_t>>
15 std::vector<double> vV;
16 std::vector<uint32_t> vF;
27 Eigen::VectorXi IV, _;
28 igl::remove_duplicate_vertices(V_tmp, F_tmp, 0, V, IV, _, F);
30 wmtk::logger().info(
"removed duplicated vertices {} -> {}", V_tmp.rows(), V.rows());
32 const uint32_t npts = V.rows();
33 const uint32_t ntri = F.rows();
36 Eigen::MatrixX<double>::MapType VT(vV.data(), 3, npts);
37 Eigen::MatrixX<uint32_t>::MapType FT(vF.data(), 3, ntri);
39 FT = F.transpose().cast<uint32_t>();
40 return std::make_tuple(std::make_pair(vV, npts), std::make_pair(vF, ntri));
void serialize(MeshWriter &writer, const Mesh *local_root=nullptr) const
void get_position_matrix(MatrixX< double > &matrix)
void get_FV_matrix(MatrixX< int64_t > &matrix)
std::tuple< std::pair< std::vector< double >, uint32_t >, std::pair< std::vector< uint32_t >, uint32_t > > get_vf(const TriMesh &trimesh)
spdlog::logger & logger()
Retrieves the current logger.
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > MatrixX