summaryrefslogtreecommitdiff
path: root/2004/i/nono/src/motor/goto_hermite.h
diff options
context:
space:
mode:
Diffstat (limited to '2004/i/nono/src/motor/goto_hermite.h')
-rw-r--r--2004/i/nono/src/motor/goto_hermite.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/2004/i/nono/src/motor/goto_hermite.h b/2004/i/nono/src/motor/goto_hermite.h
index bc6fb7e..8815e12 100644
--- a/2004/i/nono/src/motor/goto_hermite.h
+++ b/2004/i/nono/src/motor/goto_hermite.h
@@ -36,14 +36,25 @@ class GotoHermite : public Goto
{
typedef std::vector<Point> Points;
Points points_;
+ typedef std::vector<double> Dists;
+ Dists dists_;
double step_;
+ Point lastPoint_;
+ double lastDist_;
static const double stepSize_ = 0.01;
static const double tightness_ = 0.5;
- double ia_, fa_;
+ static const double defaultDi_ = 0.0;
+ static const double defaultDf_ = 600.0;
+ double ia_, fa_, di_, df_;
public:
/// Constructeur.
/// fa : angle final.
GotoHermite (double fa);
+ /// Constructeur.
+ /// fa : angle final.
+ /// di : longueur de la tangente initiale.
+ /// df : longueur de la tangente finale.
+ GotoHermite (double fa, double di, double df);
/// Ajoute un point au chemin.
void add (double x, double y);
/// Initialise le Goto, appelé au début de la trajectoire.
@@ -60,8 +71,9 @@ class GotoHermite : public Goto
/// Test le GotoHermite en affichant la liste des points générés.
void test (std::ostream &os) const;
protected:
- /// Calcule le point au pas step, renvois faux si fini.
- bool computePoint (double step, Point &p) const;
+ /// Calcule le point au pas step et la distance restant à parcourir,
+ /// renvois faux si fini.
+ bool computePoint (double step, Point &p, double &dist) const;
};
#endif // goto_hermite_h