OLD | NEW |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2006--2012 Joe Neeman <joeneeman@gmail.com> | 4 Copyright (C) 2006--2012 Joe Neeman <joeneeman@gmail.com> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 class Skyline | 51 class Skyline |
52 { | 52 { |
53 private: | 53 private: |
54 list<Building> buildings_; | 54 list<Building> buildings_; |
55 Direction sky_; | 55 Direction sky_; |
56 | 56 |
57 void internal_merge_skyline (list<Building>*, list<Building>*, | 57 void internal_merge_skyline (list<Building>*, list<Building>*, |
58 list<Building> *const result); | 58 list<Building> *const result); |
59 list<Building> internal_build_skyline (list<Box>*, Real, Axis, Direction); | 59 list<Building> internal_build_skyline (list<Box>*, Real, Axis, Direction); |
| 60 list<Building> internal_build_skyline_from_buildings (list<Drul_array<Offset>
>*, Real, Axis, Direction); |
| 61 void shared_building_constructor (vector<Drul_array<Offset> > const &bldgs, Re
al horizon_padding, Axis a, Direction sky); |
60 | 62 |
61 DECLARE_SIMPLE_SMOBS (Skyline); | 63 DECLARE_SIMPLE_SMOBS (Skyline); |
62 | 64 |
63 public: | 65 public: |
64 Skyline (); | 66 Skyline (); |
65 Skyline (Skyline const &src); | 67 Skyline (Skyline const &src); |
66 Skyline (Skyline const &src, Real horizon_padding, Axis a); | 68 Skyline (Skyline const &src, Real horizon_padding, Axis a); |
67 Skyline (Direction sky); | 69 Skyline (Direction sky); |
68 Skyline (vector<Box> const &bldgs, Real horizon_padding, Axis a, Direction sky
); | 70 Skyline (vector<Box> const &bldgs, Real horizon_padding, Axis a, Direction sky
); |
| 71 Skyline (vector<Drul_array<Offset> > const &bldgs, Real horizon_padding, Axis
a, Direction sky); |
| 72 Skyline (vector<Skyline_pair> const &skypairs, Real horizon_padding, Axis a, D
irection sky); |
69 Skyline (Box const &b, Real horizon_padding, Axis a, Direction sky); | 73 Skyline (Box const &b, Real horizon_padding, Axis a, Direction sky); |
70 | 74 |
71 vector<Offset> to_points (Axis) const; | 75 vector<Offset> to_points (Axis) const; |
72 void merge (Skyline const &); | 76 void merge (Skyline const &); |
73 void insert (Box const &, Real horizon_padding, Axis); | 77 void insert (Box const &, Real horizon_padding, Axis); |
74 void print () const; | 78 void print () const; |
75 void print_points () const; | 79 void print_points () const; |
76 void raise (Real); | 80 void raise (Real); |
77 void shift (Real); | 81 void shift (Real); |
78 Real distance (Skyline const &, Real horizon_padding = 0) const; | 82 Real distance (Skyline const &, Real horizon_padding = 0) const; |
79 Real touching_point (Skyline const &, Real horizon_padding = 0) const; | 83 Real touching_point (Skyline const &, Real horizon_padding = 0) const; |
80 Real height (Real airplane) const; | 84 Real height (Real airplane) const; |
81 Real max_height () const; | 85 Real max_height () const; |
82 Real max_height_position () const; | 86 Real max_height_position () const; |
83 void set_minimum_height (Real height); | 87 void set_minimum_height (Real height); |
84 void clear (); | 88 void clear (); |
85 bool is_empty () const; | 89 bool is_empty () const; |
| 90 Real left () const; |
| 91 Real right () const; |
86 | 92 |
87 DECLARE_SCHEME_CALLBACK (get_touching_point, (SCM, SCM, SCM)); | 93 DECLARE_SCHEME_CALLBACK (get_touching_point, (SCM, SCM, SCM)); |
88 DECLARE_SCHEME_CALLBACK (get_distance, (SCM, SCM, SCM)); | 94 DECLARE_SCHEME_CALLBACK (get_distance, (SCM, SCM, SCM)); |
89 DECLARE_SCHEME_CALLBACK (get_max_height, (SCM)); | 95 DECLARE_SCHEME_CALLBACK (get_max_height, (SCM)); |
90 DECLARE_SCHEME_CALLBACK (get_max_height_position, (SCM)); | 96 DECLARE_SCHEME_CALLBACK (get_max_height_position, (SCM)); |
91 DECLARE_SCHEME_CALLBACK (get_height, (SCM, SCM)); | 97 DECLARE_SCHEME_CALLBACK (get_height, (SCM, SCM)); |
92 | 98 |
93 protected: | 99 protected: |
94 Real internal_distance (Skyline const &, Real horizon_padding, Real *touch_poi
nt) const; | 100 Real internal_distance (Skyline const &, Real horizon_padding, Real *touch_poi
nt) const; |
95 }; | 101 }; |
96 | 102 |
97 extern bool debug_skylines; | 103 extern bool debug_skylines; |
98 | 104 |
99 #endif /* SKYLINE_HH */ | 105 #endif /* SKYLINE_HH */ |
100 | 106 |
OLD | NEW |