remove duplicate codes (#16860)

This commit is contained in:
minggo 2016-11-18 09:27:37 +08:00 committed by GitHub
parent 7c6f0598b2
commit 8460fb53e7
1 changed files with 2 additions and 7 deletions

View File

@ -416,13 +416,8 @@ std::vector<cocos2d::Vec2> AutoPolygon::marchSquare(const Rect& rect, const Vec2
_points.back().x = (float)(curx-rect.origin.x) / _scaleFactor;
_points.back().y = (float)(rect.size.height - cury + rect.origin.y) / _scaleFactor;
}
else if(problem)
else
{
//TODO: we triangulation cannot work collinear points, so we need to modify same point a little
//TODO: maybe we can detect if we go into a hole and coming back the hole, we should extract those points and remove them
_points.push_back(Vec2((float)(curx- rect.origin.x) / _scaleFactor, (float)(rect.size.height - cury + rect.origin.y) / _scaleFactor));
}
else{
_points.push_back(Vec2((float)(curx - rect.origin.x) / _scaleFactor, (float)(rect.size.height - cury + rect.origin.y) / _scaleFactor));
}