DGtal
1.4.2
Loading...
Searching...
No Matches
dgtalBoard3DTo2D-5-custom.cpp
1
38
#include <iostream>
39
#include "DGtal/io/boards/Board3DTo2D.h"
40
#include "DGtal/io/DrawWithDisplay3DModifier.h"
41
#include "DGtal/base/Common.h"
42
#include "DGtal/helpers/StdDefs.h"
43
#include "DGtal/shapes/Shapes.h"
44
46
47
using namespace
std
;
48
using namespace
DGtal
;
49
using namespace
Z3i;
50
51
53
// Standard services - public :
54
55
int
main
()
56
{
57
Board3DTo2D<Space, KSpace>
board;
58
59
Point
p1( -1, -1, -2 );
60
Point
p2( 2, 2, 3 );
61
Domain
domain
( p1, p2 );
62
63
Point
p3( 1, 1, 1 );
64
Point
p4( 2, -1, 3 );
65
Point
p5( -1, 2, 3 );
66
Point
p6( 0, 0, 0 );
67
Point
p0( 0, 2, 1 );
68
69
board <<
SetMode3D
( p1.className(),
"PavingWired"
);
70
board << p1 << p2 << p3;
71
72
//board << SetMode3D( p1.className(), "Grid" );
73
board <<
CustomColors3D
(
Color
(250, 0,0),
Color
(250, 0,0));
74
board << p4 << p5 ;
75
board <<
SetMode3D
( p1.className(),
"Both"
);
76
board <<
CustomColors3D
(
Color
(250, 200,0, 100),
Color
(250, 0,0, 100));
77
board << p6;
78
board <<
CustomColors3D
(
Color
(250, 200,0, 100),
Color
(250, 200,0, 20));
79
board << p0;
80
81
board <<
SetMode3D
(
domain
.
className
(),
"Paving"
);
82
board <<
domain
;
83
board <<
SetMode3D
(board.
className
(),
"WireFrameMode"
);
84
board.
saveCairo
(
"dgtalBoard3DTo2D-5-custom-wireframe.png"
,
Board3DTo2D<Space, KSpace>::CairoPNG
, 600*2, 400*2);
85
86
board <<
SetMode3D
(board.
className
(),
"SolidMode"
);
87
board.
saveCairo
(
"dgtalBoard3DTo2D-5-custom.png"
,
Board3DTo2D<Space, KSpace>::CairoPNG
, 600*2, 400*2);
88
}
89
// //
91
92
93
94
DGtal::Board3DTo2D
Class for PDF, PNG, PS, EPS, SVG export drawings with Cairo with 3D->2D projection.
Definition
Board3DTo2D.h:71
DGtal::Board3DTo2D::className
std::string className() const
Definition
Board3DTo2D.h:106
DGtal::Board3DTo2D::saveCairo
void saveCairo(const char *filename, CairoType type, int bWidth, int bHeight)
DGtal::Color
Structure representing an RGB triple with alpha component.
Definition
Color.h:68
DGtal::HyperRectDomain< Space >
DGtal::HyperRectDomain::className
std::string className() const
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
std
STL namespace.
DGtal::CustomColors3D
Definition
DrawWithDisplay3DModifier.h:130
DGtal::SetMode3D
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
Definition
DrawWithDisplay3DModifier.h:74
main
int main(int argc, char **argv)
Definition
testArithmeticDSS-benchmark.cpp:147
Point
MyPointD Point
Definition
testClone2.cpp:383
domain
Domain domain
Definition
testProjection.cpp:88
examples
io
boards
dgtalBoard3DTo2D-5-custom.cpp
Generated on Mon Dec 23 2024 11:13:21 for DGtal by
1.12.0