DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
testViewerQuad.cpp
Go to the documentation of this file.
1
16
29
31
#include <iostream>
32
#include "DGtal/base/Common.h"
33
#include "DGtal/io/viewers/PolyscopeViewer.h"
34
35
#include "DGtal/io/Color.h"
36
#include "DGtal/helpers/StdDefs.h"
37
#include "DGtal/shapes/Shapes.h"
39
40
using namespace
std
;
41
using namespace
DGtal
;
42
using namespace
Z3i
;
43
45
// Functions for testing class PolyscopeViewer.
47
49
// Standard services - public :
50
51
int
main
()
52
{
53
KSpace
k;
54
k.
init
(
Point
(2,2,2),
Point
(4,4,4),
true
);
55
56
PolyscopeViewer<Space,KSpace>
viewer(k);
57
trace
.
beginBlock
(
"Testing class for PolyscopeViewer"
);
58
59
Point
p1( 0, 0, 0 );
60
Point
p2( 0, 1 , 0);
61
Point
p3( 1, 1, 0);
62
Point
p4(1, 0, 0 );
63
Point
p5( 2, 0 , 0);
64
Point
p6( 2, 1, 0);
65
RealVector
n(1,1,1);
66
RealVector
n2(0,1,1);
67
68
// Either is possible
69
viewer.
drawQuad
(p1, p2, p3, p4);
70
viewer.
drawQuad
(p4, p5, p6, p3);
71
72
Cell
surfel = k.
uCell
(
Point
( 2,3,3) );
73
SCell
surfel2 = k.
sCell
(
Point
( 6,3,3),
KSpace::POS
);
74
SCell
surfel3 = k.
sCell
(
Point
( 8,3,3),
KSpace::NEG
);
75
76
viewer << surfel << surfel2 << surfel3;
77
78
trace
.
emphase
() <<
"Passed."
<< endl;
79
trace
.
endBlock
();
80
viewer.
show
();
81
return
0;
82
}
83
// //
DGtal::Display3D::drawQuad
std::string drawQuad(const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealPoint &d, const std::string &uname="Quad_{i}")
DGtal::KhalimskySpaceND::init
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
DGtal::KhalimskySpaceND< 3, Integer >::NEG
static const constexpr Sign NEG
Definition
KhalimskySpaceND.h:433
DGtal::KhalimskySpaceND::sCell
SCell sCell(const SPreCell &c) const
From a signed cell, returns a signed cell lying into this Khalismky space.
DGtal::KhalimskySpaceND::uCell
Cell uCell(const PreCell &c) const
From an unsigned cell, returns an unsigned cell lying into this Khalismky space.
DGtal::KhalimskySpaceND< 3, Integer >::POS
static const constexpr Sign POS
Definition
KhalimskySpaceND.h:432
DGtal::PolyscopeViewer
Definition
PolyscopeViewer.h:57
DGtal::PolyscopeViewer::show
void show() override
Starts the event loop and display of elements.
Definition
PolyscopeViewer.h:73
DGtal::Point
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::Trace::emphase
std::ostream & emphase()
DGtal::Trace::endBlock
double endBlock()
DGtal::Z3i
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal::Z3i::KSpace
KhalimskySpaceND< 3, Integer > KSpace
Definition
StdDefs.h:146
DGtal::Z3i::RealVector
Space::RealVector RealVector
Definition
StdDefs.h:171
DGtal::Z3i::SCell
KSpace::SCell SCell
Definition
StdDefs.h:149
DGtal::Z3i::Cell
KSpace::Cell Cell
Definition
StdDefs.h:148
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::trace
Trace trace
std
STL namespace.
main
int main(int, char **)
Definition
testIntegerComputer.cpp:331
tests
io
viewers
testViewerQuad.cpp
Generated on
for DGtal by
1.18.0