mirror of https://github.com/CGAL/cgal
Merge pull request #7217 from afabri/Largest_empty_rectangle-ignore_points_on_border-GF
Largest Empty Iso Rectangle: Ignore points on the border
This commit is contained in:
commit
7fe663ce99
|
|
@ -142,9 +142,11 @@ Iso_rectangle_2 get_bounding_box();
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
Inserts point `p` in the point set, if it is not already in the set.
|
||||
Inserts point `p` in the point set, if it is not already in the set
|
||||
and on the bounded side of the bounding rectangle.
|
||||
\note Points on the boundary can be ignored as they lead to the same result.
|
||||
*/
|
||||
void
|
||||
bool
|
||||
insert(const Point_2& p);
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Iso_rectangle_2.h>
|
||||
#include <CGAL/Largest_empty_iso_rectangle_2.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
typedef double Number_Type;
|
||||
typedef CGAL::Simple_cartesian<Number_Type> K;
|
||||
|
|
|
|||
|
|
@ -762,7 +762,7 @@ bool
|
|||
Largest_empty_iso_rectangle_2<T>::insert(const Point_2& _p)
|
||||
{
|
||||
// check that the point is inside the bounding box
|
||||
if(bbox_p.has_on_unbounded_side(_p)) {
|
||||
if(! bbox_p.has_on_bounded_side(_p)) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue