GT RoboCup SSL
Soccer software, robot firmware
Geometry2d::Polygon Class Reference

Public Member Functions

 Polygon (const Rect &rect)
 
 Polygon (std::vector< Point > verts)
 
 Polygon (const Segment &seg, float r)
 Creates a rectangle of arbitrary orientation which encloses / all points.
 
 Polygon (const Segment &seg, float r, float length)
 Same as above but with length given to avoid a square root.
 
 Polygon (const Polygon &other)
 
Shapeclone () const override
 
bool containsPoint (Point pt) const override
 
bool intersects (const Rect &rect) const
 
bool intersects (const Polygon &other) const
 
bool hit (Point pt) const override
 Returns true if the given point is within one robot radius of the shape.
 
bool hit (const Segment &seg) const override
 
bool containsVertex (const Polygon &other) const
 Returns true if this polygon contains any vertex of other.
 
bool nearPoint (Point pt, float threshold) const override
 
bool nearSegment (const Segment &seg, float threshold) const
 
Rect bbox () const
 
void addVertex (Point pt)
 
std::string toString () override
 

Public Attributes

std::vector< Pointvertices
 

Protected Member Functions

void init (const Segment &seg, float r, float length)
 Used by constructors.
 
+ Inheritance diagram for Geometry2d::Polygon:
+ Collaboration diagram for Geometry2d::Polygon:

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