2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
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
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef SLUR_SCORING_HH
21 #define SLUR_SCORING_HH
24 #include "std-vector.hh"
25 #include "lily-guile.hh"
26 #include "slur-score-parameters.hh"
28 struct Extra_collision_info
36 Extra_collision_info (Grob *g, Real idx, Interval x, Interval y, Real p);
37 Extra_collision_info ();
51 Real get_point (Direction dir) const
69 Interval slur_head_x_extent_;
82 struct Slur_score_state
85 Grob *common_[NO_AXES];
92 vector<Grob*> columns_;
93 vector<Encompass_info> encompass_infos_;
94 vector<Extra_collision_info> extra_encompass_infos_;
97 Slur_score_parameters parameters_;
98 Drul_array<Bound_info> extremes_;
99 Drul_array<Offset> base_attachments_;
100 vector<Slur_configuration*> configurations_;
105 ~Slur_score_state ();
107 Slur_configuration *get_forced_configuration (Interval ys) const;
108 Slur_configuration *get_best_curve () const;
110 Direction slur_direction () const;
112 vector<Offset> generate_avoid_offsets () const;
113 Drul_array<Bound_info> get_bound_info () const;
114 void generate_curves () const;
115 vector<Slur_configuration*> enumerate_attachments (Drul_array<Real> end_ys) const;
116 Drul_array<Offset> get_base_attachments () const;
117 Drul_array<Real> get_y_attachment_range () const;
118 Encompass_info get_encompass_info (Grob *col) const;
119 vector<Extra_collision_info> get_extra_encompass_infos () const;
120 Real move_away_from_staffline (Real y, Grob *on_staff) const;
122 Grob *breakable_bound_item (Direction) const;
125 void set_slur_control_points (Grob *me);
127 #endif /* SLUR_SCORING_HH */