mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-12-02 10:13:29 +01:00
misc
This commit is contained in:
parent
bd128eb4e3
commit
13f7db5986
@ -40,14 +40,16 @@ class EarClip {
|
|||||||
|
|
||||||
def triangulatePolygon(x: Array[Float], y: Array[Float], vn: Int, results: Array[Triangle]): Int = {
|
def triangulatePolygon(x: Array[Float], y: Array[Float], vn: Int, results: Array[Triangle]): Int = {
|
||||||
|
|
||||||
|
/*
|
||||||
val p1 = Point(x(0), y(0))
|
val p1 = Point(x(0), y(0))
|
||||||
val p2 = Point(x(1), y(1))
|
val p2 = Point(x(1), y(1))
|
||||||
val p3 = Point(x(2), y(2))
|
val p3 = Point(x(2), y(2))
|
||||||
|
|
||||||
val ccw = Util.orient2d(p1, p2, p3) > 0
|
val ccw = Util.orient2d(p1, p2, p3) > 0
|
||||||
|
*/
|
||||||
|
|
||||||
val xv = if(ccw) x else x.reverse.toArray
|
val xv = x.reverse.toArray
|
||||||
val yv = if(ccw) y else y.reverse.toArray
|
val yv = y.reverse.toArray
|
||||||
|
|
||||||
if (vn < 3) return 0
|
if (vn < 3) return 0
|
||||||
var vNum = vn
|
var vNum = vn
|
||||||
|
Loading…
Reference in New Issue
Block a user