2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2004--2009 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 ();
52 Real
get_point (Direction dir
) const
70 Interval slur_head_x_extent_
;
83 struct Slur_score_state
86 Grob
*common_
[NO_AXES
];
93 vector
<Grob
*> columns_
;
94 vector
<Encompass_info
> encompass_infos_
;
95 vector
<Extra_collision_info
> extra_encompass_infos_
;
98 Slur_score_parameters parameters_
;
99 Drul_array
<Bound_info
> extremes_
;
100 Drul_array
<Offset
> base_attachments_
;
101 vector
<Slur_configuration
*> configurations_
;
106 ~Slur_score_state ();
108 Bezier
get_best_curve ();
110 void set_next_direction ();
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;
121 int get_closest_index (SCM inspect_quants
) const;
123 Grob
*breakable_bound_item (Direction
) const;
126 void set_slur_control_points (Grob
*me
);
128 #endif /* SLUR_SCORING_HH */