Class S2Polygon.S2LoopSequenceIndex

    • Field Detail

      • indexToLoop

        private final int[] indexToLoop
        Map from the uni-dimensional edge index to the loop this edge belongs to.
      • loopToFirstIndex

        private final int[] loopToFirstIndex
        Reverse of indexToLoop: maps a loop index to the uni-dimensional index of the first edge in the loop.
    • Constructor Detail

      • S2LoopSequenceIndex

        public S2LoopSequenceIndex​(int[] numVertices)
        Must be called by each subclass with the array of vertices per loop. The length of the array is the number of loops, and the i th loop's vertex count is in the i th index of the array.