private void accumulateVisibilityPoints(List<OSMNode> nodes, VLPolygon polygon,
List<VLPoint> visibilityPoints, List<OSMNode> visibilityNodes, boolean hole) {
int n = polygon.vertices.size();
for (int i = 0; i < n; ++i) {
OSMNode curNode = nodes.get(i);
VLPoint cur = polygon.vertices.get(i);
VLPoint prev = polygon.vertices.get((i + n - 1) % n);
VLPoint next = polygon.vertices.get((i + 1) % n);
if (hole
|| (cur.x - prev.x) * (next.y - cur.y) - (cur.y - prev.y) * (next.x - cur.x) > 0) {
// that math up there is a cross product to check
// if the point is concave. Note that the sign is reversed because
// visilibity is either ccw or latitude-major