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

C2DPointSet Class Reference

Class which represents a set of points. More...

#include <2DPointSet.h>

Inheritance diagram for C2DPointSet:

C2DBaseSet C2DBase List of all members.

Public Member Functions

 C2DPointSet (void)
 Constructor.
 ~C2DPointSet (void)
 Destructor.
void AddCopy (double x, double y)
 Adds a new point.
void AddCopy (const C2DPointSet &Other)
 Adds a new copy of the pt set given point.
void MakeCopy (const C2DPointSet &Other)
 Makes a copy of the set given.
void operator<< (C2DBaseSet &Other)
 Passes ONLY the pointers of this type from the Other into this.
void Add (C2DPoint *NewItem)
 Adds a new pointer and takes responsibility for it.
void AddCopy (const C2DPoint &NewItem)
 Adds a copy of the item given.
void DeleteAndSet (int nIndx, C2DPoint *NewItem)
 Deletes the current item and sets the pointer to be the new one.
C2DPoint * ExtractAndSet (int nIndx, C2DPoint *NewItem)
 Extracts the current item and sets the pointer to be the new one.
C2DPoint * GetAt (int nIndx)
 Returns the value at the point given.
const C2DPoint * GetAt (int nIndx) const
 Returns the value at the point given.
C2DPoint & operator[] (int nIndx)
 Returns a reference to the value at the point given.
const C2DPoint & operator[] (int nIndx) const
 Returns a reference to the value at the point given.
C2DPoint * GetLast (void)
 Returns a pointer to the last item.
C2DPoint * ExtractAt (unsigned int nIndx)
 Extracts the pointer passing deletion responsibility over.
C2DPoint * ExtractLast (void)
 Extracts the pointer passing deletion responsibility over.
void InsertAt (unsigned int nIndex, C2DPoint *NewItem)
 Insertion.
void InsertAt (unsigned int nIndex, C2DPointSet &Other)
 Insertion of another array.
void operator<< (C2DPointSet &Other)
 Passes all the pointers from the Other into this.
void operator<< (C2DPoint *NewItem)
 Adds a new pointer and takes responsibility for it.
void ExtractConvexHull (C2DPointSet &Other)
 Removes the convex hull from the point set given.
void SortByAngleFromNorth (const C2DPoint &Origin)
 Sorts by the angle from north relative to the origin given.
void SortByAngleToRight (const C2DLine &Line)
 Sorts by the angle to the right of the line.
void SortByAngleToLeft (const C2DLine &Line)
 Sorts by the angle to the left of the line.
void GetBoundingRect (C2DRect &Rect) const
 Returns the bounding rect.
void GetBoundingCircle (C2DCircle &Circle) const
 Gets the minimum bounding circle.
void GetExtremePointsEst (unsigned int &nIndx1, unsigned int &nIndx2, double &dDist, unsigned int nStartEst=0) const
 Returns an estimate of the furthest points, usually correct.
void GetExtremePoints (unsigned int &nIndx1, unsigned int &nIndx2, double &dDist) const
 Returns the furthest points, accurate but slightly slower than the estimate.
void RemoveRepeatedPoints (void)
 Removes all repeated points.

Detailed Description

Class which represents a set of points.

Class which represents a set of points. Inherits from the Geo set base and adds sorting functions and a convex hull algorithm.

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


Constructor & Destructor Documentation

C2DPointSet::C2DPointSet (  void   ) 
 

Constructor.

--------------------------------------------------------------------------
C2DPointSet::C2DPointSet<BR>

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

C2DPointSet::~C2DPointSet (  void   ) 
 

Destructor.

--------------------------------------------------------------------------
C2DPointSet::~C2DPointSet<BR>

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


Member Function Documentation

void C2DPointSet::AddCopy (  const C2DPointSet &  Other  ) 
 

Adds a new copy of the pt set given point.

--------------------------------------------------------------------------
C2DPointSet::AddCopy<BR>

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

void C2DPointSet::AddCopy (  double  x,
double  y
) 
 

Adds a new point.

--------------------------------------------------------------------------
C2DPointSet::~C2DPointSet<BR>

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

void C2DPointSet::ExtractConvexHull (  C2DPointSet &  Other  ) 
 

Removes the convex hull from the point set given.

--------------------------------------------------------------------------
C2DPointSet::ExtractConvexHull<BR>

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

void C2DPointSet::GetBoundingCircle (  C2DCircle &  Circle  )  const
 

Gets the minimum bounding circle.

--------------------------------------------------------------------------
C2DPointSet::GetBoundingCircle<BR>

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

void C2DPointSet::GetBoundingRect (  C2DRect &  Rect  )  const [virtual]
 

Returns the bounding rect.

--------------------------------------------------------------------------
C2DPointSet::GetBoundingRect<BR>

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

Reimplemented from C2DBaseSet.

void C2DPointSet::GetExtremePoints (  unsigned int &  nIndx1,
unsigned int &  nIndx2,
double &  dDist
)  const
 

Returns the furthest points, accurate but slightly slower than the estimate.

--------------------------------------------------------------------------
C2DPointSet::GetExtremePoints<BR>

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

void C2DPointSet::GetExtremePointsEst (  unsigned int &  nIndx1,
unsigned int &  nIndx2,
double &  dDist,
unsigned int  nStartEst = 0
)  const
 

Returns an estimate of the furthest points, usually correct.

--------------------------------------------------------------------------
C2DPointSet::GetExtremePointsEst<BR>

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

void C2DPointSet::MakeCopy (  const C2DPointSet &  Other  ) 
 

Makes a copy of the set given.

--------------------------------------------------------------------------
C2DPointSet::MakeCopy<BR>

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

void C2DPointSet::operator<< (  C2DBaseSet &  Other  ) 
 

Passes ONLY the pointers of this type from the Other into this.

--------------------------------------------------------------------------
C2DPointSet::operator<<

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

Reimplemented from C2DBaseSet.

void C2DPointSet::RemoveRepeatedPoints (  void   ) 
 

Removes all repeated points.

--------------------------------------------------------------------------
C2DPointSet::RemoveRepeatedPoints<BR>

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

void C2DPointSet::SortByAngleFromNorth (  const C2DPoint &  Origin  ) 
 

Sorts by the angle from north relative to the origin given.

--------------------------------------------------------------------------
C2DPointSet::SortByAngleFromNorth<BR>

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

void C2DPointSet::SortByAngleToLeft (  const C2DLine &  Line  ) 
 

Sorts by the angle to the left of the line.

--------------------------------------------------------------------------
C2DPointSet::SortByAngleToRight<BR>

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

void C2DPointSet::SortByAngleToRight (  const C2DLine &  Line  ) 
 

Sorts by the angle to the right of the line.

--------------------------------------------------------------------------
C2DPointSet::SortByAngleToRight<BR>

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


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