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"
27 void precompute (Real start, Real start_height, Real end_height, Real end);
28 Building (Real start, Real start_height, Real end_height, Real end);
29 Building (Box const &b, Real horizon_padding, Axis a, Direction d);
32 Real height (Real x) const;
33 Real intersection_x (Building const &other) const;
34 void leading_part (Real chop);
35 bool conceals (Building const &other, Real x) const;
36 Building sloped_neighbour (Real start, Real horizon_padding, Direction d) const;
42 list<Building> buildings_;
45 void internal_merge_skyline (list<Building>*, list<Building>*,
46 list<Building> *const result);
47 list<Building> internal_build_skyline (list<Box>*, Real, Axis, Direction);
49 DECLARE_SIMPLE_SMOBS(Skyline);
52 Skyline (Skyline const &src);
53 Skyline (Direction sky);
54 Skyline (vector<Box> const &bldgs, Real horizon_padding, Axis a, Direction sky);
55 Skyline (Box const &b, Real horizon_padding, Axis a, Direction sky);
56 vector<Offset> to_points (Axis) const;
57 void merge (Skyline const &);
58 void insert (Box const &, Real horizon_padding, Axis);
62 Real distance (Skyline const &) const;
63 Real height (Real airplane) const;
64 Real max_height () const;
65 void set_minimum_height (Real height);
66 bool is_empty () const;
72 Drul_array<Skyline> skylines_;
74 DECLARE_SIMPLE_SMOBS(Skyline_pair);
77 Skyline_pair (vector<Box> const &boxes, Real horizon_padding, Axis a);
78 Skyline_pair (Box const &, Real horizon_padding, Axis a);
81 void insert (Box const &, Real horizon_padding, Axis);
82 void merge (Skyline_pair const &other);
83 Skyline &operator [] (Direction d);
84 Skyline const &operator [] (Direction d) const;
85 bool is_empty () const;
88 #endif /* SKYLINE_HH */