DGtal
1.5.beta
dgtalBoard3DTo2D-0-demo-kernel-2.cpp
1
30
#include <iostream>
31
#include "DGtal/io/boards/Board3DTo2D.h"
32
#include "DGtal/io/DrawWithDisplay3DModifier.h"
33
#include "DGtal/base/Common.h"
34
#include "DGtal/kernel/SpaceND.h"
35
#include "DGtal/helpers/StdDefs.h"
36
#include "DGtal/kernel/domains/HyperRectDomain.h"
37
39
40
using namespace
std;
41
using namespace
DGtal
;
42
44
45
int
main
()
46
{
47
typedef
DGtal::SpaceND<3, DGtal::int32_t>
MySpace;
48
typedef
MySpace::Point
MyPoint;
49
typedef
HyperRectDomain<MySpace>
MyDomain;
50
51
MyPoint p1( 0, 0, 0 );
52
MyPoint p2( 5, 5 ,5 );
53
MyPoint p3( 2, 3, 4 );
54
MyDomain
domain
( p1, p2 );
55
56
Board3DTo2D<>
board;
57
58
board <<
domain
;
59
board << p1 << p2 << p3;
60
61
board <<
CameraPosition
(2.500000, 2.500000, 16.078199)
62
<<
CameraDirection
(0.000000, 0.000000, -1.000000)
63
<<
CameraUpVector
(0.000000, 1.000000, 0.000000);
64
65
board <<
SetMode3D
(board.
className
(),
"WireFrameMode"
);
66
board.
saveCairo
(
"dgtalBoard3DTo2D-0-demo-kernel-2.png"
,
Board3DTo2D<>::CairoPNG
, 600, 400);
67
}
68
// //
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::HyperRectDomain
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Definition:
HyperRectDomain.h:100
DGtal::SpaceND
Definition:
SpaceND.h:96
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::CameraDirection
CameraDirection class to set camera direction.
Definition:
DrawWithBoard3DTo2DModifier.h:91
DGtal::CameraPosition
CameraPosition class to set camera position.
Definition:
DrawWithBoard3DTo2DModifier.h:71
DGtal::CameraUpVector
CameraUpVector class to set camera up-vector.
Definition:
DrawWithBoard3DTo2DModifier.h:111
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-0-demo-kernel-2.cpp
Generated on Fri Dec 20 2024 12:44:17 for DGtal by
1.9.1