DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
viewer3D-2-sets.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 
53  Viewer3D viewer;
54  viewer.show();
55 
56  Point p1( 0, 0, 0 );
57  Point p2( 10, 10 , 10 );
58  Domain domain( p1, p2 );
59  viewer << domain;
60 
61  DigitalSet shape_set( domain );
62  Shapes<Domain>::addNorm1Ball( shape_set, Point( 5, 5, 5 ), 2 );
63  Shapes<Domain>::addNorm2Ball( shape_set, Point( 3, 3, 3 ), 2 );
64 
65  shape_set.erase(Point(3,3,3));
66  shape_set.erase(Point(6,6,6));
67  viewer << shape_set << Display3D::updateDisplay;
68 
69  return application.exec();
70 }
71 // //
73 
74 
75 
76