ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::env::LocalBoxSet< TObject, TBoxGen, TComparator > Class Template Reference

#include <localboxset.h>

Collaboration diagram for adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >:
Collaboration graph

Classes

struct  EqualFunctor
 
struct  itpair
 

Public Types

typedef boost::geometry::model::point< double, 3, boost::geometry::cs::cartesian > Tboost_point
 
typedef boost::geometry::model::box< Tboost_pointTboost_box
 
typedef std::pair< Tboost_box, TObject * > TBoxPointerPair
 
typedef boost::geometry::index::rtree< TBoxPointerPair, boost::geometry::index::quadratic< 16 >, boost::geometry::index::indexable< TBoxPointerPair >, EqualFunctorTrtree
 
typedef Trtree::const_query_iterator Trtreeit
 

Public Member Functions

void insert (const TObject &object)
 
TObject * find (const TObject &object)
 
bool contains (const TObject &object)
 
void remove (TObject *object)
 
int size () const
 
itpair getObjectsInRegion (double x0, double y0, double x1, double y1)
 
itpair getObjectsOutsideRegion (double x0, double y0, double x1, double y1)
 
void refocus (double x0, double y0, double x1, double y1)
 

Private Attributes

Trtree data_
 
TBoxGen boxgen_
 
TComparator compare_
 

Detailed Description

template<typename TObject, typename TBoxGen, typename TComparator>
class adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >

LocalBoxSet aggregates a set of objects representable by bounding boxes. TObject: type of collected objects TBoxGen: generates box-shaped impact region for objects TComparator: compares objects for equality On insertion, the existance of a similar object is checked: This container allows no duplicates according to TComparator. If objects are identified with a certain tolerance, the TBoxGen class has to use the same tolerance in box generation, in order to find duplicates in insert or find or contains.

Member Typedef Documentation

◆ Tboost_box

template<typename TObject , typename TBoxGen , typename TComparator >
typedef boost::geometry::model::box<Tboost_point> adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::Tboost_box

◆ Tboost_point

template<typename TObject , typename TBoxGen , typename TComparator >
typedef boost::geometry::model::point<double,3,boost::geometry::cs::cartesian> adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::Tboost_point

◆ TBoxPointerPair

template<typename TObject , typename TBoxGen , typename TComparator >
typedef std::pair<Tboost_box,TObject*> adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::TBoxPointerPair

◆ Trtree

template<typename TObject , typename TBoxGen , typename TComparator >
typedef boost::geometry::index::rtree< TBoxPointerPair, boost::geometry::index::quadratic<16>, boost::geometry::index::indexable<TBoxPointerPair>, EqualFunctor > adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::Trtree

◆ Trtreeit

template<typename TObject , typename TBoxGen , typename TComparator >
typedef Trtree::const_query_iterator adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::Trtreeit

Member Function Documentation

◆ contains()

template<typename TObject , typename TBoxGen , typename TComparator >
bool adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::contains ( const TObject &  object)
inline

Returns true, if overall container has object, which is equal to function parameter, according to TComparator

Here is the call graph for this function:

◆ find()

template<typename TObject , typename TBoxGen , typename TComparator >
TObject* adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::find ( const TObject &  object)
inline

Searches for an object pointer, which is equal to object according to TComparator. If found, returns valid pointer, otherwise 0.

Here is the caller graph for this function:

◆ getObjectsInRegion()

template<typename TObject , typename TBoxGen , typename TComparator >
itpair adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::getObjectsInRegion ( double  x0,
double  y0,
double  x1,
double  y1 
)
inline

Identifies all objects overlapping or included in a box-shaped region with llc (x0,y0) and urc (x1,y). Returns an iterator pair. The first entry of the pair is the current position and the second entry the end position.

Here is the caller graph for this function:

◆ getObjectsOutsideRegion()

template<typename TObject , typename TBoxGen , typename TComparator >
itpair adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::getObjectsOutsideRegion ( double  x0,
double  y0,
double  x1,
double  y1 
)
inline

Identifies all objects not overlapping or included in a box-shaped region with llc (x0,y0) and urc (x1,y). Returns an iterator pair. The first entry of the pair is the current position and the second entry the end position.

Here is the caller graph for this function:

◆ insert()

template<typename TObject , typename TBoxGen , typename TComparator >
void adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::insert ( const TObject &  object)
inline

< object responsible for comparison Inserts a TObject for a region specified by TBoxGen. If the object already exists (equality defined by TComparator), the old object is replaced.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refocus()

template<typename TObject , typename TBoxGen , typename TComparator >
void adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::refocus ( double  x0,
double  y0,
double  x1,
double  y1 
)
inline

Deletes and removes all objects from container, which are not included in or overlapping given box with llc (x0,y0) and urc (x1,y).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove()

template<typename TObject , typename TBoxGen , typename TComparator >
void adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::remove ( TObject *  object)
inline

Remove an object from the overall container

Here is the caller graph for this function:

◆ size()

template<typename TObject , typename TBoxGen , typename TComparator >
int adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::size ( ) const
inline

get the number of contained objects

Here is the caller graph for this function:

Member Data Documentation

◆ boxgen_

template<typename TObject , typename TBoxGen , typename TComparator >
TBoxGen adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::boxgen_
private

< the container

◆ compare_

template<typename TObject , typename TBoxGen , typename TComparator >
TComparator adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::compare_
private

< object responsible for bounding box computation

◆ data_

template<typename TObject , typename TBoxGen , typename TComparator >
Trtree adore::env::LocalBoxSet< TObject, TBoxGen, TComparator >::data_
private

The documentation for this class was generated from the following file: