DGtal 1.3.0
Loading...
Searching...
No Matches
viewer3D-3-objects.cpp
1
39#include <iostream>
40
41#include "DGtal/base/Common.h"
42#include "DGtal/io/DrawWithDisplay3DModifier.h"
43#include "DGtal/io/Color.h"
44#include "DGtal/helpers/StdDefs.h"
45#include "DGtal/shapes/Shapes.h"
46#include "DGtal/io/viewers/Viewer3D.h"
47
49
50using namespace std;
51using namespace DGtal;
52using namespace Z3i;
53
54
56// Standard services - public :
57
58int main( int argc, char** argv )
59{
60
61 QApplication application(argc,argv);
62
63 typedef Viewer3D<> MyViewer;
64 MyViewer viewer;
65 viewer.show();
66
67 Point p1( 0, 0, 0 );
68 Point p2( 10, 10 , 10 );
69 Domain domain( p1, p2 );
70
71
72 DigitalSet shape_set( domain );
73 Shapes<Domain>::addNorm1Ball( shape_set, Point( 5, 5, 5 ), 2 );
74 Shapes<Domain>::addNorm2Ball( shape_set, Point( 3, 3, 3 ), 2 );
75 viewer << CustomColors3D(Color(250, 200,0, 100),Color(250, 200,0, 25));
76 viewer << shape_set;
77
78 Object6_18 shape( dt6_18, shape_set );
79 viewer << SetMode3D( shape.className(), "DrawAdjacencies" );
80 viewer << shape;
81
82 Object18_6 shape2( dt18_6, shape_set );
83 viewer << SetMode3D( shape2.className(), "DrawAdjacencies" );
84 //viewer << shape2;
85
87 return application.exec();
88}
89// //
Structure representing an RGB triple with alpha component.
Definition: Color.h:68
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
Definition: Object.h:120
static void addNorm1Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
static const DT6_18 dt6_18
Definition: StdDefs.h:194
static const DT18_6 dt18_6
Definition: StdDefs.h:195
Space::Point Point
Definition: StdDefs.h:168
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
int main()
Definition: testBits.cpp:56
Domain domain