DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dgtalBoard3DTo2D-6.cpp
1 
29 
30 #include <iostream>
31 #include "DGtal/io/boards/Board3DTo2D.h"
32 #include "DGtal/io/DrawWithDisplay3DModifier.h"
33 #include "DGtal/io/Color.h"
34 
35 #include "DGtal/base/Common.h"
36 #include "DGtal/helpers/StdDefs.h"
37 #include "DGtal/shapes/Shapes.h"
38 
40 
41 using namespace std;
42 using namespace DGtal;
43 using namespace Z3i;
44 
45 
47 // Standard services - public :
48 
49 int main()
50 {
51  Board3DTo2D board;
52 
53  Point p1( 0, 0, 0 );
54  Point p2( 20, 20, 20 );
55  Domain domain(p1, p2);
56 
57  DigitalSet shape_set( domain );
58 
59  Shapes<Domain>::addNorm2Ball( shape_set, Point( 10, 10, 10 ), 7 );
60  board << SetMode3D( shape_set.className(), "Both" );
61  board << shape_set;
62  board << CustomColors3D(Color(250, 200,0, 100),Color(250, 200,0, 20));
63  board << SetMode3D( p1.className(), "Paving" );
64 
65  board << CameraPosition(10.000000, 10.000000, 41.682465)
66  << CameraDirection(0.000000, 0.000000, -1.000000)
67  << CameraUpVector(0.000000, 1.000000, 0.000000);
68 
69  //board << SetMode3D(board.className(), "WireFrameMode");
70  board.saveCairo("dgtalBoard3DTo2D-6.png", Board3DTo2D::CairoPNG, 600, 400);
71 }
72 // //
74 
75 
76 
77