2 slur-scoring.hh -- declare Slur_score_parameters
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #ifndef SLUR_SCORING_HH
11 #define SLUR_SCORING_HH
14 #include "lily-proto.hh"
16 #include "lily-guile.hh"
18 struct Slur_score_parameters
21 Real head_encompass_penalty_;
22 Real stem_encompass_penalty_;
23 Real closeness_factor_;
24 Real edge_attraction_factor_;
25 Real same_slope_penalty_;
26 Real steeper_slope_factor_;
27 Real non_horizontal_penalty_;
29 Real max_slope_factor_;
30 Real extra_object_collision_;
31 Real accidental_collision_;
32 Real free_slur_distance_;
33 Real free_head_distance_;
34 Real extra_encompass_free_distance_;
35 Real absolute_closeness_measure_;
36 Real edge_slope_exponent_;
37 Real head_slur_distance_max_ratio_;
38 Real head_slur_distance_factor_;
40 void fill (Grob *him);
45 struct Extra_collision_info
52 Extra_collision_info (Grob *g, Real idx, Interval x, Interval y, Real p)
60 Extra_collision_info ()
80 Real get_point (Direction dir) const
98 Interval slur_head_extent_;
111 struct Slur_score_state
114 Grob *common_[NO_AXES];
116 bool edge_has_beams_;
121 Link_array<Grob> columns_;
122 Array<Encompass_info> encompass_infos_;
123 Array<Extra_collision_info> extra_encompass_infos_;
126 Slur_score_parameters parameters_;
127 Drul_array<Bound_info> extremes_;
128 Drul_array<Offset> base_attachments_;
129 Link_array<Slur_configuration> configurations_;
136 Bezier get_best_curve ();
138 void set_next_direction ();
140 Drul_array<Bound_info> get_bound_info () const;
141 void generate_curves () const;
142 Link_array<Slur_configuration> enumerate_attachments (Drul_array<Real> end_ys) const;
143 Drul_array<Offset> get_base_attachments() const;
144 Drul_array<Real> get_y_attachment_range() const;
145 Encompass_info get_encompass_info (Grob *col) const;
146 Array<Extra_collision_info> get_extra_encompass_infos () const;
147 Real move_away_from_staffline (Real y, Grob *on_staff) const;
148 int get_closest_index (SCM inspect_quants) const;
152 void set_slur_control_points (Grob *me);
154 #endif /* SLUR_SCORING_HH */