-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get lane id from clicked lane #217
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but for a few small details. Great addition @BMarchi !
@@ -101,6 +104,9 @@ class MaliputViewerModel { | |||
/// \param[in] _isVisible The new visualization status of the text label. | |||
void SetTextLabelState(MaliputLabelType _type, bool _isVisible); | |||
|
|||
const maliput::api::Lane* GetLaneFromWorldPosition( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BMarchi nit: missing documentation block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: consider changing point
with position
or simply removing it when redundant
if (_e->button() == Qt::LeftButton) | ||
{ | ||
const ignition::rendering::RayQueryResult& rayResult = | ||
this->orbitViewControl->GetQueryResult(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BMarchi indent four spaces here
@@ -79,6 +80,8 @@ class RenderMaliputWidget : public QWidget { | |||
/// \param[in] _e The event that happened. | |||
virtual void paintEvent(QPaintEvent* _e); | |||
|
|||
signals: void VisualClicked(ignition::rendering::RayQueryResult rayResult); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BMarchi nit: missing documentation block
@@ -77,6 +77,8 @@ class OrbitViewControl { | |||
/// \param[in] _e The Qt mouse event. | |||
void OnMouseWheel(const QWheelEvent* _e); | |||
|
|||
const ignition::rendering::RayQueryResult& GetQueryResult() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BMarchi nit: missing documentation block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -101,6 +104,9 @@ class MaliputViewerModel { | |||
/// \param[in] _isVisible The new visualization status of the text label. | |||
void SetTextLabelState(MaliputLabelType _type, bool _isVisible); | |||
|
|||
const maliput::api::Lane* GetLaneFromWorldPosition( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: consider changing point
with position
or simply removing it when redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
For the moment, this works for the maliput viewer. I wanted to use only the maliput viewer model to gather the information but since it's not a QObect, I had to use the widget as a intermediary