Commit 29283d40 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

add adpative triangulation implementation

parent b4b66b81
package org.vadere.util.delaunay;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.ImmutableTriple;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.lang3.tuple.Triple;
import org.vadere.util.geometry.LinkedCellsGrid;
import org.vadere.util.geometry.shapes.VCircle;
import org.vadere.util.geometry.shapes.VLine;
import org.vadere.util.geometry.shapes.VPoint;
......@@ -80,8 +77,6 @@ public class BowyerWatson<P extends VPoint> {
private void handle(final P point) {
HashSet<Line> edges = new HashSet<>();
// This is way to expensive O(n) instead of O(log(n))
Map<Boolean, List<Triple<P, P, P>>> partition = triangles.parallelStream().collect(Collectors.partitioningBy(t -> pointsToTriangle(t).isInCircumscribedCycle(point)));
List<Triple<P, P, P>> badTriangles = partition.get(true);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment