Defines a line segment on a plane.
More...
#include <geometry_utils.h>
Defines a line segment on a plane.
Definition at line 97 of file geometry_utils.h.
DiscreteLine2D::DiscreteLine2D |
( |
const Point & |
start, |
|
|
const Point & |
end |
|
) |
| |
|
inline |
Initializes a segment with end points.
- Parameters
-
start | Beginning of a segment. |
end | Ending of a segment. |
Definition at line 106 of file geometry_utils.h.
void DiscreteLine2D::generatePointsWithBresenham |
( |
int |
x1, |
|
|
int |
y1, |
|
|
int |
x2, |
|
|
int |
y2 |
|
) |
| |
|
inlineprivate |
Creates a line segment on a grid with a Bresenham algorithm; if the World consists of cells, it is required to transform coordinates of segment in a view that is useful for this representation of the world; the result can be obtained by points() method.
- Parameters
-
x1,y1 | Coordinates of the beginning of a line segment. |
x2,y2 | Coordinates of the ending of a line segment. |
Definition at line 121 of file geometry_utils.h.
const std::vector<Point>& DiscreteLine2D::points |
( |
| ) |
const |
|
inline |
std::vector<Point> DiscreteLine2D::_points |
|
private |
The documentation for this class was generated from the following file: