$search
00001 /* 00002 James R. Diebel 00003 Stanford University 00004 00005 Started: 30 August 2004 00006 Last revised: 31 Sugust 2004 00007 00008 testapp.cc - debug program to test new functionality 00009 00010 Depends on: 00011 - Mesh class (mesh.hh) 00012 -- Vec3d class (vec3d.hh) 00013 -- Vert class (vert.hh) 00014 -- Edge class (edge.hh) 00015 -- Face class (face.hh) 00016 - Timer class (timer.hh) 00017 */ 00018 00019 #include <iostream> 00020 #include <fstream> 00021 #include "bmtk/mesh.hh" 00022 #include "bmtk/timer.hh" 00023 #include <trimesh/trimesh.h> 00024 00025 using namespace std; 00026 using namespace bmtk; 00027 00028 int main (int argc, char *argv[]) { 00029 // if bad command line args, give usage instructions and exit 00030 if (argc > 3) { 00031 cout << endl 00032 << "Usage: testapp usage varies, see code" << endl; 00033 exit(1); 00034 } 00035 // create empty Mesh and then fill it with data from ply file 00036 Mesh m1,m2; 00037 m1.readMesh(argv[1]); 00038 m2.readMesh(argv[2]); 00039 00040 // transfer vertex positions from m1 to m2 00041 for (int i=0;i<m1.nv;i++) { 00042 m2.v[i].x0 = m1.v[i].x; 00043 } 00044 00045 // output it to the specified file 00046 m2.writeMesh(argv[2]); 00047 00048 return 0; 00049 }