GT RoboCup SSL
Soccer software, robot firmware
|
The shape class provides the interface to all shapes that are subclasses. More...
Public Member Functions | |
virtual Shape * | clone () const |
virtual bool | containsPoint (Point pt) const |
virtual bool | hit (Point pt) const |
Returns true if the given point is within one robot radius of the shape. | |
virtual bool | hit (const Segment &seg) const |
virtual bool | nearPoint (Point other, float threshold) const |
virtual std::string | toString () |
Friends | |
std::ostream & | operator<< (std::ostream &stream, Shape &shape) |
The shape class provides the interface to all shapes that are subclasses.
We expose this class and its subclasses to python through boost python, which unfortunately handles abstract base classes very strangely. The only way I could get inheritance to work properly with boost was to provide implementations for the methods in this class even though we'd prefer them to be pure virtual (not implemented in this class).