2 skyline.hh -- declare Skyline class.
4 source file of the GNU LilyPond music typesetter
6 (c) 2006--2007 Joe Neeman <joeneeman@gmail.com>
16 #include "interval.hh"
17 #include "direction.hh"
18 #include "std-vector.hh"
24 Drul_array<Real> height_;
30 Building (Real start, Real start_height, Real end_height, Real end);
31 Building (Box const &b, Real horizon_padding, Axis a, Direction d);
34 Real height (Real x) const;
35 Real intersection_x (Building const &other) const;
36 void leading_part (Real chop);
37 bool conceals_beginning (Building const &other) const;
38 bool conceals (Building const &other) const;
40 Building sloped_neighbour (Real horizon_padding, Direction d) const;
42 bool operator< (Building const &other)
44 return iv_[LEFT] < other.iv_[LEFT];
51 list<Building> buildings_;
54 void internal_merge_skyline (list<Building>*, list<Building>*,
55 list<Building> *const result);
56 list<Building> internal_build_skyline (list<Building>*);
58 DECLARE_SIMPLE_SMOBS(Skyline);
61 Skyline (Skyline const &src);
62 Skyline (Direction sky);
63 Skyline (vector<Box> const &bldgs, Real horizon_padding, Axis a, Direction sky);
64 Skyline (Box const &b, Real horizon_padding, Axis a, Direction sky);
65 vector<Offset> to_points () const;
66 void merge (Skyline const &);
67 void insert (Box const &, Real horizon_padding, Axis);
71 Real distance (Skyline const &) const;
72 Real height (Real airplane) const;
73 Real max_height () const;
74 void set_minimum_height (Real height);
75 bool is_empty () const;
81 Drul_array<Skyline> skylines_;
83 DECLARE_SIMPLE_SMOBS(Skyline_pair);
86 Skyline_pair (vector<Box> const &boxes, Real horizon_padding, Axis a);
87 Skyline_pair (Box const &, Real horizon_padding, Axis a);
90 void insert (Box const &, Real horizon_padding, Axis);
91 void merge (Skyline_pair const &other);
92 Skyline &operator [] (Direction d);
93 Skyline const &operator [] (Direction d) const;
94 bool is_empty () const;
97 #endif /* SKYLINE_HH */