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 709B

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