Skip to content

Commit

Permalink
migracja 23 - upraszczanie krawędzi
Browse files Browse the repository at this point in the history
usunięcie assercji
z grubsza sąsiadujące krawędzie są tak samo uproszczone, ale wciąz są przypadki gdy to nie działa. Potem poprawić sprawdzanie linii prostej bo tak średnio teraz to działa
  • Loading branch information
mudiaTest committed Feb 17, 2015
1 parent ae78620 commit c49e621
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Migracja/VectorGroup.cs
Expand Up @@ -1071,8 +1071,13 @@ public void SimplifyPointAdvListPhase2()
GeoEdgePoint startPoint = geoPointList[0];
GeoEdgePoint middlePoint;
GeoEdgePoint endPoint;
startPoint.SetCheckedPhase2();
parentMapFactory.pointAdvArr[startPoint.pictX][startPoint.pictY].SetCheckedPhase2();

if (!startPoint.IsCheckedPhase2())
{
startPoint.SetCheckedPhase2();
parentMapFactory.pointAdvArr[startPoint.pictX][startPoint.pictY].SetCheckedPhase2();
}

int endId;
List<GeoEdgePoint> lstPointsToDelete = new List<GeoEdgePoint>();
List<GeoEdgePoint> lstPointsToCheck = new List<GeoEdgePoint>();
Expand Down Expand Up @@ -1153,8 +1158,14 @@ public void SimplifyPointAdvListPhase2()
i++;
//ustalamy, ze ten punkt przeszedł już upraszczanie fazy drugiej. i++ spowoduje, że endPoint
//nigdy nie będzie w tej pętli uznany za middle, więc jego typ musimy ustalić tutaj
endPoint.SetCheckedPhase2();
parentMapFactory.pointAdvArr[endPoint.pictX][endPoint.pictY].SetCheckedPhase2();

if (!endPoint.IsCheckedPhase2())
{
endPoint.SetCheckedPhase2();
parentMapFactory.pointAdvArr[endPoint.pictX][endPoint.pictY].SetCheckedPhase2();
}


}
//ustalamy, ze ten punkt przeszedł już upraszczanie fazy drugiej
if (!middlePoint.IsCheckedPhase2())
Expand Down

0 comments on commit c49e621

Please sign in to comment.