DGtal  0.9.2
demo-kernel-2.cpp
1 
29 #include <iostream>
31 
32 #include "DGtal/base/Common.h"
33 #include "DGtal/kernel/SpaceND.h"
34 #include "DGtal/helpers/StdDefs.h"
35 #include "DGtal/kernel/domains/HyperRectDomain.h"
36 #include "DGtal/io/boards/Board2D.h"
37 #include "DGtal/io/viewers/Viewer3D.h"
38 
40 
41 using namespace std;
42 using namespace DGtal;
43 
45 
46 int main( int argc, char** argv )
47 {
48  QApplication application(argc,argv);
49  typedef DGtal::SpaceND<3, DGtal::int32_t> MySpace;
50  typedef MySpace::Point MyPoint;
51  typedef HyperRectDomain<MySpace> MyDomain;
52  MyPoint p1( 0, 0, 0 );
53  MyPoint p2( 5, 5 ,5 );
54  MyPoint p3( 2, 3, 4 );
55  MyDomain domain( p1, p2 );
56  Viewer3D<> viewer; // for 3D visualization
57  viewer.show();
58  viewer << domain;
59  viewer << p1 << p2 << p3;
60  viewer<< Viewer3D<>::updateDisplay;
61  return application.exec();
62 }
63 // //
Aim: SpaceND is a utility class that defines the fundamental structure of a Digital Space in ND...
Definition: SpaceND.h:95
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
STL namespace.
DGtal is the top-level namespace which contains all DGtal functions and types.