Public Member Functions | Private Member Functions | Private Attributes
DiscreteLine2D Class Reference

Defines a line segment on a plane. More...

#include <geometry_utils.h>

List of all members.

Public Member Functions

 DiscreteLine2D (const Point &start, const Point &end)
const std::vector< Point > & points () const
 Returns the line's component points.

Private Member Functions

void generatePointsWithBresenham (int x1, int y1, int x2, int y2)

Private Attributes

std::vector< Point_points

Detailed Description

Defines a line segment on a plane.

Definition at line 97 of file geometry_utils.h.


Constructor & Destructor Documentation

DiscreteLine2D::DiscreteLine2D ( const Point start,
const Point end 
) [inline]

Initializes a segment with end points.

Parameters:
startBeginning of a segment.
endEnding of a segment.

Definition at line 106 of file geometry_utils.h.


Member Function Documentation

void DiscreteLine2D::generatePointsWithBresenham ( int  x1,
int  y1,
int  x2,
int  y2 
) [inline, private]

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,y1Coordinates of the beginning of a line segment.
x2,y2Coordinates of the ending of a line segment.

Definition at line 121 of file geometry_utils.h.

const std::vector<Point>& DiscreteLine2D::points ( ) const [inline]

Returns the line's component points.

Definition at line 110 of file geometry_utils.h.


Member Data Documentation

std::vector<Point> DiscreteLine2D::_points [private]

Definition at line 169 of file geometry_utils.h.


The documentation for this class was generated from the following file:


tiny_slam
Author(s):
autogenerated on Thu Jun 6 2019 17:44:58