From 971a6d799c4f34eaf865a79029092dee60dfad75 Mon Sep 17 00:00:00 2001 From: JimmyBoivie Date: Mon, 7 Dec 2015 20:24:03 -0500 Subject: [PATCH] apparently you cannot overload methods in java script fun fact --- main/CompGeo.pde | 6 +++--- main/Face.pde | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main/CompGeo.pde b/main/CompGeo.pde index 7c3058a..31b0f8a 100644 --- a/main/CompGeo.pde +++ b/main/CompGeo.pde @@ -52,7 +52,7 @@ public static class CompGeo { else { return true; } } - public static float signedArea(HalfEdge h) { + public static float signedAreaHE(HalfEdge h) { return signedArea(h.getPointsNext()); } @@ -127,7 +127,7 @@ public static class CompGeo { public static HalfEdge findSuperTightBoundary(HalfEdge inner, HalfEdge outer, Point far) { if (outer == null) { return null; } - if ((isContained(inner, outer, far)) && (signedArea(outer) < 0)) { return outer; } + if ((isContained(inner, outer, far)) && (signedAreaHE(outer) < 0)) { return outer; } if (outer.getCounted() == false) { outer.setCounted(true); HalfEdge temp = findSuperTightBoundary(inner, outer.getnext(), far); @@ -147,7 +147,7 @@ public static class CompGeo { } private static HalfEdge findClockWiseRepresentation(HalfEdge ref) { - if (signedArea(ref) >= 0) { return ref; } + if (signedAreaHE(ref) >= 0) { return ref; } if (ref.getCounted() == false) { ref.setCounted(true); HalfEdge temp = findClockWiseRepresentation(ref.getnext()); diff --git a/main/Face.pde b/main/Face.pde index 6307390..a651908 100644 --- a/main/Face.pde +++ b/main/Face.pde @@ -4,7 +4,7 @@ public class Face { ArrayList innerComponents; public Face(HalfEdge ref, PointList points) { - if (CompGeo.signedArea(ref) < 0) { outerComponent = ref; } + if (CompGeo.signedAreaHE(ref) < 0) { outerComponent = ref; } else { outerComponent = CompGeo.findTightOuterBoundary(ref, points); } innerComponents = CompGeo.findFriends(outerComponent, points); } @@ -39,7 +39,7 @@ public class Face { } public boolean inAnInner(HalfEdge inner, Point a, PointList pl) { - if (CompGeo.signedArea(inner) == 0) { return false; } + if (CompGeo.signedAreaHE(inner) == 0) { return false; } if (CompGeo.inside(inner, a, pl.getFar())) { return true; } return false; }