Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Timer by
Diff: Map/pointParcours.h
- Revision:
- 80:cd4960dfa47e
- Parent:
- 79:b11b50108ae5
- Child:
- 81:e7b03e81b025
diff -r b11b50108ae5 -r cd4960dfa47e Map/pointParcours.h
--- a/Map/pointParcours.h Thu May 05 15:11:06 2016 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#ifndef POINTPARCOURS_H
-#define POINTPARCOURS_H
-#include "math.h"
-
-#include "controle.h"
-#include "point.h"
-
-typedef struct PP4 PointsParc4;
-
-class pointParcours : public point {
-public:
- pointParcours (float nx, float ny, pointParcours * npere, point arr) : point (nx, ny) {
- if (npere != NULL)
- G2 = sqrt(npere->getG2() + calculDistance2 (nx, ny, npere->getX(), npere->getY ()));
- else
- G2 = 0;
- pere = npere;
- H2 = sqrt (calculDistance2 (nx, ny, arr.getX (), arr.getY ()));
- }
-
- pointParcours (point p, pointParcours * npere, point arr) : point (p) {
- if (pere != NULL)
- G2 = npere->getG2 () + calculDistance2 (p.getX(), p.getY(), npere->getX (), npere->getY ());
- else
- G2 = 0;
- pere = npere;
-
- H2 = sqrt(calculDistance2 (p.getX (), p.getY (), arr.getX (), arr.getY ()));
- }
-
- pointParcours * getPere () { return pere; }
-
- long double getG2 () { return G2; }
- long double getH2 () { return H2; }
- long double getP2 () { return G2 + H2; }
-
- bool operator==(pointParcours& a) {
- // Autre version : return (x == a.getX () && y == a.getY () && a.getP2 () == G2 + H2);
- return (x == a.getX () && y == a.getY ());
- }
-
- bool operator==(point& a) {
- return (x == a.getX () && y == a.getY ());
- }
-
-protected:
- pointParcours * pere;
- long double G2, H2;
-};
-
-struct PP4 {
- pointParcours p0;
- pointParcours p1;
- pointParcours p2;
- pointParcours p3;
-};
-
-#endif
\ No newline at end of file
