Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
viewer3D-4-modes.cpp
Go to the documentation of this file.
1
16
29
30
37
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
48using namespace std;
49using namespace DGtal;
50using namespace Z3i;
51
52
54// Standard services - public :
55
56int main( int argc, char** argv )
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// //
void drawAsGrid(bool toggle=true)
void show() override
Starts the event loop and display of elements.
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
int main()
Definition testBits.cpp:56
Domain domain