DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dgtalBoard3DTo2D-1-points.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 
36 
37 using namespace std;
38 using namespace DGtal;
39 using namespace Z3i;
40 
41 
43 // Standard services - public :
44 
45 int main()
46 {
47 
48  Point p1( 0, 0, 0 );
49  Point p2( 5, 5 ,5 );
50  Point p3( 2, 3, 4 );
51  Domain domain( p1, p2 );
52 
53  Board3DTo2D board;
54 
55  board << domain;
56  board << p1 << p2 << p3;
57 
58  board << CameraPosition(2.500000, 2.500000, 16.078199)
59  << CameraDirection(0.000000, 0.000000, -1.000000)
60  << CameraUpVector(0.000000, 1.000000, 0.000000);
61 
62  //board << CameraZNearFar(4.578200, 22.578199);
63 
64  board << SetMode3D(board.className(), "WireFrameMode");
65  board.saveCairo("dgtalBoard3DTo2D-1-points.png", Board3DTo2D::CairoPNG, 600*2, 400*2);
66 
67 }
68 // //
70 
71 
72 
73