Real right () const;
void raise (Real);
void shift (Real);
- void deholify ();
void insert (Box const &, Axis);
void merge (Skyline_pair const &other);
Skyline &operator [] (Direction d);
Skyline (Box const &b, Axis a, Direction sky);
vector<Offset> to_points (Axis) const;
- void deholify ();
void merge (Skyline const &);
void insert (Box const &, Axis);
void print () const;
skylines_[DOWN].raise (r);
}
-void
-Skyline_pair::deholify ()
-{
- skylines_[UP].deholify ();
- skylines_[DOWN].deholify ();
-}
-
void
Skyline_pair::shift (Real r)
{
assert (buildings_.back ().end_ == infinity_f);
}
-void
-Skyline::deholify ()
-{
- // Since a skyline should always be normalized, we can
- // assume that there are never two adjacent empty buildings.
- // That is, if center is empty then left and right are not.
- list<Building>::iterator left = buildings_.begin ();
- list<Building>::iterator center = buildings_.begin ();
- list<Building>::iterator right;
-
- for (right = buildings_.begin (); right != buildings_.end (); right++)
- {
- if (center != buildings_.begin () && center->y_intercept_ == -infinity_f)
- {
- printf ("We are here");
- exit (17); // not-reached
- Real p1 = left->height (left->end_);
- Real p2 = right->height (right->start_);
- *center = Building (center->start_, p1, p2, center->end_);
-
- left = center;
- center = right;
- }
- }
-}
-
void
Skyline::internal_merge_skyline (list<Building> *s1, list<Building> *s2,
list<Building> *const result) const