DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
examples
io
viewers
viewer3D-5-custom.cpp
1
30
31
#include <iostream>
32
#include <QtGui/qapplication.h>
33
#include "DGtal/io/viewers/Viewer3D.h"
34
#include "DGtal/io/Color.h"
35
#include "DGtal/io/DrawWithDisplay3DModifier.h"
36
#include "DGtal/base/Common.h"
37
#include "DGtal/helpers/StdDefs.h"
38
#include "DGtal/shapes/Shapes.h"
39
41
42
using namespace
std;
43
using namespace
DGtal;
44
using namespace
Z3i;
45
46
48
// Standard services - public :
49
50
int
main(
int
argc,
char
** argv )
51
{
52
53
QApplication application(argc,argv);
54
Viewer3D
viewer;
55
viewer.show();
56
57
58
Point
p1( -1, -1, -2 );
59
Point
p2( 2, 2, 3 );
60
Domain
domain( p1, p2 );
61
Point
p3( 1, 1, 1 );
62
Point
p4( 2, -1, 3 );
63
Point
p5( -1, 2, 3 );
64
Point
p6( 0, 0, 0 );
65
Point
p0( 0, 2, 1 );
66
viewer <<
SetMode3D
( p1.className(),
"PavingWired"
);
67
viewer << p1 << p2 << p3;
68
69
70
//viewer << SetMode3D( p1.className(), "Grid" );
71
viewer <<
CustomColors3D
(
Color
(250, 0,0),
Color
(250, 0,0));
72
viewer << p4 << p5 ;
73
viewer <<
SetMode3D
( p1.className(),
"Both"
);
74
viewer <<
CustomColors3D
(
Color
(250, 200,0, 100),
Color
(250, 0,0, 100));
75
viewer << p6;
76
viewer <<
CustomColors3D
(
Color
(250, 200,0, 100),
Color
(250, 200,0, 20));
77
viewer << p0;
78
79
80
viewer <<
SetMode3D
(domain.className(),
"Paving"
);
81
viewer << domain << Display3D::updateDisplay;
82
83
84
return
application.exec();
85
}
86
// //
88
89
90
91
Generated on Wed Dec 19 2012 19:10:43 for DGtal by
1.8.1.1