]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/simple-spacer.hh
release: 1.1.4
[lilypond.git] / lily / include / simple-spacer.hh
1 /*   
2   simple-spacer.hh -- declare 
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef SIMPLE_SPACER_HH
11 #define SIMPLE_SPACER_HH
12
13 #include "real.hh"
14 #include "array.hh"
15 #include "lily-proto.hh"
16 #include "list.hh"
17 #include "drul-array.hh"
18
19 struct Rod_info {
20   Real distance_f_;
21   Drul_array<int> cols_;
22 };
23
24 struct Spring_info {
25   /// the ideal distance
26   Real space_f_;
27
28   /// Hooke's constant: how strong are the "springs" attached to columns
29   Real hooke_f_;
30
31   Real blocking_stretch_f_;
32   Rod_info * blocking_rod_l_;
33   void set (Idealspacing *);
34   Spring_info();
35 };
36
37
38 class Simple_spring_spacer {
39   Array<Spring_info> springs_;
40   Pointer_list<Rod_info*> rods_;
41
42   void init ();
43   Array<Real> solve ();
44   
45 };
46
47 #endif /* SIMPLE_SPACER_HH */
48