main.cpp 893 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // IGL Lib - Simple C++ mesh library
  3. //
  4. // Copyright 2011, Daniele Panozzo. All rights reserved.
  5. // IMPORTANT DO NOT REMOVE OR MOVE
  6. #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
  7. #include <iostream>
  8. #include <string>
  9. #include <read.h>
  10. #include <write.h>
  11. #include <cotmatrix.h>
  12. using namespace std;
  13. int main (int argc, const char * argv[])
  14. {
  15. Eigen::MatrixXd V;
  16. Eigen::MatrixXi F;
  17. igl::read(string(argv[1]),V,F);
  18. std::cout << "Mesh loaded!\n";
  19. cout << "Vertex Array:" << endl;
  20. cout << V << endl;
  21. cout << "-------------" << endl;
  22. cout << "Face Array:" << endl;
  23. cout << F << endl;
  24. cout << "-------------" << endl;
  25. cout << "CotMatrix:" << endl;
  26. Eigen::SparseMatrix<double> L;
  27. igl::cotmatrix(V,F,L);
  28. cout << L << endl;
  29. cout << "-------------" << endl;
  30. igl::write(string(argv[2]),V,F);
  31. return 0;
  32. }