ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
4 #include <argos3/core/utility/datatypes/set.h>
5 #include <argos3/core/utility/math/range.h>
6 #include <argos3/core/utility/math/ray3.h>
7 #include <argos3/core/simulator/space/positional_indices/positional_index.h>
11 template<
class ENTITY>
81 bool b_stop_at_closest_match =
false);
83 virtual void ForAllCells(CCellOperation& c_operation);
87 CCellOperation& c_operation);
91 CCellOperation& c_operation);
95 CCellOperation& c_operation);
99 CCellOperation& c_operation);
102 CCellOperation& c_operation);
168 #include <argos3/core/simulator/space/positional_indices/grid_impl.h>
virtual void ForCellsInRectangleRange(const CVector3 &c_center, const CVector2 &c_half_size, CCellOperation &c_operation)
The basic operation to be stored in the vtable.
void PositionToCellUnsafe(SInt32 &n_i, SInt32 &n_j, SInt32 &n_k, const CVector3 &c_position) const
virtual void ForCellsInSphereRange(const CVector3 &c_center, Real f_radius, CCellOperation &c_operation)
The namespace containing all the ARGoS related code.
virtual void ForEntitiesInRectangleRange(const CVector3 &c_center, const CVector2 &c_half_size, CEntityOperation &c_operation)
Executes an operation on all entities within the specified rectangle range.
The operation to perform on each entity found in range.
virtual void Reset()
Resets the resource.
CEntityOperation * m_pcUpdateEntityOperation
virtual void ForAllEntities(CEntityOperation &c_operation)
Executes an operation on all the indexed entities.
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
void clear()
Erases the contents of the list.
void ClampCoordinates(SInt32 &n_i, SInt32 &n_j, SInt32 &n_k) const
virtual void ForAllCells(CCellOperation &c_operation)
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
virtual ~CCellOperation()
CSet< ENTITY * > Entities
virtual void RemoveEntity(ENTITY &c_entity)
Removes an entity from this index.
CVector3 m_cAreaMinCorner
virtual void ForEntitiesInCircleRange(const CVector3 &c_center, Real f_radius, CEntityOperation &c_operation)
Executes an operation on all entities within the specified circle range.
virtual void Destroy()
Undoes whatever was done by Init().
virtual bool operator()(SInt32 n_i, SInt32 n_j, SInt32 n_k, SCell &s_cell)=0
void PositionToCell(SInt32 &n_i, SInt32 &n_j, SInt32 &n_k, const CVector3 &c_position) const
CSet< ENTITY * > m_cEntities
void UpdateCell(SInt32 n_i, SInt32 n_j, SInt32 n_k, ENTITY &c_entity)
signed int SInt32
32-bit signed integer.
virtual void ForEntitiesAlongRay(const CRay3 &c_ray, CEntityOperation &c_operation, bool b_stop_at_closest_match=false)
Executes an operation on all entities that intersect the given ray.
SCell & GetCellAt(SInt32 n_i, SInt32 n_j, SInt32 n_k)
virtual void AddEntity(ENTITY &c_entity)
Adds an entity to this index.
CGrid(const CVector3 &c_area_min_corner, const CVector3 &c_area_max_corner, SInt32 n_size_i, SInt32 n_size_j, SInt32 n_size_k)
virtual void GetEntitiesAt(CSet< ENTITY * > &c_entities, const CVector3 &c_position) const
Puts the entities located at the given point in the passed buffer.
virtual void ForCellsAlongRay(const CRay3 &c_ray, CCellOperation &c_operation)
virtual void ForCellsInCircleRange(const CVector3 &c_center, Real f_radius, CCellOperation &c_operation)
virtual void ForCellsInBoxRange(const CVector3 &c_center, const CVector3 &c_half_size, CCellOperation &c_operation)
A data structure that contains positional entities.
virtual void ForEntitiesInSphereRange(const CVector3 &c_center, Real f_radius, CEntityOperation &c_operation)
Executes an operation on all entities within the specified sphere range.
virtual void Update()
Updates this positional index.
virtual void ForEntitiesInBoxRange(const CVector3 &c_center, const CVector3 &c_half_size, CEntityOperation &c_operation)
Executes an operation on all entities within the specified box range.
void SetUpdateEntityOperation(CEntityOperation *pc_operation)
float Real
Collects all ARGoS code.
CPositionalIndex< ENTITY >::COperation CEntityOperation
CVector3 m_cAreaMaxCorner