Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
viewer3D-1-points.cpp
Go to the documentation of this file.
1
16
29
36
38#include <iostream>
39
40#include "DGtal/base/Common.h"
41#include "DGtal/helpers/StdDefs.h"
42#include "DGtal/io/Display3D.h"
43#include "DGtal/io/viewers/PolyscopeViewer.h"
45
46using namespace std;
47using namespace DGtal;
48using namespace Z3i;
49
50
52// Standard services - public :
53
54int main( int argc, char** argv )
55{
57
58 Point p1( 0, 0, 0 );
59 Point p2( 5, 5 ,5 );
60 Point p3( 2, 3, 4 );
61 Domain domain( p1, p2 );
62
63 // Drawing can happen with draw function
64 v.draw(p1);
65 // Or stream operators that can be chained
66 v << p2 << p3;
67 // Draw operator allows to retrieve the name (id) of an object
68 std::string name = v.draw(domain);
69 trace.info() << name << std::endl;
70
71 v.show();
72 return 0;
73}
74// //
std::string draw(const Point &p, const std::string &uname="Point_{i}")
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.
Trace trace
STL namespace.
int main()
Definition testBits.cpp:56
Domain domain