Selects lanes and outlines them with red cubes along the sides of the lane.
#include <src/maliput_viz/plugins/selector.hh>
|
| Selector (ignition::rendering::ScenePtr &_scene, double _scaleX, double _scaleY, double _scaleZ, int _poolSize, int _numLanes, double _minTolerance) |
| Initializes the pool of red cubes to be used for selecting lanes. More...
|
|
| ~Selector ()=default |
| Destructor. Cube's destruction will be in charge of the scene's destructor. More...
|
|
void | SelectLane (const maliput::api::Lane *_lane) |
| Selects _lane 's mesh when it is not selected, or deselects it when it is selected. More...
|
|
void | SetVisibility (bool _visible) |
| Hides every cube used and resets the cache. More...
|
|
void | DeselectAll () |
| Deselects all selected regions by calling ResetPopulationMap() , ClearSelectedBranchPoints() and ClearSelectedLanes() More...
|
|
std::vector< std::string > | GetSelectedLanes () |
| Gets the currently selected lanes as a string vector. More...
|
|
std::vector< std::string > | GetSelectedBranchPoints () |
| Gets the currently selected BranchPoints as a string vector. More...
|
|
bool | IsSelected (const maliput::api::Lane *_lane) |
| Finds if the passed in lane is currently selected or not. More...
|
|
bool | IsSelected (const std::string &_id) |
| Finds if mesh corresponding to the id is currently selected or not. More...
|
|
◆ Selector()
Selector |
( |
ignition::rendering::ScenePtr & |
_scene, |
|
|
double |
_scaleX, |
|
|
double |
_scaleY, |
|
|
double |
_scaleZ, |
|
|
int |
_poolSize, |
|
|
int |
_numLanes, |
|
|
double |
_minTolerance |
|
) |
| |
Initializes the pool of red cubes to be used for selecting lanes.
- Parameters
-
[in] | _scene | Pointer to the scene where cubes will live. |
[in] | _scaleX | Scale factor for the X axis. This value multiplied by two will be used if tolerance is lower than the length of the cube in the X axis of each cube. |
[in] | _scaleY | Scale factor for the Y axis of each cube. |
[in] | _scaleZ | Scale fator for the Z axis of each cube. |
[in] | _poolSize | Amount of cubes to be used for outlining. |
[in] | _numLanes | The number of lanes to auto-initialize visuals for |
[in] | _minTolerance | Distance between cubes. |
◆ ~Selector()
Destructor. Cube's destruction will be in charge of the scene's destructor.
◆ DeselectAll()
Deselects all selected regions by calling ResetPopulationMap()
, ClearSelectedBranchPoints()
and ClearSelectedLanes()
◆ GetSelectedBranchPoints()
std::vector< std::string > GetSelectedBranchPoints |
( |
| ) |
|
Gets the currently selected BranchPoints as a string vector.
- Returns
- A vector of the branch_point_id's which are selected.
◆ GetSelectedLanes()
std::vector< std::string > GetSelectedLanes |
( |
| ) |
|
Gets the currently selected lanes as a string vector.
- Returns
- A vector of the lane_id's which are selected.
◆ IsSelected() [1/2]
bool IsSelected |
( |
const maliput::api::Lane * |
_lane | ) |
|
Finds if the passed in lane is currently selected or not.
- Parameters
-
[in] | _lane | Lane to be evaluated. |
- Returns
- Boolean that determines whether the lane is selected or not.
◆ IsSelected() [2/2]
bool IsSelected |
( |
const std::string & |
_id | ) |
|
Finds if mesh corresponding to the id is currently selected or not.
- Parameters
-
[in] | _id | The id to be evaluated. |
- Returns
- Boolean that determines whether the mesh is selected or not.
◆ SelectLane()
void SelectLane |
( |
const maliput::api::Lane * |
_lane | ) |
|
Selects _lane
's mesh when it is not selected, or deselects it when it is selected.
- Parameters
-
[in] | _lane | Lane to be outlined. |
◆ SetVisibility()
void SetVisibility |
( |
bool |
_visible | ) |
|
Hides every cube used and resets the cache.
- Parameters
-
[in] | _visible | Boolean that determines the visibility of the outlining. |
The documentation for this class was generated from the following files: