Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
viewer3D-6-clipping.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/helpers/StdDefs.h"
43#include "DGtal/shapes/Shapes.h"
44#include "DGtal/io/viewers/PolyscopeViewer.h"
45#include "DGtal/io/Color.h"
46
48
49using namespace std;
50using namespace DGtal;
51using namespace Z3i;
52
53
55// Standard services - public :
56
57int main( int argc, char** argv )
58{
59 PolyscopeViewer viewer;
60
61 Point p1( 0, 0, 0 );
62 Point p2( 20, 20, 20 );
63 Domain domain(p1, p2);
64 DigitalSet shape_set( domain );
65
66 Shapes<Domain>::addNorm2Ball( shape_set, Point( 10, 10, 10 ), 7 );
67
68 viewer << shape_set;
69
70 viewer << Color(250, 200,0, 100);
71 viewer << ClippingPlane(1,0,0,-4.9);
72 viewer << ClippingPlane(0,1,0.3,-10);
73
74 viewer.show();
75 return 0;
76}
77// //
Structure representing an RGB triple with alpha component.
Definition Color.h:77
void show() override
Starts the event loop and display of elements.
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
Z3i this namespace gathers the standard of types for 3D imagery.
Space::Point Point
Definition StdDefs.h:168
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
Definition StdDefs.h:173
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
Clipping plane.
Definition Display3D.h:299
int main()
Definition testBits.cpp:56
Domain domain