DGtal
2.1.0
Loading...
Searching...
No Matches
viewer3D-5-colors.cpp
Go to the documentation of this file.
1
41
#include <iostream>
42
43
#include "DGtal/base/Common.h"
44
#include "DGtal/helpers/StdDefs.h"
45
#include "DGtal/io/Color.h"
46
#include "DGtal/shapes/Shapes.h"
47
#include "DGtal/io/viewers/PolyscopeViewer.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
()
60
{
61
PolyscopeViewer
viewer;
62
63
Point
p1( -1, -1, -2 );
64
Point
p2( 2, 2, 3 );
65
Domain
domain
( p1, p2 );
66
Point
p3( 1, 1, 1 );
67
Point
p4( 2, -1, 3 );
68
Point
p5( -1, 2, 3 );
69
Point
p6( 0, 0, 0 );
70
Point
p0( 0, 2, 1 );
71
72
// By default, objects are rendered with different colors
73
viewer << p1 << p2 << p3;
74
75
// Drawing color can be changed by inserting it in the stream
76
viewer <<
Color
(255, 0, 0) << p4 << p5 ;
77
viewer <<
Color
(250, 200,0);
78
viewer << p6;
79
viewer <<
Color
(250, 200,0, 20);
80
viewer << p0;
81
82
viewer.
setDefaultColors
();
83
viewer <<
domain
;
84
85
viewer.
show
();
86
return
0;
87
}
88
// //
DGtal::Color
Structure representing an RGB triple with alpha component.
Definition
Color.h:77
DGtal::Display3D::setDefaultColors
void setDefaultColors()
DGtal::HyperRectDomain< Space >
DGtal::PointVector< dim, Integer >
DGtal::PolyscopeViewer
Definition
PolyscopeViewer.h:52
DGtal::PolyscopeViewer::show
void show() override
Starts the event loop and display of elements.
Definition
PolyscopeViewer.h:68
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
std
STL namespace.
domain
Domain domain
Definition
testProjection.cpp:88
main
int main()
Definition
viewer3D-5-colors.cpp:59
examples
io
viewers
viewer3D-5-colors.cpp
Generated on Tue Aug 26 2025 14:27:42 for DGtal by
1.9.8