Public Member Functions | List of all members
Avoid::PolygonInterface Class Referenceabstract

A common interface used by the Polygon classes. More...

#include <geomtypes.h>

Inheritance diagram for Avoid::PolygonInterface:
Avoid::Polygon Avoid::ReferencingPolygon Avoid::Rectangle

Public Member Functions

 PolygonInterface ()
 Constructor.
 
virtual ~PolygonInterface ()
 Destructor.
 
virtual void clear (void)=0
 Resets this to the empty polygon.
 
virtual bool empty (void) const =0
 Returns true if this polygon is empty.
 
virtual size_t size (void) const =0
 Returns the number of points in this polygon.
 
virtual int id (void) const =0
 Returns the ID value associated with this polygon.
 
virtual const Pointat (size_t index) const =0
 Returns a specific point in the polygon. More...
 
void getBoundingRect (double *minX, double *minY, double *maxX, double *maxY) const
 Returns the bounding rectangle that contains this polygon. More...
 
Polygon boundingRect (void) const
 Returns the bounding rectangle for this polygon. More...
 

Detailed Description

A common interface used by the Polygon classes.

Member Function Documentation

virtual const Point& Avoid::PolygonInterface::at ( size_t  index) const
pure virtual

Returns a specific point in the polygon.

Parameters
[in]indexThe array index of the point to be returned.

Implemented in Avoid::ReferencingPolygon, and Avoid::Polygon.

Polygon Avoid::PolygonInterface::boundingRect ( void  ) const

Returns the bounding rectangle for this polygon.

Returns
A new Rectangle representing the bounding box.
void Avoid::PolygonInterface::getBoundingRect ( double *  minX,
double *  minY,
double *  maxX,
double *  maxY 
) const

Returns the bounding rectangle that contains this polygon.

If a NULL pointer is passed for any of the arguments, then that value is ignored and not returned.

Parameters
[out]minXThe left hand side of the bounding box.
[out]minYThe top of the bounding box.
[out]maxXThe right hand side of the bounding box.
[out]maxYThe bottom of the bounding box.

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