simwall2d

release/4.3a0
kartik arcot 2023-01-13 11:02:23 -08:00
parent 68e3c5cca2
commit c397a99b30
2 changed files with 10 additions and 2 deletions

View File

@ -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 SimWall2D& A = *this;

View File

@ -51,7 +51,15 @@ namespace gtsam {
* returns true if they intersect, with the intersection
* 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