2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1999--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/>.
23 #include "lily-proto.hh"
31 Real inverse_stretch_strength_;
32 Real inverse_compress_strength_;
36 void update_blocking_force ();
38 DECLARE_SIMPLE_SMOBS (Spring);
41 Spring (Real distance, Real min_distance);
43 Real distance () const {return distance_;}
44 Real min_distance () const {return min_distance_;}
45 Real inverse_stretch_strength () const {return inverse_stretch_strength_;}
46 Real inverse_compress_strength () const {return inverse_compress_strength_;}
47 Real blocking_force () const {return blocking_force_;}
49 Real length (Real f) const;
51 void set_distance (Real);
52 void set_min_distance (Real);
53 void ensure_min_distance (Real);
54 void set_inverse_stretch_strength (Real);
55 void set_inverse_compress_strength (Real);
56 void set_blocking_force (Real);
57 void set_default_strength ();
58 void set_default_compress_strength ();
59 void set_default_stretch_strength ();
61 void operator *= (Real);
62 bool operator > (Spring const &) const;
64 DECLARE_UNSMOB (Spring, spring);
66 Spring merge_springs (vector<Spring> const &springs);
68 #endif /* SPRING_HH */