]> Creatis software - cpPlugins.git/blob - appli/examples/example_ReadQuadEdgeMeshWithoutPlugins.cxx
63abac7e34565f1d6e7b936d734e0d94433afc04
[cpPlugins.git] / appli / examples / example_ReadQuadEdgeMeshWithoutPlugins.cxx
1 #include <cstdlib>
2 #include <iostream>
3 #include <string>
4
5 #include <cpPlugins/Extensions/QuadEdgeMesh.h>
6 #include <cpPlugins/Extensions/MeshReader.h>
7
8 // -------------------------------------------------------------------------
9 const unsigned int Dimension = 3;
10 typedef float TScalar;
11 typedef cpPlugins::Extensions::QuadEdgeMesh< TScalar, Dimension > TMesh;
12
13 // -------------------------------------------------------------------------
14 int main( int argc, char* argv[] )
15 {
16   if( argc < 2 )
17   {
18     std::cerr
19       << "Usage: " << argv[ 0 ]
20       << " input_mesh"
21       << std::endl;
22     return( 1 );
23
24   } // fi
25
26   typedef cpPlugins::Extensions::MeshReader< TMesh > TReader;
27   TReader::Pointer reader = TReader::New( );
28   reader->SetFileName( argv[ 1 ] );
29   reader->Update( );
30
31   return( 0 );
32 }
33
34 // eof - $RCSfile$