ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
The operation to perform on each entity found in range. More...
#include <positional_index.h>
Public Member Functions | |
virtual | ~COperation () |
virtual bool | operator() (ENTITY &)=0 |
The operation to perform on each entity found in range.
The operation gets as input a reference to an entity. The return value is either true
or false
. The former means that the processing should continue with the next entity. The latter means that processing is finished. For example, this code prints the id of all the embodied entities in a sphere centered in zero and with 1-meter radius: class CMyOperation : public CPositionalIndex<CEmbodiedEntity>::COperation { public: virtual bool operator()(CEmbodiedEntity& e) { LOG << e.GetId() << std::endl; return true; } }; ... CPositionalIndex<CEmbodiedEntity>& i = ... i.ForEntitiesInSphereRange(CVector3(), 1, CMyOperation);
Definition at line 59 of file positional_index.h.
virtual argos::CPositionalIndex< ENTITY >::COperation::~COperation | ( | ) | [inline, virtual] |
Definition at line 61 of file positional_index.h.
virtual bool argos::CPositionalIndex< ENTITY >::COperation::operator() | ( | ENTITY & | ) | [pure virtual] |