DGtal
2.1.0
Loading...
Searching...
No Matches
viewer3D-4-modes.cpp
Go to the documentation of this file.
1
39
#include <iostream>
40
41
#include "DGtal/base/Common.h"
42
#include "DGtal/helpers/StdDefs.h"
43
#include "DGtal/shapes/Shapes.h"
44
#include "DGtal/io/viewers/PolyscopeViewer.h"
45
47
48
using namespace
std
;
49
using namespace
DGtal
;
50
using namespace
Z3i;
51
52
54
// Standard services - public :
55
56
int
main
()
57
{
58
PolyscopeViewer
viewer;
59
60
Point
p1( -1, -1, -2 );
61
Point
p2( 2, 2, 3 );
62
Point
p3( 1, 1, 1 );
63
Point
p4( 2, -1, 3 );
64
Point
p5( -1, 2, 3 );
65
Point
p6( 0, 0, 0 );
66
Point
p0( 0, 2, 1 );
67
68
Domain
domain
( p1, p2 );
69
70
viewer << p1 << p2 << p3<< p4<< p5 << p6 << p0;
71
viewer <<
domain
;
72
73
// Draws point as balls instead of cubes
74
viewer.
drawAsBalls
();
75
viewer << p1 << p2 << p3<< p4<< p5 << p6 << p0;
76
viewer <<
domain
;
77
78
// Draws a grid instead of cubes
79
viewer.
drawAsGrid
();
80
viewer <<
domain
;
81
82
viewer.
show
();
83
return
0;
84
}
85
// //
DGtal::Display3D::drawAsGrid
void drawAsGrid(bool toggle=true)
DGtal::Display3D::drawAsBalls
void drawAsBalls()
DGtal::HyperRectDomain< Space >
DGtal::PointVector< dim, Integer >
DGtal::PolyscopeViewer
Definition
PolyscopeViewer.h:52
DGtal::PolyscopeViewer::show
void show() override
Starts the event loop and display of elements.
Definition
PolyscopeViewer.h:68
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
std
STL namespace.
domain
Domain domain
Definition
testProjection.cpp:88
main
int main()
Definition
viewer3D-4-modes.cpp:56
examples
io
viewers
viewer3D-4-modes.cpp
Generated on Tue Aug 26 2025 14:27:42 for DGtal by
1.9.8