Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

utils.h 723B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. class LFRPoint
  3. {
  4. private:
  5. /* data */
  6. public:
  7. double x, y;
  8. LFRPoint(/* args */);
  9. LFRPoint(double x, double y);
  10. ~LFRPoint();
  11. LFRPoint operator-(const LFRPoint& pt){return LFRPoint(x-pt.x, y-pt.y);}
  12. LFRPoint operator+(const LFRPoint& pt){return LFRPoint(x+pt.x, y+pt.y);}
  13. };
  14. class LFRVector : public LFRPoint
  15. {
  16. private:
  17. /* data */
  18. public:
  19. LFRVector(/* args */);
  20. LFRVector(double x, double y);
  21. LFRVector(const LFRPoint& pt);
  22. ~LFRVector();
  23. };
  24. class LFRLine
  25. {
  26. private:
  27. /* data */
  28. public:
  29. LFRPoint start;
  30. LFRVector dir;
  31. LFRLine(/* args */);
  32. LFRLine(LFRPoint start, LFRVector dir);
  33. LFRLine(LFRPoint start, LFRPoint end);
  34. ~LFRLine();
  35. };