#include <geom.h>

Public Member Functions | |
| RegionLine () | |
| RegionLine (vector< Point * > list) | |
| RegionLine (Point *p, Point *q) | |
| RegionLine (string filename) | |
| ~RegionLine () | |
| double | length () |
| vector< Point * > | discrete (double resolution) |
| bool | contains (Point *p) |
| void | add (Point *p) |
Private Attributes | |
| vector< Point * > | list |
| List of all points contained in this linear region. | |
Friends | |
| ofstream & | operator<< (ofstream &output, const RegionLine &r) |
| Output region in "lat\tlon\n..." format. | |
| RegionLine::RegionLine | ( | ) |
| RegionLine::RegionLine | ( | vector< Point * > | list | ) |
Create new linear region that will contain the given list of points.
| list | List of points to include in the new linear region |
Create new linear region that contains only the two given points. Additional points can still be added later if needed.
| p | Starting point for new line | |
| q | Ending point for new line |
| RegionLine::RegionLine | ( | string | filename | ) |
Create a new linear region by reading a list of points from a file. Usually used for reading in description of a roadway. Expecting file format to be "lat\tlon\n...-1\t-1\n".
| filename | Filename to open and read list of points from |
| RegionLine::~RegionLine | ( | ) |
| double RegionLine::length | ( | ) |
Calcuate the total length of this linear region
| vector<Point*> RegionLine::discrete | ( | double | resolution | ) | [virtual] |
Turn the defined linear region into a discrete set of points, using resolution to describe the level of detail. Effectively steps along the line defined in resolution-length steps.
| resolution | Level of spacing (detail) between the discrete points to be created. Value in kilometers. |
Implements Region.
| bool RegionLine::contains | ( | Point * | p | ) | [virtual] |
| void RegionLine::add | ( | Point * | p | ) | [virtual] |
| ofstream& operator<< | ( | ofstream & | output, | |
| const RegionLine & | r | |||
| ) | [friend] |
Output region in "lat\tlon\n..." format.
vector<Point*> RegionLine::list [private] |
List of all points contained in this linear region.
1.5.4