#include <GLViewer_Geom.h>
Public Member Functions | |
GLViewer_Poly (const GLViewer_PntList *thePoints) | |
virtual | ~GLViewer_Poly () |
void | AddPoint (GLViewer_Pnt &pnt) |
Adds point to polygon. More... | |
int | Count () const |
Returns number of point. More... | |
virtual bool | IsIn (const GLViewer_Pnt &thePnt) const |
Returns true if a point lies inside this polygon. More... | |
virtual bool | IsCovers (const GLViewer_Poly &thePoly) const |
Returns true if a other polygon covers this polygon. More... | |
virtual bool | IsCovers (const GLViewer_Rect &theRect) const |
Likes the above function. More... | |
virtual bool | HasIntersection (const GLViewer_Segment &theSegment) const |
Private Attributes | |
GLViewer_PntList * | myPoints |
Class GLViewer_Poly Polygon for 2d detection
GLViewer_Poly::GLViewer_Poly | ( | const GLViewer_PntList * | thePoints | ) |
constructs a closed polygon from the given ordered list of points
|
virtual |
destructor, <myPoints> mustn't be deleted here!
|
inline |
|
inline |
|
virtual |
theSegment | - segment to check intersection |
References GLViewer_Segment::HasIntersection(), and myPoints.
|
virtual |
|
virtual |
References GLViewer_Rect::bottom(), GLViewer_Poly(), IsCovers(), GLViewer_Rect::left(), myPoints, GLViewer_Rect::right(), and GLViewer_Rect::top().
|
virtual |
References myPoints, and GLViewer_Pnt::y().
|
private |