Hesu-eco
/
limiteur_vitesse
premiere ebauche
recommendedspeed.hpp@15:e9560502e463, 2018-12-17 (annotated)
- Committer:
- LipSer
- Date:
- Mon Dec 17 20:15:19 2018 +0000
- Revision:
- 15:e9560502e463
- Parent:
- 10:f0b382368614
fin
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shovelcat | 10:f0b382368614 | 1 | #ifndef RECOMMENDEDSPEED_HPP |
shovelcat | 10:f0b382368614 | 2 | #define RECOMMENDEDSPEED_HPP |
shovelcat | 10:f0b382368614 | 3 | |
shovelcat | 10:f0b382368614 | 4 | #include <vector> |
shovelcat | 10:f0b382368614 | 5 | |
shovelcat | 10:f0b382368614 | 6 | class Segment : public std::vector<float> |
shovelcat | 10:f0b382368614 | 7 | { |
shovelcat | 10:f0b382368614 | 8 | public: |
shovelcat | 10:f0b382368614 | 9 | Segment(std::vector<float> vals); |
shovelcat | 10:f0b382368614 | 10 | |
shovelcat | 10:f0b382368614 | 11 | float getSpeed(); |
shovelcat | 10:f0b382368614 | 12 | void incrementIndex(); |
shovelcat | 10:f0b382368614 | 13 | |
shovelcat | 10:f0b382368614 | 14 | protected: |
shovelcat | 10:f0b382368614 | 15 | int currentIndex; |
shovelcat | 10:f0b382368614 | 16 | }; |
shovelcat | 10:f0b382368614 | 17 | |
shovelcat | 10:f0b382368614 | 18 | class Parcours : public std::vector<Segment> |
shovelcat | 10:f0b382368614 | 19 | { |
shovelcat | 10:f0b382368614 | 20 | public: |
shovelcat | 10:f0b382368614 | 21 | Parcours(); |
shovelcat | 10:f0b382368614 | 22 | |
shovelcat | 10:f0b382368614 | 23 | Segment& getSegment(); |
shovelcat | 10:f0b382368614 | 24 | void incrementIndex(); |
shovelcat | 10:f0b382368614 | 25 | |
shovelcat | 10:f0b382368614 | 26 | protected: |
shovelcat | 10:f0b382368614 | 27 | int currentSegmentIndex; |
shovelcat | 10:f0b382368614 | 28 | }; |
shovelcat | 10:f0b382368614 | 29 | |
shovelcat | 10:f0b382368614 | 30 | #endif |