Holds the indexes for pedestrians in each type group.
More...
#include <pedestrian_groups.hpp>
|
void | initialize (Ptype, VIPRA::size) |
| Initializes the _groups, starting with all pedestrians in group 0.
|
|
void | clean_used () |
| Resets _used status of all pedestrians.
|
|
auto | size () const -> VIPRA::size |
| Returns the number of _groups.
|
|
auto | at (VIPRA::idx) const -> VIPRA::idxVec const & |
| Gets the group at index.
|
|
auto | operator[] (VIPRA::idx) -> VIPRA::idxVec & |
| Gets the group at index.
|
|
auto | get_group (typeUID) const -> const VIPRA::idxVec & |
| Returns the group with a given type.
|
|
void | add_ped (VIPRA::idx, typeUID) |
| Adds a pedestrians index to the group with type.
|
|
void | move_ped (VIPRA::idx, typeUID, typeUID) |
|
auto | remove_ped (VIPRA::idx, typeUID) -> bool |
| Removes the pedestrian from the group with type.
|
|
auto | set_used (VIPRA::idx, typeUID) -> bool |
| Sets a pedestrian as _used in a particular group, this pedestrian can then no longer be selected from this group.
|
|
auto | get_used (typeUID) const -> std::vector< bool > const & |
| Returns vector of _used pedestrians from a group.
|
|
auto | is_used (VIPRA::idx, typeUID) const -> bool |
|
|
static constexpr auto | index (typeUID type) -> VIPRA::idx |
| Gets the index into the container for a given type.
|
|
Holds the indexes for pedestrians in each type group.
◆ add_ped()
void VIPRA::Behaviors::GroupsContainer::add_ped |
( |
VIPRA::idx | pedIdx, |
|
|
typeUID | type ) |
Adds a pedestrians index to the group with type.
- Parameters
-
pedIdx | : pedestrian index to add to group |
type | : group to add to |
◆ at()
auto VIPRA::Behaviors::GroupsContainer::at |
( |
VIPRA::idx | index | ) |
const -> VIPRA::idxVec const& |
|
nodiscard |
Gets the group at index.
- Parameters
-
- Returns
- VIPRA::idxVec&
◆ get_group()
auto VIPRA::Behaviors::GroupsContainer::get_group |
( |
typeUID | type | ) |
const -> const VIPRA::idxVec& |
|
nodiscard |
Returns the group with a given type.
- Parameters
-
- Returns
- const VIPRA::idxVec&
◆ get_used()
auto VIPRA::Behaviors::GroupsContainer::get_used |
( |
typeUID | type | ) |
const -> std::vector<bool> const& |
|
nodiscard |
Returns vector of _used pedestrians from a group.
- Parameters
-
type | : group to get _used pedestrians from |
- Returns
- const std::vector<bool>&
◆ index()
static constexpr auto VIPRA::Behaviors::GroupsContainer::index |
( |
typeUID | type | ) |
-> VIPRA::idx
|
|
inlinestaticconstexpr |
Gets the index into the container for a given type.
- Parameters
-
- Returns
- constexpr VIPRA::idx
◆ initialize()
void VIPRA::Behaviors::GroupsContainer::initialize |
( |
Ptype | allTypes, |
|
|
VIPRA::size | pedCnt ) |
Initializes the _groups, starting with all pedestrians in group 0.
- Parameters
-
allTypes | : Ptype with all possible types |
pedCnt | : number of pedestrians |
◆ operator[]()
auto VIPRA::Behaviors::GroupsContainer::operator[] |
( |
VIPRA::idx | index | ) |
-> VIPRA::idxVec& |
|
nodiscard |
Gets the group at index.
- Parameters
-
- Returns
- VIPRA::idxVec&
◆ remove_ped()
auto VIPRA::Behaviors::GroupsContainer::remove_ped |
( |
VIPRA::idx | pedIdx, |
|
|
typeUID | type ) -> bool |
Removes the pedestrian from the group with type.
- Parameters
-
pedIdx | : pedestrian index to remove |
type | : group to remove the pedestrian from |
◆ set_used()
auto VIPRA::Behaviors::GroupsContainer::set_used |
( |
VIPRA::idx | pedIdx, |
|
|
typeUID | type ) -> bool |
Sets a pedestrian as _used in a particular group, this pedestrian can then no longer be selected from this group.
- Parameters
-
pedIdx | : pedestrian index |
type | : group pedestrian has been added to |
- Returns
- true
-
false
◆ size()
auto VIPRA::Behaviors::GroupsContainer::size |
( |
| ) |
const -> VIPRA::size |
|
nodiscard |
Returns the number of _groups.
- Returns
- VIPRA::size
The documentation for this class was generated from the following files:
- include/vipra/vipra_behaviors/selectors/pedestrian_groups.hpp
- src/vipra_behaviors/selectors/pedestrian_groups.cpp