Skip to content

Commit

Permalink
Update roofer with cgal60 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ipadjen committed Oct 11, 2024
1 parent 9c212d6 commit 5734f4f
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions thirdparty/roofer/src/reconstruction/ArrangementBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ typedef CGAL::Arr_face_overlay_traits<Arrangement_2,

// An arrangement observer, used to receive notifications of face splits and
// to update the indices of the newly created faces.
class Face_index_observer : public CGAL::Arr_observer<roofer::Arrangement_2>
class Face_index_observer : public CGAL::Arr_observer<Arrangement_2>
{
private:
int n_faces; // The current number of faces.
Expand All @@ -91,12 +91,15 @@ class Face_index_observer : public CGAL::Arr_observer<roofer::Arrangement_2>
float elevation=0;
Plane plane;
public:
Face_index_observer (roofer::Arrangement_2& arr, bool is_footprint, size_t pid, float elevation, Plane plane) :
CGAL::Arr_observer<roofer::Arrangement_2> (arr),
Face_index_observer (Arrangement_2& arr, bool is_footprint, size_t pid, float elevation, Plane plane) :
CGAL::Arr_observer<Arrangement_2> (arr),
n_faces (0), in_footprint(is_footprint), plane_id(pid), elevation(elevation), plane(plane)
{
CGAL_precondition (arr.is_empty());
arr.unbounded_face()->data().is_finite=false;
for (auto uf = arr.unbounded_faces_begin();
uf != arr.unbounded_faces_end(); ++uf) {
uf->data().is_finite = false;
}
n_faces++;
};
virtual void after_split_face (Face_handle old_face,
Expand All @@ -111,18 +114,21 @@ class Face_index_observer : public CGAL::Arr_observer<roofer::Arrangement_2>
n_faces++;
}
};
class Face_split_observer : public CGAL::Arr_observer<roofer::Arrangement_2>
class Face_split_observer : public CGAL::Arr_observer<Arrangement_2>
{
private:
int n_faces; // The current number of faces.
bool hole_mode=false;
public:
Face_split_observer (roofer::Arrangement_2& arr) :
CGAL::Arr_observer<roofer::Arrangement_2> (arr),
Face_split_observer (Arrangement_2& arr) :
CGAL::Arr_observer<Arrangement_2> (arr),
n_faces (0)
{
CGAL_precondition (arr.is_empty());
arr.unbounded_face()->data().in_footprint=false;
for (auto uf = arr.unbounded_faces_begin();
uf != arr.unbounded_faces_end(); ++uf) {
uf->data().is_finite = false;
}
n_faces++;
}
virtual void after_split_face (Face_handle old_face,
Expand Down

0 comments on commit 5734f4f

Please sign in to comment.