Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
greymfm committed Oct 24, 2023
1 parent b77c583 commit 48ebfc0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sunray/map.cpp
Expand Up @@ -1146,26 +1146,25 @@ bool Map::mowingCompleted(){
return (mowPointsIdx >= mowPoints.numPoints-1);
}

// find start point for path finder on line from src to dst
// that is insider perimeter and outside exclusions
// check if point is inside perimeter and outside exclusions/obstacles
bool Map::checkpoint(float x, float y){
Point src;
src.setXY(x, y);
if (!maps.pointIsInsidePolygon( maps.perimeterPoints, src)){
return true;
return false;
}
for (int i=0; i < maps.exclusions.numPolygons; i++){
if (maps.pointIsInsidePolygon( maps.exclusions.polygons[i], src)){
return true;
return false;
}
}
for (int i=0; i < obstacles.numPolygons; i++){
if (maps.pointIsInsidePolygon( maps.obstacles.polygons[i], src)){
return true;
return false;
}
}

return false;
return true;
}

// find start point for path finder on line from src to dst
Expand Down

0 comments on commit 48ebfc0

Please sign in to comment.