A data structure that contains positional entities. More...
#include <positional_index.h>
Classes | |
class | COperation |
The operation to perform on each entity found in range. More... | |
Public Member Functions | |
CPositionalIndex () | |
virtual | ~CPositionalIndex () |
virtual void | Init (TConfigurationNode &t_tree)=0 |
Initializes the resource. More... | |
virtual void | Reset ()=0 |
Resets the resource. More... | |
virtual void | Destroy ()=0 |
Undoes whatever was done by Init(). More... | |
virtual void | AddEntity (ENTITY &c_entity)=0 |
Adds an entity to this index. More... | |
virtual void | RemoveEntity (ENTITY &c_entity)=0 |
Removes an entity from this index. More... | |
virtual void | Update ()=0 |
Updates this positional index. More... | |
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. More... | |
virtual void | ForAllEntities (COperation &c_operation)=0 |
Executes an operation on all the indexed entities. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
A data structure that contains positional entities.
This interface defines the basic operations a data structure can do on positional entities. It is meant to provide methods to perform operations on entities within given ranges.
Definition at line 30 of file positional_index.h.
|
inline |
Definition at line 68 of file positional_index.h.
|
inlinevirtual |
Definition at line 69 of file positional_index.h.
|
pure virtual |
Adds an entity to this index.
c_entity | The entity to add. |
Implemented in argos::CAbstractSpaceHash< ENTITY >, and argos::CGrid< ENTITY >.
|
pure virtual |
Undoes whatever was done by Init().
Implements argos::CBaseConfigurableResource.
Implemented in argos::CGrid< ENTITY >, argos::CGrid< argos::CLEDEntity >, argos::CGrid< argos::CTagEntity >, argos::CGrid< argos::CEmbodiedEntity >, argos::CGrid< argos::CRadioEntity >, argos::CGrid< argos::CDirectionalLEDEntity >, and argos::CGrid< argos::CRABEquippedEntity >.
|
pure virtual |
Executes an operation on all the indexed entities.
c_operation | The operation to perform. |
Implemented in argos::CGrid< ENTITY >.
|
pure virtual |
Executes an operation on all entities that intersect the given ray.
When the parameter b_stop_at_closest_matches
is set to true
, this method stops at the closest match. Depending on the actual index implementation, there may be multiple closest matches. In this case, the operation is executed on all of them.
c_ray | The ray. |
c_operation | The operation to perform. |
b_stop_at_closest_matches | Stop the computation as soon as the first match is found. |
Implemented in argos::CGrid< ENTITY >.
|
pure virtual |
Executes an operation on all entities within the specified box range.
The box is axis-aligned.
c_center | The box center. |
c_half_size | The box half-size. |
c_operation | The operation to perform. |
Implemented in argos::CGrid< ENTITY >.
|
pure virtual |
Executes an operation on all entities within the specified circle range.
The circle is parallel to the XY plane.
c_center | The circle center. |
f_radius | The circle radius. |
c_operation | The operation to perform. |
Implemented in argos::CGrid< ENTITY >.
|
pure virtual |
Executes an operation on all entities within the specified rectangle range.
The rectangle is axis-aligned and parallel to the XY plane.
c_center | The rectangle center. |
c_half_size | The rectangle half-size. |
c_operation | The operation to perform. |
Implemented in argos::CGrid< ENTITY >.
|
pure virtual |
Executes an operation on all entities within the specified sphere range.
c_center | The sphere center. |
f_radius | The sphere radius. |
c_operation | The operation to perform. |
Implemented in argos::CGrid< ENTITY >.
|
pure virtual |
Puts the entities located at the given point in the passed buffer.
c_entities | The entity set to use as buffer. |
c_position | The wanted point in the space. |
Implemented in argos::CGrid< ENTITY >.
|
pure virtual |
Initializes the resource.
t_tree | the base of the XML configuration tree to parse |
CARGoSException | if an error occurs |
Implements argos::CBaseConfigurableResource.
Implemented in argos::CGrid< ENTITY >, argos::CGrid< argos::CLEDEntity >, argos::CGrid< argos::CTagEntity >, argos::CGrid< argos::CEmbodiedEntity >, argos::CGrid< argos::CRadioEntity >, argos::CGrid< argos::CDirectionalLEDEntity >, and argos::CGrid< argos::CRABEquippedEntity >.
|
pure virtual |
Removes an entity from this index.
c_entity | The entity to remove. |
Implemented in argos::CAbstractSpaceHash< ENTITY >, and argos::CGrid< ENTITY >.
|
pure virtual |
Resets the resource.
Implements argos::CBaseConfigurableResource.
Implemented in argos::CGrid< ENTITY >, argos::CGrid< argos::CLEDEntity >, argos::CGrid< argos::CTagEntity >, argos::CGrid< argos::CEmbodiedEntity >, argos::CGrid< argos::CRadioEntity >, argos::CGrid< argos::CDirectionalLEDEntity >, and argos::CGrid< argos::CRABEquippedEntity >.
|
pure virtual |
Updates this positional index.
Implemented in argos::CAbstractSpaceHash< ENTITY >, argos::CSpaceHashNative< Element, Updater >, argos::CSpaceHash< ENTITY, UPDATER >, argos::CSpaceHash< Element, Updater >, argos::CGrid< ENTITY >, argos::CGrid< argos::CLEDEntity >, argos::CGrid< argos::CTagEntity >, argos::CGrid< argos::CEmbodiedEntity >, argos::CGrid< argos::CRadioEntity >, argos::CGrid< argos::CDirectionalLEDEntity >, and argos::CGrid< argos::CRABEquippedEntity >.