X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fspring.hh;h=fd01ca048cf7bc0ce53506c8b058dae13b244702;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=958d1fa651439a8345c9d011ac39d725b6250d69;hpb=e18531db1f79fb685fbd16d6a2a67bf4b6c09915;p=lilypond.git diff --git a/lily/include/spring.hh b/lily/include/spring.hh index 958d1fa651..fd01ca048c 100644 --- a/lily/include/spring.hh +++ b/lily/include/spring.hh @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1999--2010 Han-Wen Nienhuys + Copyright (C) 1999--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,8 +23,12 @@ #include "lily-proto.hh" #include "smobs.hh" -class Spring +class Spring : public Simple_smob { +public: + static SCM equal_p (SCM, SCM); + static const char type_p_name_[]; +private: Real distance_; Real min_distance_; @@ -35,7 +39,6 @@ class Spring void update_blocking_force (); - DECLARE_SIMPLE_SMOBS (Spring); public: Spring (); Spring (Real distance, Real min_distance); @@ -45,7 +48,7 @@ public: Real inverse_stretch_strength () const {return inverse_stretch_strength_;} Real inverse_compress_strength () const {return inverse_compress_strength_;} Real blocking_force () const {return blocking_force_;} - + Real length (Real f) const; void set_distance (Real); @@ -55,13 +58,13 @@ public: void set_inverse_compress_strength (Real); void set_blocking_force (Real); void set_default_strength (); + void set_default_compress_strength (); + void set_default_stretch_strength (); - void operator*= (Real); - bool operator> (Spring const&) const; + void operator *= (Real); + bool operator > (Spring const &) const; }; -DECLARE_UNSMOB (Spring, spring); Spring merge_springs (vector const &springs); #endif /* SPRING_HH */ -