#include "stdafx.h" #include "geodesic_mesh.h" #include "geodesic_algorithm_exact.h" using namespace std; int main(int argc, char **argv) { if(argc == 1) { cout < points; std::vector faces; std::vector realIndex; int originalVertNum = 0; std::cout << file_name << std::endl; // Load Mesh bool success = geodesic::read_mesh_from_file(file_name, points, faces, realIndex, originalVertNum); if(!success) { std::cout << "something is wrong with the input file" << std::endl; return -2; } std::cout << "Load Mesh Success..." << std::endl; // Build Mesh geodesic::Mesh mesh; mesh.initialize_mesh_data(points, faces); //create internal mesh data structure including edges std::cout << "Build Mesh Success..." << std::endl; geodesic::GeodesicAlgorithmExact algorithm(&mesh); // Propagation algorithm.propagate(source_vertex_index); //cover the whole mesh // Print Statistics std::cout << endl; algorithm.print_statistics(); // Output Geodesic Distances if (outputMesh[0] != '\0') { ofstream output(outputMesh); for(unsigned i=0; i