Renders a cone which will act as a pointing arrow when the user clicks over a lane.
#include <src/maliput_viz/plugins/arrow_mesh.hh>
|
| ArrowMesh (ignition::rendering::ScenePtr &_scene, double _zOffset=2.0, double _scaleFactor=0.025) |
| Creates a cone and adds it as a child to the RootVisual of the scene, which will move upwards and downwards for a fixed amount of ticks. More...
|
|
| ~ArrowMesh ()=default |
| Destructor. More...
|
|
void | SelectAt (double _distanceFromCamera, const ignition::math::Vector3d &_worldPosition) |
| Moves the arrow to a given world position and resets the downwards movement. More...
|
|
void | SetVisibility (bool _visible) |
| Toggles the visibility of the arrow. More...
|
|
void | Update () |
| Updates the position of the arrow moving slightly the z axis. More...
|
|
◆ ArrowMesh()
ArrowMesh |
( |
ignition::rendering::ScenePtr & |
_scene, |
|
|
double |
_zOffset = 2.0 , |
|
|
double |
_scaleFactor = 0.025 |
|
) |
| |
Creates a cone and adds it as a child to the RootVisual of the scene, which will move upwards and downwards for a fixed amount of ticks.
- Parameters
-
[in] | _scene | Scene pointer to create the cone. |
[in] | _zOffset | Units above the pointed object that the cone tip should be. |
[in] | _scaleFactor | Factor to increase/decrease the scale of the arrow based on the distance from the camera to the clicked position. |
◆ ~ArrowMesh()
◆ SelectAt()
void SelectAt |
( |
double |
_distanceFromCamera, |
|
|
const ignition::math::Vector3d & |
_worldPosition |
|
) |
| |
Moves the arrow to a given world position and resets the downwards movement.
- Parameters
-
[in] | _distanceFromCamera | How far the camera is from the clicked point. |
[in] | _worldPosition | World position of the cursor ray cast click. |
◆ SetVisibility()
void SetVisibility |
( |
bool |
_visible | ) |
|
Toggles the visibility of the arrow.
- Parameters
-
[in] | _visible | Boolean that determines if the arrow should be visible or not. |
◆ Update()
Updates the position of the arrow moving slightly the z axis.
The documentation for this class was generated from the following files: