DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
ArithmeticalDSSFactory.h
1
16
17
#pragma once
18
30
31
#if defined(ArithmeticalDSSFactory_RECURSES)
32
#error Recursive header files inclusion detected in ArithmeticalDSSFactory.h
33
#else
// defined(ArithmeticalDSSFactory_RECURSES)
35
#define ArithmeticalDSSFactory_RECURSES
36
37
#if !defined ArithmeticalDSSFactory_h
39
#define ArithmeticalDSSFactory_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/geometry/curves/ArithmeticalDSL.h"
47
48
namespace
DGtal
49
{
50
51
//forward declaration of ArithmeticalDSS
52
template
<
typename
TCoordinate,
53
typename
TInteger,
54
unsigned
short
adjacency>
55
class
ArithmeticalDSS
;
56
58
// template class ArithmeticalDSSFactory
70
template
<
typename
TCoordinate,
71
typename
TInteger = TCoordinate,
72
unsigned
short
adjacency = 8>
73
class
ArithmeticalDSSFactory
74
{
75
76
// ----------------------- Inner types -----------------------------------
77
public
:
78
79
typedef
TCoordinate
Coordinate
;
80
typedef
Coordinate
Position
;
81
typedef
TInteger
Integer
;
82
typedef
DGtal::PointVector<2, Coordinate>
Point
;
83
typedef
Point
Vector
;
84
typedef
std::pair<Vector,Vector>
Steps
;
85
86
typedef
ArithmeticalDSS<TCoordinate,TInteger,adjacency>
DSS
;
87
typedef
ArithmeticalDSL<TCoordinate,TInteger,adjacency>
DSL
;
88
89
// ----------------------- Creation methods ------------------------------
90
91
public
:
92
103
static
DSS
createSubsegment
(
const
DSL
& aDSL,
const
Point
& aF,
const
Point
& aL);
104
117
static
DSS
createSubsegment
(
const
DSS
& aDSS,
const
Point
& aF,
const
Point
& aL);
118
129
static
DSS
createPattern
(
const
Point
& aF,
const
Point
& aL);
130
145
static
DSS
createReversedPattern
(
const
Point
& aF,
const
Point
& aL);
146
162
163
static
DSS
createDSS
(
const
Coordinate
& aA,
const
Coordinate
& aB,
const
Point
& aF,
const
Point
& aL,
const
Point
& aU);
164
165
166
167
// ----------------------- Internals -------------------------------------
168
private
:
169
180
static
DSS
createLeftSubsegment
(
const
DSS
& aDSS,
const
Point
& aL);
181
197
static
Vector
bezoutVector
(
const
Coordinate
& aA,
198
const
Coordinate
& aB,
199
const
Coordinate
& aR);
200
201
202
};
// end of class ArithmeticalDSSFactory
203
204
205
206
}
// namespace DGtal
207
208
210
// Includes inline functions.
211
#include "DGtal/geometry/curves/ArithmeticalDSSFactory.ih"
212
213
// //
215
216
#endif
// !defined ArithmeticalDSSFactory_h
217
218
#undef ArithmeticalDSSFactory_RECURSES
219
#endif
// else defined(ArithmeticalDSSFactory_RECURSES)
DGtal::ArithmeticalDSL
Aim: This class represents a naive (resp. standard) digital straight line (DSL), ie....
Definition
ArithmeticalDSL.h:108
DGtal::ArithmeticalDSSFactory
Aim: Set of static methods that create digital straight segments (DSS) from some input parameters,...
Definition
ArithmeticalDSSFactory.h:74
DGtal::ArithmeticalDSSFactory::createDSS
static DSS createDSS(const Coordinate &aA, const Coordinate &aB, const Point &aF, const Point &aL, const Point &aU)
Method that creates a DSS from a direction vector, a first and last point and one upper leaning point...
DGtal::ArithmeticalDSSFactory::createSubsegment
static DSS createSubsegment(const DSL &aDSL, const Point &aF, const Point &aL)
DGtal::ArithmeticalDSSFactory::createReversedPattern
static DSS createReversedPattern(const Point &aF, const Point &aL)
Method that creates a DSS that is a reversed pattern or a repetition of a reversed pattern from two i...
DGtal::ArithmeticalDSSFactory::createPattern
static DSS createPattern(const Point &aF, const Point &aL)
Method that creates a DSS that is a pattern or a repetition of a pattern from two input digital point...
DGtal::ArithmeticalDSSFactory::DSS
ArithmeticalDSS< TCoordinate, TInteger, adjacency > DSS
Definition
ArithmeticalDSSFactory.h:86
DGtal::ArithmeticalDSSFactory::Vector
Point Vector
Definition
ArithmeticalDSSFactory.h:83
DGtal::ArithmeticalDSSFactory::DSL
ArithmeticalDSL< TCoordinate, TInteger, adjacency > DSL
Definition
ArithmeticalDSSFactory.h:87
DGtal::ArithmeticalDSSFactory::Point
DGtal::PointVector< 2, Coordinate > Point
Definition
ArithmeticalDSSFactory.h:82
DGtal::ArithmeticalDSSFactory::Integer
TInteger Integer
Definition
ArithmeticalDSSFactory.h:81
DGtal::ArithmeticalDSSFactory::Position
Coordinate Position
Definition
ArithmeticalDSSFactory.h:80
DGtal::ArithmeticalDSSFactory::bezoutVector
static Vector bezoutVector(const Coordinate &aA, const Coordinate &aB, const Coordinate &aR)
DGtal::ArithmeticalDSSFactory::createLeftSubsegment
static DSS createLeftSubsegment(const DSS &aDSS, const Point &aL)
DGtal::ArithmeticalDSSFactory::Coordinate
TCoordinate Coordinate
Definition
ArithmeticalDSSFactory.h:79
DGtal::ArithmeticalDSSFactory::Steps
std::pair< Vector, Vector > Steps
Definition
ArithmeticalDSSFactory.h:84
DGtal::ArithmeticalDSSFactory::createSubsegment
static DSS createSubsegment(const DSS &aDSS, const Point &aF, const Point &aL)
DGtal::ArithmeticalDSS
Aim: This class represents a naive (resp. standard) digital straight segment (DSS),...
Definition
ArithmeticalDSS.h:96
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition
PointVector.h:593
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
src
DGtal
geometry
curves
ArithmeticalDSSFactory.h
Generated on
for DGtal by
1.18.0