#include <2DRoute.h>
Inheritance diagram for C2DRoute:

Public Member Functions | |
| C2DRoute (void) | |
| Constructor. | |
| ~C2DRoute (void) | |
| Destructor. | |
| void | AddPoint (const C2DPoint &pt) |
| Adds a point to the end of the route. | |
| void | AddPointDirect (C2DPoint *pt) |
| Adds a point to the end of the route. | |
| void | InsertPointDirect (unsigned int nIndx, C2DPoint *pt) |
| Adds a point to the end of the route. | |
| C2DPoint * | ExtractPoint (int nIndx) |
| Extracts a pointer to a C2DPoint. Removes the point from the Route. | |
| C2DPoint * | ExtractLast (void) |
| Extracts the last point frm the Route. | |
| int | GetPointsCount (void) const |
| unsigned int | GetLinesCount (void) const |
| Returns the number of points in the route. | |
| void | RemoveLast (void) |
| Removes the last point. | |
| void | Clear (void) |
| Clears the route. | |
| const C2DPoint & | GetPoint (int nPointIndex) const |
| Returns a reference to the point required. | |
| const C2DRoute & | operator= (const C2DRoute &Other) |
| Assignment to another. | |
| bool | Crosses (const C2DLine &Line, C2DPointSet *IntersectionPts) |
| Returns true if it crosses a line given and the list of intersection points. | |
| bool | AddIfCommonEnd (C2DRoute &Other) |
| Adds the points of another to this if they have a common end which is either the first or last point. Returns true is the was a match. | |
| bool | HasRepeatedPoints (void) const |
| Check for repeated points. | |
| void | PurgeRepeatedAdjacentPoints (void) |
| Function to remove any point repetitions. Only checks adjacent points. | |
| void | Move (const C2DVector &Vector) |
| Moves the Route by the vector provided. | |
| void | RotateToRight (double dAng, const C2DPoint &Origin) |
| Rotates the Route by the amount given. | |
| void | Grow (double dFactor, const C2DPoint &Origin) |
| Grows the Route by the factor given from origin provided. | |
| void | Reflect (const C2DPoint &Point) |
| Reflects the Route throught the point provided. | |
| void | Reflect (const C2DLine &Line) |
| Reflects the in the line given. | |
| double | Distance (const C2DPoint &TestPoint) const |
| Returns the distance from the Route to the point. | |
| double | Distance (const C2DPoint &TestPoint, unsigned int &nClosestLine) const |
| Returns the distance from the Route to the point and the index of the closest line. | |
| void | InsertOptimally (C2DPoint *pt) |
| Inserts the pointer to the C2DPoint in the line such that the perimiter is minimised. | |
| void | GetBoundingRect (C2DRect &Rect) const |
| Gets the bounding rectangle. | |
| bool | IsClosed (void) const |
| True if the first point is the same as the last. | |
| void | Project (const C2DLine &Line, CInterval &Interval) const |
| Projects this onto the line given. | |
| void | Project (const C2DVector &Vector, CInterval &Interval) const |
| Projects this onto the vector given. | |
| void | SnapToGrid (void) |
| Snaps this to the conceptual grid. | |
Class representing a set of connected points i.e. a route.
---------------------------------------------------------------------------
|
|
Constructor.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Destructor.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Adds the points of another to this if they have a common end which is either the first or last point. Returns true is the was a match. Adds the points of another to this if they have a common end which is either the first or last point. |
|
|
Adds a point to the end of the route.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Adds a point to the end of the route.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Clears the route.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
||||||||||||
|
Returns true if it crosses a line given and the list of intersection points.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
||||||||||||
|
Returns the distance from the Route to the point and the index of the closest line.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Returns the distance from the Route to the point.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
|
Gets the bounding rectangle.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
|
Returns the number of points in the route.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Returns a reference to the point required.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
||||||||||||
|
Grows the Route by the factor given from origin provided.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
|
Check for repeated points.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Inserts the pointer to the C2DPoint in the line such that the perimiter is minimised.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
||||||||||||
|
Adds a point to the end of the route.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
True if the first point is the same as the last.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Moves the Route by the vector provided.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
|
Assignment to another.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
||||||||||||
|
Projects this onto the vector given.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
||||||||||||
|
Projects this onto the line given.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
|
Function to remove any point repetitions. Only checks adjacent points.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
|
Reflects the in the line given.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
|
Reflects the Route throught the point provided.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
|
Removes the last point.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
||||||||||||
|
Rotates the Route by the amount given.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
|
Snaps this to the conceptual grid.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
1.4.4