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