DGtal
1.5.beta
viewer3D-5-custom.cpp
1
40
#include <iostream>
41
42
#include "DGtal/base/Common.h"
43
#include "DGtal/helpers/StdDefs.h"
44
#include "DGtal/io/Color.h"
45
#include "DGtal/io/DrawWithDisplay3DModifier.h"
46
#include "DGtal/shapes/Shapes.h"
47
#include "DGtal/io/viewers/Viewer3D.h"
48
50
51
using namespace
std;
52
using namespace
DGtal
;
53
using namespace
Z3i;
54
55
57
// Standard services - public :
58
59
int
main
(
int
argc,
char
** argv )
60
{
61
62
QApplication application(argc,argv);
63
64
typedef
Viewer3D<>
MyViewer
;
65
MyViewer
viewer;
66
viewer.
show
();
67
68
69
Point
p1( -1, -1, -2 );
70
Point
p2( 2, 2, 3 );
71
Domain
domain
( p1, p2 );
72
Point
p3( 1, 1, 1 );
73
Point
p4( 2, -1, 3 );
74
Point
p5( -1, 2, 3 );
75
Point
p6( 0, 0, 0 );
76
Point
p0( 0, 2, 1 );
77
viewer <<
SetMode3D
( p1.className(),
"PavingWired"
);
78
viewer << p1 << p2 << p3;
79
80
81
//viewer << SetMode3D( p1.className(), "Grid" );
82
viewer <<
CustomColors3D
(
Color
(250, 0,0),
Color
(250, 0,0));
83
viewer << p4 << p5 ;
84
viewer <<
SetMode3D
( p1.className(),
"Both"
);
85
viewer <<
CustomColors3D
(
Color
(250, 200,0, 100),
Color
(250, 0,0, 100));
86
viewer << p6;
87
viewer <<
CustomColors3D
(
Color
(250, 200,0, 100),
Color
(250, 200,0, 20));
88
viewer << p0;
89
90
91
viewer <<
SetMode3D
(
domain
.
className
(),
"Paving"
);
92
viewer <<
domain
<< MyViewer::updateDisplay;
93
94
95
return
application.exec();
96
}
97
// //
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::PointVector< dim, Integer >
DGtal::Viewer3D
Definition:
Viewer3D.h:132
DGtal::Viewer3D::show
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
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
domain
Domain domain
Definition:
testProjection.cpp:88
examples
io
viewers
viewer3D-5-custom.cpp
Generated on Sat Nov 9 2024 12:44:56 for DGtal by
1.9.1