mirror of https://github.com/axmolengine/axmol.git
remove duplicate codes (#16860)
This commit is contained in:
parent
7c6f0598b2
commit
8460fb53e7
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue