This class represents a set of objects that are positioned by LanePosition.
More...
#include <lanepositionedobjectset.h>
|
| LanePositionedObjectSet () |
| Construct a new LanePositionedObjectSet object. More...
|
|
virtual | ~LanePositionedObjectSet () |
| Destroy the LanePositionedObjectSet object. More...
|
|
void | setIsOwner (bool isOwner) |
| Set the owner flag. More...
|
|
void | clear () |
| Clear the LanePositionedObjectSet. More...
|
|
void | discard_distant_objects (double x, double y, double distance=100.0) |
| Discard distant objects. More...
|
|
template<typename T > |
void | discard_distant_objects (double x, double y, std::vector< T > &removedObjects, double distance=100.0) |
| Discard distant objects. More...
|
|
void | insert_object (object *obj, bool remove_duplicates=false, double precision=0.5) |
| Insert a new object. More...
|
|
void | erase_object (const LanePosition &position, double precision=0.5) |
| Erase objects on a certain LanePosition. More...
|
|
void | eraseObjectsBorderBased (const std::vector< Border * > borderSet) |
| Erase Objects that are positioned on certain borders. More...
|
|
void | eraseObjectsBorderBased (const std::vector< BorderID > borderIDSet) |
| Erase Objects that are positioned on certain borders given by their BorderIDs. More...
|
|
bool | hasObjects (const BorderID &borderID) |
| Check whether at least one object is contained that is positioned on a certain Border. More...
|
|
ObjectIteratorPair | getAllObjects () |
| Get the begin()- and end()-iterator for the whole set. More...
|
|
ObjectIteratorPair | getObjects (const BorderID &borderID) |
| Get the begin()- and end()-iterator for objects that are positioned on a certain border. More...
|
|
std::vector< object * > | getObjects (const LanePosition &position, double precision=0.5) |
| Get the objects that are positioned on a certain LanePosition. More...
|
|
bool | hasObjects (const LanePosition &position, double precision=0.5) |
| Check whether the set holds at least one object on a certain LanePosition. More...
|
|
void | erase_objectsWithUnknownBordersOutsideRadius (BorderSet *borderSet, Coordinate center, double radius) |
| Erase objects that are positioned that are outside a specified circle. More...
|
|
This class represents a set of objects that are positioned by LanePosition.
◆ BorderID2Object
◆ object
◆ ObjectIterator
◆ ObjectIteratorPair
◆ LanePositionedObjectSet()
adore::env::BorderBased::LanePositionedObjectSet::LanePositionedObjectSet |
( |
| ) |
|
|
inline |
◆ ~LanePositionedObjectSet()
virtual adore::env::BorderBased::LanePositionedObjectSet::~LanePositionedObjectSet |
( |
| ) |
|
|
inlinevirtual |
◆ clear()
void adore::env::BorderBased::LanePositionedObjectSet::clear |
( |
| ) |
|
|
inline |
◆ discard_distant_objects() [1/2]
void adore::env::BorderBased::LanePositionedObjectSet::discard_distant_objects |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
distance = 100.0 |
|
) |
| |
|
inline |
Discard distant objects.
- Parameters
-
x | x-coordinate of the reference point |
y | y-coordinate of the reference point |
distance | maximal distance to for the objects to keep (default: 100) |
◆ discard_distant_objects() [2/2]
template<typename T >
void adore::env::BorderBased::LanePositionedObjectSet::discard_distant_objects |
( |
double |
x, |
|
|
double |
y, |
|
|
std::vector< T > & |
removedObjects, |
|
|
double |
distance = 100.0 |
|
) |
| |
|
inline |
Discard distant objects.
The removed Objects are written into a vector
- Parameters
-
x | x-coordinate of the reference point |
y | y-coordinate of the reference point |
removedObjects | list of removed objects |
distance | maximal distance to for the objects to keep (default: 100) |
◆ erase_object()
void adore::env::BorderBased::LanePositionedObjectSet::erase_object |
( |
const LanePosition & |
position, |
|
|
double |
precision = 0.5 |
|
) |
| |
|
inline |
Erase objects on a certain LanePosition.
- Parameters
-
position | LanePosition where objects should be erased |
precision | the Position is compared with this precision (default: 0.5) |
◆ erase_objectsWithUnknownBordersOutsideRadius()
void adore::env::BorderBased::LanePositionedObjectSet::erase_objectsWithUnknownBordersOutsideRadius |
( |
BorderSet * |
borderSet, |
|
|
Coordinate |
center, |
|
|
double |
radius |
|
) |
| |
|
inline |
Erase objects that are positioned that are outside a specified circle.
- Parameters
-
borderSet | set of Borders. Objects that are positioned on these borders are not deleted. |
center | Coordinates of the center point of the circle |
radius | radius of the circle |
◆ eraseObjectsBorderBased() [1/2]
void adore::env::BorderBased::LanePositionedObjectSet::eraseObjectsBorderBased |
( |
const std::vector< Border * > |
borderSet | ) |
|
|
inline |
Erase Objects that are positioned on certain borders.
- Parameters
-
borderSet | vector of borders on which objects are removed |
◆ eraseObjectsBorderBased() [2/2]
void adore::env::BorderBased::LanePositionedObjectSet::eraseObjectsBorderBased |
( |
const std::vector< BorderID > |
borderIDSet | ) |
|
|
inline |
Erase Objects that are positioned on certain borders given by their BorderIDs.
- Parameters
-
borderIDSet | vector of borders given by BorderIDs on which objects are removed |
◆ getAllObjects()
Get the begin()- and end()-iterator for the whole set.
- Returns
- ObjectIteratorPair begin()- and end()-iterator
◆ getObjects() [1/2]
Get the begin()- and end()-iterator for objects that are positioned on a certain border.
- Parameters
-
borderID | specifies the border |
- Returns
- ObjectIteratorPair begin()- and end()-iterator
◆ getObjects() [2/2]
std::vector<object*> adore::env::BorderBased::LanePositionedObjectSet::getObjects |
( |
const LanePosition & |
position, |
|
|
double |
precision = 0.5 |
|
) |
| |
|
inline |
Get the objects that are positioned on a certain LanePosition.
- Parameters
-
position | LanePosition |
precision | precision that is used for the comparision of the LanePositions |
- Returns
- std::vector<object*> vector of objects that are positioned on the specified LanePosition
◆ hasObjects() [1/2]
bool adore::env::BorderBased::LanePositionedObjectSet::hasObjects |
( |
const BorderID & |
borderID | ) |
|
|
inline |
Check whether at least one object is contained that is positioned on a certain Border.
- Parameters
-
borderID | specifies the border |
- Returns
- true if at least one object in the set is positioned with the given border
-
false if no object is positioned with the given border
◆ hasObjects() [2/2]
bool adore::env::BorderBased::LanePositionedObjectSet::hasObjects |
( |
const LanePosition & |
position, |
|
|
double |
precision = 0.5 |
|
) |
| |
|
inline |
Check whether the set holds at least one object on a certain LanePosition.
- Parameters
-
position | LanePosition |
precision | precision for the comparison of the LanePositions |
- Returns
- true if there is at least one object at the specified LanePosition
-
false if no object is at the specified LanePosition
◆ insert_object()
void adore::env::BorderBased::LanePositionedObjectSet::insert_object |
( |
object * |
obj, |
|
|
bool |
remove_duplicates = false , |
|
|
double |
precision = 0.5 |
|
) |
| |
|
inline |
Insert a new object.
- Parameters
-
obj | object to insert |
remove_duplicates | indicates whether duplicates should be removed (default: true) |
precision | precision for checking for duplicates (default: 0.5) |
◆ setIsOwner()
void adore::env::BorderBased::LanePositionedObjectSet::setIsOwner |
( |
bool |
isOwner | ) |
|
|
inline |
Set the owner flag.
- Parameters
-
◆ borderId2Object
BorderID2Object adore::env::BorderBased::LanePositionedObjectSet::borderId2Object |
|
private |
mapping the border ids with the objects
◆ m_isOwner
bool adore::env::BorderBased::LanePositionedObjectSet::m_isOwner |
|
private |
indicates whether object is owned
The documentation for this class was generated from the following file: