A Geometry2d::CompositeShape is a Shape that is made up of other shapes.
More...
|
typedef std::vector< std::shared_ptr< Shape > >::const_iterator | const_iterator |
|
typedef std::vector< std::shared_ptr< Shape > >::iterator | iterator |
|
typedef std::shared_ptr< Shape > | value_type |
|
|
| CompositeShape (const std::shared_ptr< Shape > shape) |
|
| CompositeShape (const CompositeShape &other) |
|
Shape * | clone () const override |
|
virtual bool | containsPoint (Point pt) const override |
|
virtual bool | nearPoint (Point pt, float threshold) const override |
|
void | add (const std::shared_ptr< Shape > shape) |
|
void | add (const CompositeShape &compShape) |
| adds 's subshapes to the receiver
|
|
const std::vector< std::shared_ptr< Shape > > & | subshapes () const |
|
void | clear () |
| removes all subshapes
|
|
bool | empty () |
|
unsigned int | size () const |
|
template<typename T > |
bool | hit (const T &obj) const |
| Checks if a given shape is in it. More...
|
|
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 |
|
const_iterator | begin () const |
|
const_iterator | end () const |
|
iterator | begin () |
|
iterator | end () |
|
std::string | toString () override |
|
std::shared_ptr< Shape > | operator[] (unsigned int index) |
|
std::shared_ptr< const Shape > | operator[] (unsigned int index) const |
|
A Geometry2d::CompositeShape is a Shape that is made up of other shapes.
◆ hit()
template<typename T >
bool Geometry2d::CompositeShape::hit |
( |
const T & |
obj | ) |
const |
|
inline |
Checks if a given shape is in it.
- Parameters
-
obj | The object to collision test |
- Returns
- A bool telling whether or not there were any collisions
The documentation for this class was generated from the following files: