1 #ifndef POSITIONAL_INDEX_H
2 #define POSITIONAL_INDEX_H
10 #include <argos3/core/utility/configuration/base_configurable_resource.h>
11 #include <argos3/core/utility/datatypes/datatypes.h>
12 #include <argos3/core/utility/datatypes/set.h>
13 #include <argos3/core/utility/math/vector2.h>
14 #include <argos3/core/utility/math/vector3.h>
15 #include <argos3/core/simulator/entity/entity.h>
29 template<
class ENTITY>
98 const CVector3& c_position)
const = 0;
167 bool b_stop_at_closest_match =
false) = 0;
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
A data structure that contains positional entities.
virtual void ForEntitiesInSphereRange(const CVector3 &c_center, Real f_radius, COperation &c_operation)=0
Executes an operation on all entities within the specified sphere range.
virtual void Update()=0
Updates this positional index.
virtual void RemoveEntity(ENTITY &c_entity)=0
Removes an entity from this index.
virtual void Reset()=0
Resets the resource.
virtual void AddEntity(ENTITY &c_entity)=0
Adds an entity to this index.
virtual void GetEntitiesAt(CSet< ENTITY *, SEntityComparator > &c_entities, const CVector3 &c_position) const =0
Puts the entities located at the given point in the passed buffer.
virtual void Destroy()=0
Undoes whatever was done by Init().
virtual void ForEntitiesInRectangleRange(const CVector3 &c_center, const CVector2 &c_half_size, COperation &c_operation)=0
Executes an operation on all entities within the specified rectangle range.
virtual void ForEntitiesInBoxRange(const CVector3 &c_center, const CVector3 &c_half_size, COperation &c_operation)=0
Executes an operation on all entities within the specified box range.
virtual void ForEntitiesInCircleRange(const CVector3 &c_center, Real f_radius, COperation &c_operation)=0
Executes an operation on all entities within the specified circle range.
virtual void Init(TConfigurationNode &t_tree)=0
Initializes the resource.
virtual void ForAllEntities(COperation &c_operation)=0
Executes an operation on all the indexed entities.
virtual void ForEntitiesAlongRay(const CRay3 &c_ray, COperation &c_operation, bool b_stop_at_closest_match=false)=0
Executes an operation on all entities that intersect the given ray.
virtual ~CPositionalIndex()
The operation to perform on each entity found in range.
virtual bool operator()(ENTITY &)=0
This class is the base of all XML-configurable ARGoS interface.
Defines a very simple double-linked list that stores unique elements.