DGtal  1.5.beta
viewer3D-4-modes.cpp
1 
39 #include <iostream>
40 
41 #include "DGtal/base/Common.h"
42 #include "DGtal/helpers/StdDefs.h"
43 #include "DGtal/shapes/Shapes.h"
44 #include "DGtal/io/viewers/Viewer3D.h"
45 
47 
48 using namespace std;
49 using namespace DGtal;
50 using namespace Z3i;
51 
52 
54 // Standard services - public :
55 
56 int main( int argc, char** argv )
57 {
58 
59  QApplication application(argc,argv);
60  typedef Viewer3D<> MyViewer;
61 
62  MyViewer viewer;
63  viewer.show();
64 
65 
66 
67  Point p1( -1, -1, -2 );
68  Point p2( 2, 2, 3 );
69  Domain domain( p1, p2 );
70  Point p3( 1, 1, 1 );
71  Point p4( 2, -1, 3 );
72  Point p5( -1, 2, 3 );
73  Point p6( 0, 0, 0 );
74  Point p0( 0, 2, 1 );
75 
76  viewer << SetMode3D( p1.className(), "Paving" );
77 
78  viewer << p1 << p2 << p3<< p4<< p5 << p6 << p0;
79 
80  viewer << SetMode3D(domain.className(), "Grid");
81  viewer << domain << MyViewer::updateDisplay;
82 
83 
84  return application.exec();
85 }
86 // //
std::string className() const
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
DGtal is the top-level namespace which contains all DGtal functions and types.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
int main(int argc, char **argv)
Domain domain