summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep')
-rw-r--r--src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc18
-rw-r--r--src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep_context.cc2
2 files changed, 3 insertions, 17 deletions
diff --git a/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc b/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc
index e02226bd1..ed7c49ac4 100644
--- a/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc
+++ b/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep.cc
@@ -231,7 +231,7 @@ void Sweep::FillAdvancingFront(SweepContext& tcx, Node& n)
while (node->next) {
double angle = HoleAngle(*node);
- if (angle > M_PI_2 || angle < -M_PI_2) break;
+ if (angle > PI_2 || angle < -PI_2) break;
Fill(tcx, *node);
node = node->next;
}
@@ -241,7 +241,7 @@ void Sweep::FillAdvancingFront(SweepContext& tcx, Node& n)
while (node->prev) {
double angle = HoleAngle(*node);
- if (angle > M_PI_2 || angle < -M_PI_2) break;
+ if (angle > PI_2 || angle < -PI_2) break;
Fill(tcx, *node);
node = node->prev;
}
@@ -652,13 +652,6 @@ void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t,
Triangle& ot = t->NeighborAcross(p);
Point& op = *ot.OppositePoint(*t, p);
- if (&ot == NULL) {
- // If we want to integrate the fillEdgeEvent do it here
- // With current implementation we should never get here
- //throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle");
- assert(0);
- }
-
if (InScanArea(p, *t->PointCCW(p), *t->PointCW(p), op)) {
// Lets rotate shared edge one vertex CW
RotateTrianglePair(*t, p, ot, op);
@@ -728,13 +721,6 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle&
Triangle& ot = t.NeighborAcross(p);
Point& op = *ot.OppositePoint(t, p);
- if (&t.NeighborAcross(p) == NULL) {
- // If we want to integrate the fillEdgeEvent do it here
- // With current implementation we should never get here
- //throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle");
- assert(0);
- }
-
if (InScanArea(eq, *flip_triangle.PointCCW(eq), *flip_triangle.PointCW(eq), op)) {
// flip with new edge op->eq
FlipEdgeEvent(tcx, eq, op, &ot, op);
diff --git a/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep_context.cc b/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep_context.cc
index c9dd5a8c4..235e1eb05 100644
--- a/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep_context.cc
+++ b/src/3rdparty/assimp/contrib/poly2tri/poly2tri/sweep/sweep_context.cc
@@ -164,7 +164,7 @@ void SweepContext::RemoveFromMap(Triangle* triangle)
void SweepContext::MeshClean(Triangle& triangle)
{
- if (&triangle != NULL && !triangle.IsInterior()) {
+ if (!triangle.IsInterior()) {
triangle.IsInterior(true);
triangles_.push_back(&triangle);
for (int i = 0; i < 3; i++) {