Created
May 31, 2018 19:14
-
-
Save alecjacobson/1cd26960b8ac9801849be97f64825a59 to your computer and use it in GitHub Desktop.
Converte .dmat to binary .dmat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <igl/writeDMAT.h> | |
#include <igl/readDMAT.h> | |
#include <cstdlib> | |
#include <iostream> | |
int main(int argc, char *argv[]) | |
{ | |
if(argc == 1) | |
{ | |
std::cout<<R"( | |
Usage: | |
rewrite_as_binary_dmat fileA.dmat | |
rewrite_as_binary_dmat fileA.dmat [fileB.dmat ...] | |
Read and then re-write (overwrite) .dmat file(s) using binary format. | |
)"<<std::endl; | |
} | |
Eigen::MatrixXd X; | |
for(int i = 1;i<argc;i++) | |
{ | |
if(! (igl::readDMAT(argv[1],X) && igl::writeDMAT(argv[1],X,false) )) | |
{ | |
return EXIT_FAILURE; | |
} | |
} | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment