DGtal 1.3.0
Loading...
Searching...
No Matches
viewer3D-6-clipping.cpp
1
40#include <iostream>
41
42#include "DGtal/base/Common.h"
43#include "DGtal/helpers/StdDefs.h"
44#include "DGtal/shapes/Shapes.h"
45#include "DGtal/io/viewers/Viewer3D.h"
46#include "DGtal/io/DrawWithDisplay3DModifier.h"
47#include "DGtal/io/Color.h"
48
50
51using namespace std;
52using namespace DGtal;
53using namespace Z3i;
54
55
57// Standard services - public :
58
59int main( int argc, char** argv )
60{
61
62 QApplication application(argc,argv);
63 typedef Viewer3D<> MyViewer;
64 MyViewer viewer;
65 viewer.show();
66
67 Point p1( 0, 0, 0 );
68 Point p2( 20, 20, 20 );
69 Domain domain(p1, p2);
70 DigitalSet shape_set( domain );
71
72 Shapes<Domain>::addNorm2Ball( shape_set, Point( 10, 10, 10 ), 7 );
73
74 viewer << SetMode3D( shape_set.className(), "Both" );
75 viewer << shape_set;
76 viewer << CustomColors3D(Color(250, 200,0, 100),Color(250, 200,0, 20));
77 viewer << SetMode3D( p1.className(), "Paving" );
78
79 viewer << ClippingPlane(1,0,0,-4.9);
80 viewer << ClippingPlane(0,1,0.3,-10);
81
83 return application.exec();
84}
85// //
Structure representing an RGB triple with alpha component.
Definition: Color.h:68
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Space::Point Point
Definition: StdDefs.h:168
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
int main()
Definition: testBits.cpp:56
Domain domain