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 60 of file positional_index.h.
|
inlinevirtual |
Definition at line 62 of file positional_index.h.
|
pure virtual |