DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
viewer3D-4-modes.cpp
1 
30 
31 #include <iostream>
32 #include <QtGui/qapplication.h>
33 #include "DGtal/io/viewers/Viewer3D.h"
34 #include "DGtal/base/Common.h"
35 #include "DGtal/helpers/StdDefs.h"
36 #include "DGtal/shapes/Shapes.h"
37 
39 
40 using namespace std;
41 using namespace DGtal;
42 using namespace Z3i;
43 
44 
46 // Standard services - public :
47 
48 int main( int argc, char** argv )
49 {
50 
51  QApplication application(argc,argv);
52  Viewer3D viewer;
53  viewer.show();
54 
55 
56 
57  Point p1( -1, -1, -2 );
58  Point p2( 2, 2, 3 );
59  Domain domain( p1, p2 );
60  Point p3( 1, 1, 1 );
61  Point p4( 2, -1, 3 );
62  Point p5( -1, 2, 3 );
63  Point p6( 0, 0, 0 );
64  Point p0( 0, 2, 1 );
65 
66  // viewer << SetMode3D( p1.className(), "Grid" );
67 
68  viewer << p1 << p2 << p3<< p4<< p5 << p6 << p0;
69 
70 
71  //viewer << SetMode3D(domain.className(), "PavingGrids");
72  viewer << domain << Display3D::updateDisplay;
73 
74 
75  return application.exec();
76 }
77 // //
79 
80 
81 
82