Stores an array of points (dbPoint).
![]()
Class Functions:
==============
void append( dbPoint *pt )
Add a dbPoint* to the end of the array.
void appendPt( float x, float y )
Add a dbPoint* to the end of the array with x and y.
int no()
Returns the total count of dbPoint's in the array.
void clear()
Remove all dbPoint's stored in the array.
int isSelfIntersecting( int isClosed )
This function returns 1 if this dbPointArray intersects itself. This does not include self-touching dbPointArrays.
int isOrthogonal( int isClosed )
This function returns 1 if all of the angles in this dbPointArray are multiples of 90 degrees.
int isRectangle()
This function returns 1 if this dbPointArray represents a rectangle.
int onEdge( dbPoint point, int isClosed )
This function returns 1 if the specified point is on this dbPointArray.
int contains( dbPoint point, int includeEdges )
This function returns 1 if the specified point is inside or on the edge of this dbPointArray (which is assumed closed).
int overlaps( dbBox box )
This function returns 1 if the specified box overlaps or touches this dbPointArray (which is assumed closed).
float distanceFrom2( dbPoint point )
This function returns the square of the distance from the specified point to the closest point on this dbPointArray (which is assumed closed).
float getArea()
This function returns the area built by the clockwise dbPointArray.
int hasExtraPoints( int isClosed )
This function returns 1 if this dbPointArray has any colinear or coincident points in it. The flag isClosed indicates if the dbPointArray is closed.
void compress( int isClosed )
This function removes all colinear and coincident points from this dbPointArray.
void transform( float scale, float angle )
This function transforms this dbPointArray by the specified scale factor and rotation angle. The points are rotated about the origin.
void getBBox( dbBox &box )
This function calculates the bounding box of this dbPointArray.
void index( int pos, dbPoint *pt )
This function assigns the dbPoint* at position pos in the dbPointArray.