DGtal  0.9.2
viewer3D-4-modes.cpp
1 
30 #include <iostream>
32 
33 #include "DGtal/base/Common.h"
34 #include "DGtal/helpers/StdDefs.h"
35 #include "DGtal/shapes/Shapes.h"
36 #include "DGtal/io/viewers/Viewer3D.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  typedef Viewer3D<> MyViewer;
53 
54  MyViewer viewer;
55  viewer.show();
56 
57 
58 
59  Point p1( -1, -1, -2 );
60  Point p2( 2, 2, 3 );
61  Domain domain( p1, p2 );
62  Point p3( 1, 1, 1 );
63  Point p4( 2, -1, 3 );
64  Point p5( -1, 2, 3 );
65  Point p6( 0, 0, 0 );
66  Point p0( 0, 2, 1 );
67 
68  viewer << SetMode3D( p1.className(), "Paving" );
69 
70  viewer << p1 << p2 << p3<< p4<< p5 << p6 << p0;
71 
72  viewer << SetMode3D(domain.className(), "Grid");
73  viewer << domain << MyViewer::updateDisplay;
74 
75 
76  return application.exec();
77 }
78 // //
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
STL namespace.
std::string className() const
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. Realizes the concept CDrawableWithDisplay3D.