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

This class maintains a collection of Shape objects. More...

Public Member Functions

template<class InputIt >
 ShapeSet (InputIt first, InputIt last)
 Initializes the set by iterating from to , which are iterators into a collection of std::shared_ptr<Shape>. More...
 
std::vector< std::shared_ptr< Shape > > shapes ()
 
const std::vector< std::shared_ptr< Shape > > shapes () const
 
void add (std::shared_ptr< Shape > shape)
 
void add (const ShapeSet &other)
 
void clear ()
 Remove all shapes.
 
template<typename T >
std::set< std::shared_ptr< Shape > > hitSet (const T &obj) const
 Get a set of which shapes "hit" the given object. More...
 
template<typename T >
bool hit (const T &obj) const
 Check if any of the shapes in this set "hit" the given object. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const ShapeSet &shapeSet)
 

Detailed Description

This class maintains a collection of Shape objects.

Constructor & Destructor Documentation

◆ ShapeSet()

template<class InputIt >
Geometry2d::ShapeSet::ShapeSet ( InputIt  first,
InputIt  last 
)
inline

Initializes the set by iterating from to , which are iterators into a collection of std::shared_ptr<Shape>.

Member Function Documentation

◆ hit()

template<typename T >
bool Geometry2d::ShapeSet::hit ( const T &  obj) const
inline

Check if any of the shapes in this set "hit" the given object.

Parameters
objThe object to collision test
Returns
True if one of the contained shapes hits the object.

◆ hitSet()

template<typename T >
std::set<std::shared_ptr<Shape> > Geometry2d::ShapeSet::hitSet ( const T &  obj) const
inline

Get a set of which shapes "hit" the given object.

Parameters
objThe object to collision test
Returns
A set of all shapes that collide with the given object

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