X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fbeam-scoring-problem.hh;h=fc6e2c6942ea28cc3fa81ca875dc4d605db1f433;hb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;hp=1603a6244470e1956905a860c87a88de9d2b1588;hpb=e071fd8953f7391f206987c0b3dd3195f1727f1c;p=lilypond.git diff --git a/lily/include/beam-scoring-problem.hh b/lily/include/beam-scoring-problem.hh index 1603a62444..fc6e2c6942 100644 --- a/lily/include/beam-scoring-problem.hh +++ b/lily/include/beam-scoring-problem.hh @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1996--2011 Han-Wen Nienhuys + Copyright (C) 1996--2014 Han-Wen Nienhuys Jan Nieuwenhuizen LilyPond is free software: you can redistribute it and/or modify @@ -111,28 +111,26 @@ struct Beam_collision Parameters for a single beam. Precomputed to save time in scoring individual configurations. - TODO - use trailing _ on data members. - */ class Beam_scoring_problem { public: - Beam_scoring_problem (Grob *me, Drul_array ys); + Beam_scoring_problem (Grob *me, Drul_array ys, bool); Drul_array solve () const; private: - Grob *beam_; + Spanner *beam_; Interval unquanted_y_; + bool align_broken_intos_; + bool do_initial_slope_calculations_; Real staff_space_; Real beam_thickness_; Real line_thickness_; Real musical_dy_; - - Interval x_span_; - - vector stem_infos_; + int normal_stem_count_; + Real x_span_; /* Do stem computations. These depend on YL and YR linearly, so we can @@ -142,10 +140,15 @@ private: affine linear in YL and YR. If YL == YR == 0, then we might have stem_y != 0.0, when we're cross staff. */ + vector stem_infos_; + vector chord_start_y_; + vector head_positions_; + vector beam_multiplicity_; + vector is_normal_; vector base_lengths_; vector stem_xpositions_; + vector stem_ypositions_; - Grob *common_[2]; bool is_xstaff_; bool is_knee_; @@ -164,9 +167,16 @@ private: vector collisions_; vector segments_; - void init_stems (); - void init_collisions (vector grobs); + vsize first_normal_index (); + vsize last_normal_index (); + + void init_instance_variables (Grob *me, Drul_array ys, bool align_broken_intos); void add_collision (Real x, Interval y, Real factor); + void no_visible_stem_positions (); + void least_squares_positions (); + Real calc_concaveness (); + void slope_damping (); + void shift_region_to_valid (); void one_scorer (Beam_configuration *config) const; Beam_configuration *force_score (SCM inspect_quants, @@ -180,7 +190,7 @@ private: void score_slope_direction (Beam_configuration *config) const; void score_slope_musical (Beam_configuration *config) const; void score_stem_lengths (Beam_configuration *config) const; - void generate_quants (vector* scores) const; + void generate_quants (vector *scores) const; void score_collisions (Beam_configuration *config) const; };