2 spring.hh -- declare Spring
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
12 #include "lily-proto.hh"
20 Real inverse_stretch_strength_
;
21 Real inverse_compress_strength_
;
25 void update_blocking_force ();
27 DECLARE_SIMPLE_SMOBS (Spring
);
30 Spring (Real distance
, Real min_distance
);
32 Real
distance () const {return distance_
;}
33 Real
min_distance () const {return min_distance_
;}
34 Real
inverse_stretch_strength () const {return inverse_stretch_strength_
;}
35 Real
inverse_compress_strength () const {return inverse_compress_strength_
;}
36 Real
blocking_force () const {return blocking_force_
;}
38 Real
length (Real f
) const;
40 void set_distance (Real
);
41 void set_min_distance (Real
);
42 void set_inverse_stretch_strength (Real
);
43 void set_inverse_compress_strength (Real
);
44 void set_blocking_force (Real
);
45 void set_default_strength ();
47 void operator*= (Real
);
48 bool operator> (Spring
const&) const;
50 DECLARE_UNSMOB (Spring
, spring
);
52 Spring
merge_springs (vector
<Spring
> const &springs
);
54 #endif /* SPRING_HH */