maliput_viz
ArrowMesh Class Reference

Detailed Description

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>

Public Member Functions

 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...
 

Constructor & Destructor Documentation

◆ 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]_sceneScene pointer to create the cone.
[in]_zOffsetUnits above the pointed object that the cone tip should be.
[in]_scaleFactorFactor to increase/decrease the scale of the arrow based on the distance from the camera to the clicked position.

◆ ~ArrowMesh()

~ArrowMesh ( )
default

Destructor.

Member Function Documentation

◆ 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]_distanceFromCameraHow far the camera is from the clicked point.
[in]_worldPositionWorld position of the cursor ray cast click.

◆ SetVisibility()

void SetVisibility ( bool  _visible)

Toggles the visibility of the arrow.

Parameters
[in]_visibleBoolean that determines if the arrow should be visible or not.

◆ Update()

void Update ( )

Updates the position of the arrow moving slightly the z axis.


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