DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
viewer3D-3-objects.cpp
Go to the documentation of this file.
1
16
29
36
37
39
#include <iostream>
40
41
#include "DGtal/base/Common.h"
42
#include "DGtal/io/Color.h"
43
#include "DGtal/helpers/StdDefs.h"
44
#include "DGtal/shapes/Shapes.h"
45
#include "DGtal/io/viewers/PolyscopeViewer.h"
46
48
49
using namespace
std
;
50
using namespace
DGtal
;
51
using namespace
Z3i
;
52
53
55
// Standard services - public :
56
57
int
main
()
58
{
59
PolyscopeViewer
v;
60
61
// Instructs the viewer to draw adjacencies relation whenever possible
62
v.
drawAdjacencies
(
true
/* false */
);
63
64
Point
p1( 0, 0, 0 );
65
Point
p2( 10, 10 , 10 );
66
Domain
domain
( p1, p2 );
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
v << shape_set;
73
74
Object6_18
shape1( dt6_18, shape_set );
75
Object18_6
shape2( dt18_6, shape_set );
76
77
// Draws both the object the adjacencies
78
v << shape1;
79
v << shape2;
80
81
v.
show
();
82
return
0;
83
}
84
// //
DGtal::Display3D::drawAdjacencies
void drawAdjacencies(bool toggle=true)
DGtal::PolyscopeViewer
Definition
PolyscopeViewer.h:57
DGtal::PolyscopeViewer::show
void show() override
Starts the event loop and display of elements.
Definition
PolyscopeViewer.h:73
DGtal::Shapes::addNorm1Ball
static void addNorm1Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
DGtal::Shapes::addNorm2Ball
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
DGtal::Point
DGtal::Domain
DGtal::Z3i
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal::Z3i::Object6_18
Object< DT6_18, DigitalSet > Object6_18
Definition
StdDefs.h:174
DGtal::Z3i::Object18_6
Object< DT18_6, DigitalSet > Object18_6
Definition
StdDefs.h:178
DGtal::Z3i::DigitalSet
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
Definition
StdDefs.h:173
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
std
STL namespace.
main
int main(int, char **)
Definition
testIntegerComputer.cpp:331
domain
Domain domain
Definition
testProjection.cpp:88
examples
io
viewers
viewer3D-3-objects.cpp
Generated on
for DGtal by
1.18.0