DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dgtalBoard3DTo2D-4-modes.cpp
1 
29 
30 #include <iostream>
31 #include "DGtal/io/boards/Board3DTo2D.h"
32 #include "DGtal/base/Common.h"
33 #include "DGtal/helpers/StdDefs.h"
34 #include "DGtal/shapes/Shapes.h"
35 
37 
38 using namespace std;
39 using namespace DGtal;
40 using namespace Z3i;
41 
42 
44 // Standard services - public :
45 
46 int main()
47 {
48  Board3DTo2D board;
49 
50  Point p1( -1, -1, -2 );
51  Point p2( 2, 2, 3 );
52  Domain domain( p1, p2 );
53 
54  Point p3( 1, 1, 1 );
55  Point p4( 2, -1, 3 );
56  Point p5( -1, 2, 3 );
57  Point p6( 0, 0, 0 );
58  Point p0( 0, 2, 1 );
59 
60  //board << SetMode3D( p1.className(), "Grid" );
61 
62  board << p1 << p2 << p3 << p4 << p5 << p6 << p0;
63 
64  //board << SetMode3D(domain.className(), "PavingGrids");
65  board << domain;
66 
67  board << CameraPosition(0.500000, 0.500000, 11.274194)
68  << CameraDirection(0.000000, 0.000000, -1.000000)
69  << CameraUpVector(0.000000, 1.000000, 0.000000);
70 
71  //board << SetMode3D(board.className(), "WireFrameMode");
72  board.saveCairo("dgtalBoard3DTo2D-4-modes.png", Board3DTo2D::CairoPNG, 600, 400);
73 }
74 // //
76 
77 
78 
79