simwall2d
parent
68e3c5cca2
commit
c397a99b30
|
@ -25,7 +25,7 @@ bool SimWall2D::equals(const SimWall2D& other, double tol) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
bool SimWall2D::intersects(const SimWall2D& B, boost::optional<Point2&> pt) const {
|
bool SimWall2D::intersects(const SimWall2D& B, Point2* pt) const {
|
||||||
const bool debug = false;
|
const bool debug = false;
|
||||||
|
|
||||||
const SimWall2D& A = *this;
|
const SimWall2D& A = *this;
|
||||||
|
|
|
@ -51,7 +51,15 @@ namespace gtsam {
|
||||||
* returns true if they intersect, with the intersection
|
* returns true if they intersect, with the intersection
|
||||||
* point in the optional second argument
|
* point in the optional second argument
|
||||||
*/
|
*/
|
||||||
bool intersects(const SimWall2D& wall, boost::optional<Point2&> pt=boost::none) const;
|
bool intersects(const SimWall2D& wall, Point2* pt = nullptr) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An overload of intersects that takes an l-value reference to a Point2
|
||||||
|
* instead of a pointer.
|
||||||
|
*/
|
||||||
|
bool intersects(const SimWall2D& wall, Point2& pt) const {
|
||||||
|
return intersects(wall, &pt);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* norm is a 2D point representing the norm of the wall
|
* norm is a 2D point representing the norm of the wall
|
||||||
|
|
Loading…
Reference in New Issue