Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

C2DRoute Class Reference

Class representing a set of connected points which do not necassarily join. More...

#include <2DRoute.h>

Inheritance diagram for C2DRoute:

C2DBase List of all members.

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.
C2DPointExtractPoint (int nIndx)
 Extracts a pointer to a C2DPoint. Removes the point from the Route.
C2DPointExtractLast (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 C2DPointGetPoint (int nPointIndex) const
 Returns a reference to the point required.
const C2DRouteoperator= (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.

Detailed Description

Class representing a set of connected points which do not necassarily join.

Class representing a set of connected points i.e. a route.

---------------------------------------------------------------------------


Constructor & Destructor Documentation

C2DRoute::C2DRoute void   ) 
 

Constructor.

--------------------------------------------------------------------------
C2DRoute::C2DRoute

---------------------------------------------------------------------------

C2DRoute::~C2DRoute void   ) 
 

Destructor.

--------------------------------------------------------------------------
C2DRoute::~C2DRoute

---------------------------------------------------------------------------


Member Function Documentation

bool C2DRoute::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.

Adds the points of another to this if they have a common end which is either the first or last point.

void C2DRoute::AddPoint const C2DPoint pt  ) 
 

Adds a point to the end of the route.

--------------------------------------------------------------------------
C2DRoute::AddPoint

---------------------------------------------------------------------------

void C2DRoute::AddPointDirect C2DPoint pt  ) 
 

Adds a point to the end of the route.

--------------------------------------------------------------------------
C2DRoute::AddPointDirect

---------------------------------------------------------------------------

void C2DRoute::Clear void   ) 
 

Clears the route.

--------------------------------------------------------------------------
C2DRoute::Clear

---------------------------------------------------------------------------

bool C2DRoute::Crosses const C2DLine Line,
C2DPointSet IntersectionPts
 

Returns true if it crosses a line given and the list of intersection points.

--------------------------------------------------------------------------
C2DRoute::Crosses

---------------------------------------------------------------------------

double C2DRoute::Distance const C2DPoint TestPoint,
unsigned int &  nClosestLine
const
 

Returns the distance from the Route to the point and the index of the closest line.

--------------------------------------------------------------------------
C2DRoute::Distance

---------------------------------------------------------------------------

double C2DRoute::Distance const C2DPoint TestPoint  )  const [virtual]
 

Returns the distance from the Route to the point.

--------------------------------------------------------------------------
C2DRoute::Distance

---------------------------------------------------------------------------

Implements C2DBase.

void C2DRoute::GetBoundingRect C2DRect Rect  )  const [virtual]
 

Gets the bounding rectangle.

--------------------------------------------------------------------------
C2DRoute::GetBoundingRect

---------------------------------------------------------------------------

Implements C2DBase.

unsigned int C2DRoute::GetLinesCount void   )  const
 

Returns the number of points in the route.

--------------------------------------------------------------------------
C2DRoute::GetLinesCount
Gets the number of lines in the route.

---------------------------------------------------------------------------

const C2DPoint & C2DRoute::GetPoint int  nPointIndex  )  const
 

Returns a reference to the point required.

--------------------------------------------------------------------------
C2DRoute::GetPoint

---------------------------------------------------------------------------

int C2DRoute::GetPointsCount void   )  const [inline]
 

--------------------------------------------------------------------------
C2DRoute::GetPointFrom
Returns the number of points in the route.

---------------------------------------------------------------------------

void C2DRoute::Grow double  dFactor,
const C2DPoint Origin
[virtual]
 

Grows the Route by the factor given from origin provided.

--------------------------------------------------------------------------
C2DRoute::Grow

---------------------------------------------------------------------------

Implements C2DBase.

bool C2DRoute::HasRepeatedPoints void   )  const
 

Check for repeated points.

--------------------------------------------------------------------------
C2DRoute::HasRepeatedPoints

---------------------------------------------------------------------------

void C2DRoute::InsertOptimally C2DPoint pt  ) 
 

Inserts the pointer to the C2DPoint in the line such that the perimiter is minimised.

--------------------------------------------------------------------------
C2DRoute::InsertOptimally

---------------------------------------------------------------------------

void C2DRoute::InsertPointDirect unsigned int  nIndx,
C2DPoint pt
 

Adds a point to the end of the route.

--------------------------------------------------------------------------
C2DRoute::InsertPointDirect

---------------------------------------------------------------------------

bool C2DRoute::IsClosed void   )  const
 

True if the first point is the same as the last.

--------------------------------------------------------------------------
C2DRoute::IsClosed

---------------------------------------------------------------------------

void C2DRoute::Move const C2DVector Vector  )  [virtual]
 

Moves the Route by the vector provided.

--------------------------------------------------------------------------
C2DRoute::Move

---------------------------------------------------------------------------

Implements C2DBase.

const C2DRoute & C2DRoute::operator= const C2DRoute Other  ) 
 

Assignment to another.

--------------------------------------------------------------------------
C2DRoute::operator=

---------------------------------------------------------------------------

void C2DRoute::Project const C2DVector Vector,
CInterval Interval
const [virtual]
 

Projects this onto the vector given.

--------------------------------------------------------------------------
C2DRoute::Project

---------------------------------------------------------------------------

Implements C2DBase.

void C2DRoute::Project const C2DLine Line,
CInterval Interval
const [virtual]
 

Projects this onto the line given.

--------------------------------------------------------------------------
C2DRoute::Project

---------------------------------------------------------------------------

Implements C2DBase.

void C2DRoute::PurgeRepeatedAdjacentPoints void   ) 
 

Function to remove any point repetitions. Only checks adjacent points.

--------------------------------------------------------------------------
C2DRoute::PurgeRepeatedAdjacentPoints

---------------------------------------------------------------------------

void C2DRoute::Reflect const C2DLine Line  )  [virtual]
 

Reflects the in the line given.

--------------------------------------------------------------------------
C2DRoute::Reflect

---------------------------------------------------------------------------

Implements C2DBase.

void C2DRoute::Reflect const C2DPoint Point  )  [virtual]
 

Reflects the Route throught the point provided.

--------------------------------------------------------------------------
C2DRoute::Reflect

---------------------------------------------------------------------------

Implements C2DBase.

void C2DRoute::RemoveLast void   ) 
 

Removes the last point.

--------------------------------------------------------------------------
C2DRoute::RemoveLast

---------------------------------------------------------------------------

void C2DRoute::RotateToRight double  dAng,
const C2DPoint Origin
[virtual]
 

Rotates the Route by the amount given.

--------------------------------------------------------------------------
C2DRoute::RotateToRight

---------------------------------------------------------------------------

Implements C2DBase.

void C2DRoute::SnapToGrid void   )  [virtual]
 

Snaps this to the conceptual grid.

--------------------------------------------------------------------------
C2DRoute::SnapToGrid

---------------------------------------------------------------------------

Implements C2DBase.


The documentation for this class was generated from the following files:
Generated on Mon Apr 21 11:43:52 2008 for GeoLib by  doxygen 1.4.4