DGtal 2.1.0
Loading...
Searching...
No Matches
viewer3D-2-sets.cpp
Go to the documentation of this file.
1
40#include <iostream>
41
42#include "DGtal/base/Common.h"
43#include "DGtal/helpers/StdDefs.h"
44#include "DGtal/shapes/Shapes.h"
45
46#include "DGtal/io/viewers/PolyscopeViewer.h"
47
49
50using namespace std;
51using namespace DGtal;
52using namespace Z3i;
53
54
56// Standard services - public :
57
58int main()
59{
62 Point p1( 0, 0, 0 );
63 Point p2( 10, 10 , 10 );
64 Domain domain( p1, p2 );
65
66 v << p1 << p2 << domain;
67
68 DigitalSet shape_set( domain );
69 Shapes<Domain>::addNorm1Ball( shape_set, Point( 5, 5, 5 ), 2 );
70 Shapes<Domain>::addNorm2Ball( shape_set, Point( 3, 3, 3 ), 2 );
71
72 shape_set.erase(Point(3,3,3));
73 shape_set.erase(Point(6,6,6));
74
75 v << shape_set;
76
77 v.show();
79 return 0;
80}
81// //
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
void show() override
Starts the event loop and display of elements.
static void addNorm1Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
Space::Point Point
Definition StdDefs.h:168
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
Domain domain
int main()