Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#ifndef SCANNER_PROVIDER_H
#define SCANNER_PROVIDER_H
#include <cstdlib>
#include "directionalscanner.h"
using namespace std;
/**
* @class ScannerProvider scannerprovider.h
* \brief Directional scanner provider.
* Provides ad-hoc directional scanners in the relevant octant
* and according to static or dynamical needs.
* \author {P. Even}
*/
class ScannerProvider
{
public:
/**
* @fn ScannerProvider()
* \brief Builds a directional scanner provider.
*/
ScannerProvider () : isOrtho (false) { }
/**
* @fn getScanner(Pt2i p1, Pt2i p2,
* int xmin, int xmax, int ymin, int ymax)
* \brief Returns an incremental directional scanner.
* Returns a directional scanner from two control points.
* The scan strip is composed of parallel scan lines, the first one being
* defined by control points p1 and p2.
* @param p1 Start control point.
* @param p2 End control point.
* @param xmin Left border of the scan area.
* @param xmax Right border of the scan area.
* @param ymin Low border of the scan area.
* @param ymax Up border of the scan area.
*/
DirectionalScanner *getScanner (Pt2i p1, Pt2i p2,
int xmin, int xmax, int ymin, int ymax);
/**
* @fn getScanner(Pt2i p1, Pt2i p2, Pt2i v1, Pt2i v2,
* int xmin, int ymin, nt xmax, int ymax)
* \brief Returns an incremental directional scanner.
* Returns a directional scanner from two points and direction v1 -> v2.
* The scan strip is composed of parallel scan lines, centered on the middle
* of (p1,p2) and aligned on (v1,v2).
* @param p1 start control point
* @param p2 end control point
* @param v1 direction start point
* @param v2 direction end point
* @param xmin left border of the scan area
* @param xmax right border of the scan area
* @param ymin low border of the scan area
* @param ymax up border of the scan area
*/
DirectionalScanner *getScanner (Pt2i p1, Pt2i p2,
Pt2i v1, Pt2i v2,
int xmin, int ymin, int xmax, int ymax);
/**
* @fn getScanner(Pt2i centre, Vr2i normal, int length,
* int xmin, int ymin, nt xmax, int ymax)
* \brief Returns an incremental directional scanner.
* Returns a directional scanner from two points and direction v1 -> v2.
* The scan strip is composed of parallel scan lines, centered on the middle
* of (p1,p2) and aligned on (v1,v2).
* @param centre central point
* @param normal scan strip normal vector
* @param length length of a scan line
* @param xmin left border of the scan area
* @param xmax right border of the scan area
* @param ymin low border of the scan area
* @param ymax up border of the scan area
*/
DirectionalScanner *getScanner (Pt2i centre, Vr2i normal, int length,
int xmin, int ymin, int xmax, int ymax);
/**
* @fn getScanner(Pt2i centre, Vr2i normal, int length, bool controlable,
* int xmin, int ymin, nt xmax, int ymax)
* \brief Returns an incremental directional scanner.
* Returns a directional scanner from two points and direction v1 -> v2.
* The scan strip is composed of parallel scan lines, centered on the middle
* of (p1,p2) and aligned on (v1,v2).
* @param centre central point
* @param normal scan strip normal vector
* @param length half length of a scan line
* @param controlable controlability request (true for a dynamical scanner)
* @param xmin left border of the scan area
* @param xmax right border of the scan area
* @param ymin low border of the scan area
* @param ymax up border of the scan area
*/
DirectionalScanner *getScanner (Pt2i centre, Vr2i normal,
int length, bool controlable,
int xmin, int ymin, int xmax, int ymax);
/**
* @fn setOrtho(bool status)
* \brief Sets the orthogonal scanner modality.
* @param status new status for the orthogonal scanner modality.
*/
inline void setOrtho (bool status) { isOrtho = status; }
private:
/** Orthogonal scanner modality. */
bool isOrtho;
};
#endif