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

Public Member Functions

 Segment (Point p1, Point p2)
 
 Segment (const Line &other)
 
Segmentoperator+= (const Point &delta)
 
Point center () const
 
Rect bbox () const
 
float distTo (const Point &other) const
 
Point delta () const
 
float length () const
 
bool nearPoint (const Point &point, float threshold) const
 
bool nearSegment (const Segment &other, float threshold) const
 
Point nearestPoint (const Point &p) const
 find the nearest point on the segment given p
 
Point nearestPoint (const Line &l) const
 
bool intersects (const Segment &other, Point *intr=nullptr) const
 
bool intersects (const Circle &circle) const
 
bool intersects (const Line &line, Point *intr=0) const
 
std::string toString () const
 
bool operator== (const Segment &other) const
 

Public Attributes

Point pt [2]
 the Segement consists of two points
 

Friends

std::ostream & operator<< (std::ostream &stream, const Segment &seg)
 
+ Collaboration diagram for Geometry2d::Segment:

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