DGtal  1.4.beta
viewer3D-6-clipping.cpp
1 
39 #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 
51 using namespace std;
52 using namespace DGtal;
53 using namespace Z3i;
54 
55 
57 // Standard services - public :
58 
59 int 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 
82  viewer << MyViewer::updateDisplay;
83  return application.exec();
84 }
85 // //
DGtal::HyperRectDomain< Space >
DGtal::Color
Structure representing an RGB triple with alpha component.
Definition: Color.h:67
DGtal::Display3D::updateDisplay
@ updateDisplay
Definition: Display3D.h:249
DGtal::Viewer3D
Definition: Viewer3D.h:131
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::CustomColors3D
Definition: DrawWithDisplay3DModifier.h:129
DGtal::ClippingPlane
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
Definition: DrawWithDisplay3DModifier.h:156
DGtal::SetMode3D
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
Definition: DrawWithDisplay3DModifier.h:73
main
int main(int argc, char **argv)
Definition: testArithmeticDSS-benchmark.cpp:147
DGtal::Shapes
Aim: A utility class for constructing different shapes (balls, diamonds, and others).
Definition: DGtal/shapes/Shapes.h:71
domain
Domain domain
Definition: testProjection.cpp:88
DGtal::Viewer3D::show
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Point
MyPointD Point
Definition: testClone2.cpp:383
DGtal::DigitalSetByAssociativeContainer
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Definition: DigitalSetByAssociativeContainer.h:89