private static Heap<AngleInterval> findIntervals(LinkedList<Vertex> vertices)
    {
        Heap<AngleInterval> intervals = new Heap<>(15, new DirectionComparator());
//if src is Point, wall part of the angle should be a sector where everything
//is obstructed, no matter how close the other vertex is.
        if (src.getClass() == Point.class)
            intervals.insert(new AngleInterval());
        
        while (vertices.hasNext())
        {
            Vertex v = vertices.getNext();
            if (src == v || v.getClass() != Point.class)
                continue;
            Point q = (Point)v;
            if (src == q || q.getRight() == null || q.getRight() == src)
                continue;
            AngleInterval ai = new AngleInterval(q);
            intervals.insert(ai);
        }
        vertices.reset();
        return intervals;
    }