- Real range_ideal_len (int l, int r)const;
- Real active_blocking_force ()const;
- Real configuration_length ()const;
- void set_active_states ();
- bool active_b () const;
+ void add_spring (Spring const &);
+ Real range_ideal_len (int l, int r) const;
+ Real range_stiffness (int l, int r, bool stretch) const;
+ Real configuration_length (Real) const;
+ vector<Real> spring_positions () const;
+
+ void set_force (Real force);
+ Real force () const;
+ Real force_penalty (bool ragged) const;
+ bool fits () const;
+
+
+private:
+ Real expand_line ();
+ Real compress_line ();
+ Real rod_force (int l, int r, Real dist);
+
+ vector<Spring> springs_;
+ Real line_len_;
+ Real force_;
+ bool ragged_;
+ bool fits_;