DGtal  1.5.beta
dgtalBoard3DTo2D-2-sets.cpp
1 
40 #include <iostream>
41 #include "DGtal/io/boards/Board3DTo2D.h"
42 #include "DGtal/base/Common.h"
43 #include "DGtal/helpers/StdDefs.h"
44 #include "DGtal/shapes/Shapes.h"
45 
46 
48 
49 using namespace std;
50 using namespace DGtal;
51 using namespace Z3i;
52 
53 
55 // Standard services - public :
56 
57 int main()
58 {
60 
61  Point p1( 0, 0, 0 );
62  Point p2( 10, 10 , 10 );
63  Domain domain( p1, p2 );
64 
65  board << domain;
66 
67  DigitalSet shape_set( domain );
68  Shapes<Domain>::addNorm1Ball( shape_set, Point( 5, 5, 5 ), 2 );
69  Shapes<Domain>::addNorm2Ball( shape_set, Point( 3, 3, 3 ), 2 );
70 
71  shape_set.erase(Point(3,3,3));
72  shape_set.erase(Point(6,6,6));
73  board << shape_set;
74 
75  board << CameraPosition(5.000000, 5.000000, 29.893368)
76  << CameraDirection(0.000000, 0.000000, -1.000000)
77  << CameraUpVector(0.000000, 1.000000, 0.000000);
78 
79  //board << SetMode3D(board.className(), "WireFrameMode");
80  board.saveCairo("dgtalBoard3DTo2D-2-sets.png", Board3DTo2D<Space, KSpace>::CairoPNG, 600, 400);
81 }
82 // //
84 
85 
86 
87 
Class for PDF, PNG, PS, EPS, SVG export drawings with Cairo with 3D->2D projection.
Definition: Board3DTo2D.h:71
void saveCairo(const char *filename, CairoType type, int bWidth, int bHeight)
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: A utility class for constructing different shapes (balls, diamonds, and others).
DGtal is the top-level namespace which contains all DGtal functions and types.
CameraDirection class to set camera direction.
CameraPosition class to set camera position.
CameraUpVector class to set camera up-vector.
int main(int argc, char **argv)
MyPointD Point
Definition: testClone2.cpp:383
Domain domain