#include "path.h" #include "logwindow.h" Path::Path() { // path.append(PathPoint()); } Path::Path(int) { path.append(PathPoint()); } //用PathPoint数组初始化Path Path::Path(PathPoint points[], int i) { for(int j=0; j delist; for (int n = 0; n < path.size() - 2; n++) { if ( inl(path[n].point, path[n+1].point, path[n+2].point)) delist.append(path[n + 1]); } for (auto n: delist) path.removeOne(n); } void PathPoint::operator=(const PathPoint &another) { point = another.point; dir = another.dir; pointId = another.pointId; action = another.action; }