Start with Capture Route
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @file route.cpp
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-01-31
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#include "route.h"
|
||||
|
||||
Route::Route() {
|
||||
|
||||
}
|
||||
|
||||
void Route::addPointToRoute(Point point) {
|
||||
this->points.push_back(point);
|
||||
}
|
||||
|
||||
Point Route::startRoute() {
|
||||
*this->it = this->points.begin();
|
||||
return **this->it;
|
||||
}
|
||||
|
||||
Point Route::getNextPoint() {
|
||||
if (*this->it != this->points.end())
|
||||
return **this->it;
|
||||
else
|
||||
return Point(0, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user