private Iterator < Vector3 > getConvexHullVerticesIterator ( ) { List < Vector3 > ans = new ArrayList < Vector3 > ( ) ; Triangle curr = this . startTriangleHull ; boolean cont = true ; double x0 = bbMin . x , x1 = bbMax . x ; double y0 = bbMin . y , y1 = bbMax . y ; boolean sx , sy ; while ( cont ) { sx = curr . p1 ( ) . x == x0 || curr . p1 ( ) . x == x1 ; sy = curr . p1 ( ) . y == y0 || curr . p1 ( ) . y == y1 ; if ( ( sx && sy ) || ( ! sx && ! sy ) ) { ans . add ( curr . p1 ( ) ) ; } if ( curr . bcnext != null && curr . bcnext . halfplane ) curr = curr . bcnext ; if ( curr == this . startTriangleHull ) cont = false ; } return ans . iterator ( ) ; }
returns an iterator to the set of all the points on the XY - convex hull