public int getEnd ( int index ) { // Test if the last beginning is the new end if ( index == ( pastIndex - 1 ) ) { return previousBegin - 1 ; } // Otherwise find it! int new_end = 0 ; for ( int i = 0 ; i < index + 1 ; i ++ ) { new_end += getNodeCount ( i ) ; } pastIndex = index ; previousEnd = new_end ; return new_end - 1 ; }
Gets the ending index of a geometry s points given the index of the geometry within the array .