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);
168 #include <argos3/core/simulator/space/positional_indices/grid_impl.h>
signed int SInt32
32-bit signed integer.
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
The basic operation to be stored in the vtable.
virtual void Reset()
Resets the resource.
SCell & GetCellAt(SInt32 n_i, SInt32 n_j, SInt32 n_k)
virtual void Update()
Updates this positional index.
virtual void ForCellsInBoxRange(const CVector3 &c_center, const CVector3 &c_half_size, CCellOperation &c_operation)
void UpdateCell(SInt32 n_i, SInt32 n_j, SInt32 n_k, ENTITY &c_entity)
void ClampCoordinates(SInt32 &n_i, SInt32 &n_j, SInt32 &n_k) const
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.
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
CEntityOperation * m_pcUpdateEntityOperation
virtual void Destroy()
Undoes whatever was done by Init().
virtual void ForEntitiesInSphereRange(const CVector3 &c_center, Real f_radius, CEntityOperation &c_operation)
Executes an operation on all entities within the specified sphere range.
CVector3 m_cAreaMaxCorner
CSet< ENTITY *, SEntityComparator > m_cEntities
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 ForCellsAlongRay(const CRay3 &c_ray, CCellOperation &c_operation)
virtual void ForCellsInCircleRange(const CVector3 &c_center, Real f_radius, CCellOperation &c_operation)
virtual void AddEntity(ENTITY &c_entity)
Adds an entity to this index.
void PositionToCellUnsafe(SInt32 &n_i, SInt32 &n_j, SInt32 &n_k, const CVector3 &c_position) const
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.
CVector3 m_cAreaMinCorner
CPositionalIndex< ENTITY >::COperation CEntityOperation
void PositionToCell(SInt32 &n_i, SInt32 &n_j, SInt32 &n_k, const CVector3 &c_position) const
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)
virtual void RemoveEntity(ENTITY &c_entity)
Removes an entity from this index.
virtual void ForAllEntities(CEntityOperation &c_operation)
Executes an operation on all the indexed entities.
virtual void ForCellsInSphereRange(const CVector3 &c_center, Real f_radius, CCellOperation &c_operation)
virtual void ForCellsInRectangleRange(const CVector3 &c_center, const CVector2 &c_half_size, CCellOperation &c_operation)
virtual void ForAllCells(CCellOperation &c_operation)
virtual void GetEntitiesAt(CSet< ENTITY *, SEntityComparator > &c_entities, const CVector3 &c_position) const
Puts the entities located at the given point in the passed buffer.
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)
CSet< ENTITY *, SEntityComparator > Entities
virtual ~CCellOperation()
virtual bool operator()(SInt32 n_i, SInt32 n_j, SInt32 n_k, SCell &s_cell)=0
A data structure that contains positional entities.
The operation to perform on each entity found in range.
Defines a very simple double-linked list that stores unique elements.