Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
beams.h
1
2
/***************************************************************************
3
* beams.h - Scanline model implementation: beams
4
*
5
* Created: Tue Apr 17 20:59:58 2007
6
* Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#ifndef __FIREVISION_SCANLINE_BEAMS_H_
25
#define __FIREVISION_SCANLINE_BEAMS_H_
26
27
#include <fvmodels/scanlines/scanlinemodel.h>
28
#include <fvutils/base/types.h>
29
30
#include <vector>
31
32
namespace
firevision {
33
#if 0
/* just to make Emacs auto-indent happy */
34
}
35
#endif
36
37
class
ScanlineBeams
:
public
ScanlineModel
38
{
39
40
public
:
41
42
ScanlineBeams
(
unsigned
int
image_width,
unsigned
int
image_height,
43
unsigned
int
start_x,
unsigned
int
start_y,
44
unsigned
int
stop_y,
unsigned
int
offset_y,
45
bool
distribute_start_x,
46
float
angle_from,
float
angle_range,
unsigned
int
num_beams);
47
48
fawkes::point_t
operator*();
49
fawkes::point_t
* operator->();
50
fawkes::point_t
* operator++();
51
fawkes::point_t
* operator++(
int
);
52
53
bool
finished();
54
void
reset();
55
const
char
* get_name();
56
unsigned
int
get_margin();
57
58
virtual
void
set_robot_pose
(
float
x,
float
y,
float
ori) {}
59
virtual
void
set_pan_tilt
(
float
pan,
float
tilt) {}
60
61
private
:
62
void
advance();
63
64
65
bool
_finished;
66
67
std::vector<fawkes::point_t> beam_current_pos;
68
std::vector<fawkes::point_t> beam_end_pos;
69
70
unsigned
int
start_x;
71
unsigned
int
start_y;
72
float
angle_from;
73
float
angle_range;
74
unsigned
int
num_beams;
75
unsigned
int
stop_y;
76
unsigned
int
offset_y;
77
unsigned
int
image_width;
78
unsigned
int
image_height;
79
bool
distribute_start_x;
80
81
fawkes::point_t
coord;
82
fawkes::point_t
tmp_coord;
83
84
unsigned
int
next_beam;
85
unsigned
int
first_beam;
86
unsigned
int
last_beam;
87
};
88
89
}
// end namespace firevision
90
91
#endif
src
libs
fvmodels
scanlines
beams.h
Generated by
1.8.3.1