DGtal 1.4.0
Loading...
Searching...
No Matches
dgtalBoard3DTo2D-6.cpp
1
39#include <iostream>
40#include "DGtal/io/boards/Board3DTo2D.h"
41#include "DGtal/io/DrawWithDisplay3DModifier.h"
42#include "DGtal/io/Color.h"
43
44#include "DGtal/base/Common.h"
45#include "DGtal/helpers/StdDefs.h"
46#include "DGtal/shapes/Shapes.h"
47
49
50using namespace std;
51using namespace DGtal;
52using namespace Z3i;
53
54
56// Standard services - public :
57
58int main()
59{
61
62 Point p1( 0, 0, 0 );
63 Point p2( 20, 20, 20 );
64 Domain domain(p1, p2);
65
66 DigitalSet shape_set( domain );
67
68 Shapes<Domain>::addNorm2Ball( shape_set, Point( 10, 10, 10 ), 7 );
69 board << SetMode3D( shape_set.className(), "Both" );
70 board << shape_set;
71 board << CustomColors3D(Color(250, 200,0, 100),Color(250, 200,0, 20));
72 board << SetMode3D( p1.className(), "Paving" );
73
74 board << CameraPosition(10.000000, 10.000000, 41.682465)
75 << CameraDirection(0.000000, 0.000000, -1.000000)
76 << CameraUpVector(0.000000, 1.000000, 0.000000);
77
78 //board << SetMode3D(board.className(), "WireFrameMode");
79 board.saveCairo("dgtalBoard3DTo2D-6.png", Board3DTo2D<Space, KSpace>::CairoPNG, 600, 400);
80}
81// //
83
84
85
86
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)
Structure representing an RGB triple with alpha component.
Definition Color.h:68
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
Space::Point Point
Definition StdDefs.h:168
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
CameraDirection class to set camera direction.
CameraPosition class to set camera position.
CameraUpVector class to set camera up-vector.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
int main(int argc, char **argv)
Domain domain