diff --git a/src/org/poly2tri/Poly2Tri.scala b/src/org/poly2tri/Poly2Tri.scala index 5431747..a3f25fd 100644 --- a/src/org/poly2tri/Poly2Tri.scala +++ b/src/org/poly2tri/Poly2Tri.scala @@ -30,11 +30,6 @@ */ package org.poly2tri -// Based on Raimund Seidel's paper "A simple and fast incremental randomized -// algorithm for computing trapezoidal decompositions and for triangulating polygons" -// See also: "Computational Geometry", 3rd edition, by Mark de Berg et al, Chapter 6.2 -// "Computational Geometry in C", 2nd edition, by Joseph O'Rourke - import org.newdawn.slick.{BasicGame, GameContainer, Graphics, Color, AppGameContainer} import org.newdawn.slick.geom.{Polygon, Circle} diff --git a/src/org/poly2tri/cdt/CDT.scala b/src/org/poly2tri/cdt/CDT.scala new file mode 100644 index 0000000..c6a74cb --- /dev/null +++ b/src/org/poly2tri/cdt/CDT.scala @@ -0,0 +1,41 @@ +/* Poly2Tri + * Copyright (c) 2009, Mason Green + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * Sweep-line, Constrained Delauney Triangulation + * See: Domiter, V. and Žalik, B.(2008)'Sweep-line algorithm for constrained Delaunay triangulation', + * International Journal of Geographical Information Science,22:4,449 — 462 + */ +package org.poly2tri.cdt + +class CDT { + +} diff --git a/src/org/poly2tri/seidel/Triangulator.scala b/src/org/poly2tri/seidel/Triangulator.scala index 5bcec6f..74deefd 100644 --- a/src/org/poly2tri/seidel/Triangulator.scala +++ b/src/org/poly2tri/seidel/Triangulator.scala @@ -37,6 +37,8 @@ import shapes.{Point, Segment, Trapezoid} // Based on Raimund Seidel's paper "A simple and fast incremental randomized // algorithm for computing trapezoidal decompositions and for triangulating polygons" +// See also: "Computational Geometry", 3rd edition, by Mark de Berg et al, Chapter 6.2 +// "Computational Geometry in C", 2nd edition, by Joseph O'Rourke class Triangulator(segments: ArrayBuffer[Segment]) { // Triangle decomposition list