Skip to content
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

Add function to test if two line segments intersect. #525

Merged
merged 3 commits into from
Oct 22, 2018

Conversation

malban
Copy link

@malban malban commented Oct 22, 2018

No description provided.

@malban malban requested a review from pjreed October 22, 2018 15:56
* In the case of parallel overlapping segments, the intersection point
* closest to p1 is returned.
*
* @param[in] p1 First point of line segemnt 1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in segemnt.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed typo in this function and the existing function above it.

* @returns True if the line segments intersect.
*/
bool LineSegmentIntersection(
cv::Vec2d p1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the in-arguments to both this and PointOnLineSegment can probably be const references.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the parameters in this function and the existing function above it.

@malban
Copy link
Author

malban commented Oct 22, 2018

Sigh...

@malban malban merged commit d4d8b12 into swri-robotics:master Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants