DGtal
1.4.0
Loading...
Searching...
No Matches
dgtalBoard3D-1-points.cpp
Go to the documentation of this file.
1
38
#include <iostream>
39
#include "DGtal/base/Common.h"
40
#include "DGtal/io/boards/Board3D.h"
41
#include "DGtal/helpers/StdDefs.h"
43
44
using namespace
std
;
45
using namespace
DGtal
;
46
using namespace
DGtal::Z3i
;
47
49
50
int
main
()
51
{
52
trace
.
beginBlock
(
"Example dgtalBoard3D-1-points"
);
53
54
55
Point
p1( -3, -2, 0 );
56
Point
p2( 7, 3 , 6);
57
Point
p3( -1, -1, -1);
58
Point
p4(-1, -1, 0 );
59
Point
p5( 5, 2 , 4);
60
Point
p6(-3, -6, 0 );
61
Point
p7( 5, 2 , 3);
62
63
Domain
domain
(p4, p5);
64
DigitalSet
shape_set(
domain
);
65
shape_set.
insertNew
(p6);
66
shape_set.
insertNew
(p7);
67
69
Board3D<>
board;
70
board <<
SetMode3D
(
domain
.
className
(),
"Paving"
);
71
board << p1 << p2 << p3;
72
board << shape_set;
73
board.
saveOBJ
(
"dgtalBoard3D-1-points.obj"
);
75
76
trace
.
info
()<<
" Second"
<<std::endl;
77
Board3D<>
board2;
78
board2 <<
SetMode3D
(
domain
.
className
(),
"Paving"
);
79
board2 <<
CustomColors3D
(
Color
(250, 0,0),
Color
(250, 0,0));
80
board2 << p1 ;
81
board2 <<
CustomColors3D
(
Color
(0, 255,0),
Color
(0, 0,255));
82
board2 << p2 << p3;
83
board2 <<
CustomColors3D
(
Color
(250, 0,0),
Color
(250, 0,0));
84
board2 << p6;
85
board2.
saveOBJ
(
"dgtalBoard3D-1bis-points.obj"
);
86
87
88
89
trace
.
endBlock
();
90
return
0;
91
}
92
// //
DGtal::Board3D
The class Board3D is a type of Display3D which export the figures in the format OBJ/MTL when calling ...
Definition
Board3D.h:82
DGtal::Board3D::saveOBJ
void saveOBJ(const std::string &filename, const bool isNormalized=false)
DGtal::Color
Structure representing an RGB triple with alpha component.
Definition
Color.h:68
DGtal::DigitalSetByAssociativeContainer
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Definition
DigitalSetByAssociativeContainer.h:90
DGtal::DigitalSetByAssociativeContainer::insertNew
void insertNew(const Point &p)
DGtal::HyperRectDomain< Space >
DGtal::HyperRectDomain::className
std::string className() const
DGtal::PointVector< dim, Integer >
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::Trace::info
std::ostream & info()
DGtal::Trace::endBlock
double endBlock()
main
int main()
Definition
dgtalBoard3D-1-points.cpp:50
DGtal::Z3i
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::trace
Trace trace
Definition
Common.h:153
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
domain
Domain domain
Definition
testProjection.cpp:88
examples
io
boards
dgtalBoard3D-1-points.cpp
Generated on Mon Jun 10 2024 17:35:48 for DGtal by
1.11.0