https://github.com/HTDerekLiu/surface_multigrid_code
Revision db5c7fa56b977d3f1ac0ac11ed875f75229f2d27 authored by eriszhang on 08 August 2021, 03:27:39 UTC, committed by eriszhang on 08 August 2021, 03:27:39 UTC
1 parent d366192
Tip revision: db5c7fa56b977d3f1ac0ac11ed875f75229f2d27 authored by eriszhang on 08 August 2021, 03:27:39 UTC
add
add
Tip revision: db5c7fa
SSP_decimate.cpp
#include "SSP_decimate.h"
bool SSP_decimate(
const Eigen::MatrixXd & VO,
const Eigen::MatrixXi & FO,
const size_t & tarF,
const int & dec_type,
Eigen::MatrixXd & V,
Eigen::MatrixXi & F,
Eigen::VectorXi & IMF,
Eigen::VectorXi & IM,
std::vector<single_collapse_data> & decInfo,
std::vector<std::vector<int>> & decIM,
Eigen::VectorXi & FIM)
{
using namespace std;
bool returnVal = true;
Eigen::VectorXi BI;
if (!igl::is_vertex_manifold(FO, BI) || !igl::is_edge_manifold(FO)) {
cout << "input mesh is not manifold\n";
return false;
}
switch (dec_type)
{
case 1: // mid point
cout << "uniform decimation \n";
returnVal = SSP_midpoint(VO,FO,tarF, V,F,IMF, IM, decInfo, decIM, FIM);
break;
case 2: // vertex removal
cout << "vertex removal \n";
returnVal = SSP_vertexRemoval(VO,FO,tarF, V,F,IMF, IM, decInfo, decIM, FIM);
break;
default:
cout << "qslim \n";
returnVal = SSP_qslim(VO,FO,tarF, V,F,IMF, IM, decInfo, decIM, FIM);
}
return returnVal;
}
Computing file changes ...