use crate::constants::{NUM_BASE_CELLS, NUM_ICOSA_FACES};
use crate::types::{CoordIJK, Direction, FaceIJK};
use crate::{H3Index, H3_NULL};
#[derive(Debug, Clone, Copy)]
pub(crate) struct BaseCellData {
pub home_fijk: FaceIJK,
pub is_pentagon: bool, pub cw_offset_pent: [i32; 2],
}
pub(crate) const INVALID_BASE_CELL: i32 = 127;
#[rustfmt::skip]
pub(crate) static BASE_CELL_NEIGHBORS: [[i32; 7]; NUM_BASE_CELLS as usize] = [
[0, 1, 5, 2, 4, 3, 8], [1, 7, 6, 9, 0, 3, 2], [2, 6, 10, 11, 0, 1, 5], [3, 13, 1, 7, 4, 12, 0], [4, INVALID_BASE_CELL, 15, 8, 3, 0, 12], [5, 2, 18, 10, 8, 0, 16], [6, 14, 11, 17, 1, 9, 2], [7, 21, 9, 19, 3, 13, 1], [8, 5, 22, 16, 4, 0, 15], [9, 19, 14, 20, 1, 7, 6], [10, 11, 24, 23, 5, 2, 18], [11, 17, 23, 25, 2, 6, 10], [12, 28, 13, 26, 4, 15, 3], [13, 26, 21, 29, 3, 12, 7], [14, INVALID_BASE_CELL, 17, 27, 9, 20, 6], [15, 22, 28, 31, 4, 8, 12], [16, 18, 33, 30, 8, 5, 22], [17, 11, 14, 6, 35, 25, 27], [18, 24, 30, 32, 5, 10, 16], [19, 34, 20, 36, 7, 21, 9], [20, 14, 19, 9, 40, 27, 36], [21, 38, 19, 34, 13, 29, 7], [22, 16, 41, 33, 15, 8, 31], [23, 24, 11, 10, 39, 37, 25], [24, INVALID_BASE_CELL, 32, 37, 10, 23, 18], [25, 23, 17, 11, 45, 39, 35], [26, 42, 29, 43, 12, 28, 13], [27, 40, 35, 46, 14, 20, 17], [28, 31, 42, 44, 12, 15, 26], [29, 43, 38, 47, 13, 26, 21], [30, 32, 48, 50, 16, 18, 33], [31, 41, 44, 53, 15, 22, 28], [32, 30, 24, 18, 52, 50, 37], [33, 30, 49, 48, 22, 16, 41], [34, 19, 38, 21, 54, 36, 51], [35, 46, 45, 56, 17, 27, 25], [36, 20, 34, 19, 55, 40, 54], [37, 39, 52, 57, 24, 23, 32], [38, INVALID_BASE_CELL, 34, 51, 29, 47, 21], [39, 37, 25, 23, 59, 57, 45], [40, 27, 36, 20, 60, 46, 55], [41, 49, 53, 61, 22, 33, 31], [42, 58, 43, 62, 28, 44, 26], [43, 62, 47, 64, 26, 42, 29], [44, 53, 58, 65, 28, 31, 42], [45, 39, 35, 25, 63, 59, 56], [46, 60, 56, 68, 27, 40, 35], [47, 38, 43, 29, 69, 51, 64], [48, 49, 30, 33, 67, 66, 50], [49, INVALID_BASE_CELL, 61, 66, 33, 48, 41], [50, 48, 32, 30, 70, 67, 52], [51, 69, 54, 71, 38, 47, 34], [52, 57, 70, 74, 32, 37, 50], [53, 61, 65, 75, 31, 41, 44], [54, 71, 55, 73, 34, 51, 36], [55, 40, 54, 36, 72, 60, 73], [56, 68, 63, 77, 35, 46, 45], [57, 59, 74, 78, 37, 39, 52], [58, INVALID_BASE_CELL, 62, 76, 44, 65, 42], [59, 63, 78, 79, 39, 45, 57], [60, 72, 68, 80, 40, 55, 46], [61, 53, 49, 41, 81, 75, 66], [62, 43, 58, 42, 82, 64, 76], [63, INVALID_BASE_CELL, 56, 45, 79, 59, 77], [64, 47, 62, 43, 84, 69, 82], [65, 58, 53, 44, 86, 76, 75], [66, 67, 81, 85, 49, 48, 61], [67, 66, 50, 48, 87, 85, 70], [68, 56, 60, 46, 90, 77, 80], [69, 51, 64, 47, 89, 71, 84], [70, 67, 52, 50, 83, 87, 74], [71, 89, 73, 91, 51, 69, 54], [72, INVALID_BASE_CELL, 73, 55, 80, 60, 88], [73, 91, 72, 88, 54, 71, 55], [74, 78, 83, 92, 52, 57, 70], [75, 65, 61, 53, 94, 86, 81], [76, 86, 82, 96, 58, 65, 62], [77, 63, 68, 56, 93, 79, 90], [78, 74, 59, 57, 95, 92, 79], [79, 78, 63, 59, 93, 95, 77], [80, 68, 72, 60, 99, 90, 88], [81, 85, 94, 101, 61, 66, 75], [82, 96, 84, 98, 62, 76, 64], [83, INVALID_BASE_CELL, 74, 70, 100, 87, 92], [84, 69, 82, 64, 97, 89, 98], [85, 87, 101, 102, 66, 67, 81], [86, 76, 75, 65, 104, 96, 94], [87, 83, 102, 100, 67, 70, 85], [88, 72, 91, 73, 99, 80, 105], [89, 97, 91, 103, 69, 84, 71], [90, 77, 80, 68, 106, 93, 99], [91, 73, 89, 71, 105, 88, 103], [92, 83, 78, 74, 108, 100, 95], [93, 79, 90, 77, 109, 95, 106], [94, 86, 81, 75, 107, 104, 101], [95, 92, 79, 78, 109, 108, 93], [96, 104, 98, 110, 76, 86, 82], [97, INVALID_BASE_CELL, 98, 84, 103, 89, 111], [98, 110, 97, 111, 82, 96, 84], [99, 80, 105, 88, 106, 90, 113], [100, 102, 83, 87, 108, 114, 92], [101, 102, 107, 112, 81, 85, 94], [102, 101, 87, 85, 114, 112, 100], [103, 91, 97, 89, 116, 105, 111], [104, 107, 110, 115, 86, 94, 96], [105, 88, 103, 91, 113, 99, 116], [106, 93, 99, 90, 117, 109, 113], [107, INVALID_BASE_CELL, 101, 94, 115, 104, 112], [108, 100, 95, 92, 118, 114, 109], [109, 108, 93, 95, 117, 118, 106], [110, 98, 104, 96, 119, 111, 115], [111, 97, 110, 98, 116, 103, 119], [112, 107, 102, 101, 120, 115, 114], [113, 99, 116, 105, 117, 106, 121], [114, 112, 100, 102, 118, 120, 108], [115, 110, 107, 104, 120, 119, 112], [116, 103, 119, 111, 113, 105, 121], [117, INVALID_BASE_CELL, 109, 118, 113, 121, 106], [118, 120, 108, 114, 117, 121, 109], [119, 111, 115, 110, 121, 116, 120], [120, 115, 114, 112, 121, 119, 118], [121, 116, 120, 119, 117, 113, 118], ];
#[rustfmt::skip]
pub(crate) static BASE_CELL_NEIGHBOR_60CCW_ROTS: [[i32; 7]; NUM_BASE_CELLS as usize] = [
[0, 5, 0, 0, 1, 5, 1], [0, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 5, 0], [0, 5, 0, 0, 2, 5, 1], [0, -1, 1, 0, 3, 4, 2], [0, 0, 1, 0, 1, 0, 1], [0, 0, 0, 3, 5, 5, 0], [0, 0, 0, 0, 0, 5, 0], [0, 5, 0, 0, 0, 5, 1], [0, 0, 1, 3, 0, 0, 1], [0, 0, 1, 3, 0, 0, 1], [0, 3, 3, 3, 0, 0, 0], [0, 5, 0, 0, 3, 5, 1], [0, 0, 1, 0, 1, 0, 1], [0, -1, 3, 0, 5, 2, 0], [0, 5, 0, 0, 4, 5, 1], [0, 0, 0, 0, 0, 5, 0], [0, 3, 3, 3, 3, 0, 3], [0, 0, 0, 3, 5, 5, 0], [0, 3, 3, 3, 0, 0, 0], [0, 3, 3, 3, 0, 3, 0], [0, 0, 0, 3, 5, 5, 0], [0, 0, 1, 0, 1, 0, 1], [0, 3, 3, 3, 0, 3, 0], [0, -1, 3, 0, 5, 2, 0], [0, 0, 0, 3, 0, 0, 3], [0, 0, 0, 0, 0, 5, 0], [0, 3, 0, 0, 0, 3, 3], [0, 0, 1, 0, 1, 0, 1], [0, 0, 1, 3, 0, 0, 1], [0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0], [0, 3, 3, 3, 3, 0, 3], [0, 0, 1, 3, 0, 0, 1], [0, 3, 3, 3, 3, 0, 3], [0, 0, 3, 0, 3, 0, 3], [0, 0, 0, 3, 0, 0, 3], [0, 3, 0, 0, 0, 3, 3], [0, -1, 3, 0, 5, 2, 0], [0, 3, 0, 0, 3, 3, 0], [0, 3, 0, 0, 3, 3, 0], [0, 0, 0, 3, 5, 5, 0], [0, 0, 0, 3, 5, 5, 0], [0, 3, 3, 3, 0, 0, 0], [0, 0, 1, 3, 0, 0, 1], [0, 0, 3, 0, 0, 3, 3], [0, 0, 0, 3, 0, 3, 0], [0, 3, 3, 3, 0, 3, 0], [0, 3, 3, 3, 0, 3, 0], [0, -1, 3, 0, 5, 2, 0], [0, 0, 0, 3, 0, 0, 3], [0, 3, 0, 0, 0, 3, 3], [0, 0, 3, 0, 3, 0, 3], [0, 3, 3, 3, 0, 0, 0], [0, 0, 3, 0, 3, 0, 3], [0, 0, 3, 0, 0, 3, 3], [0, 3, 3, 3, 0, 0, 3], [0, 0, 0, 3, 0, 3, 0], [0, -1, 3, 0, 5, 2, 0], [0, 3, 3, 3, 3, 3, 0], [0, 3, 3, 3, 3, 3, 0], [0, 3, 3, 3, 3, 0, 3], [0, 3, 3, 3, 3, 0, 3], [0, -1, 3, 0, 5, 2, 0], [0, 0, 0, 3, 0, 0, 3], [0, 3, 3, 3, 0, 3, 0], [0, 3, 0, 0, 0, 3, 3], [0, 3, 0, 0, 3, 3, 0], [0, 3, 3, 3, 0, 0, 0], [0, 3, 0, 0, 3, 3, 0], [0, 0, 3, 0, 0, 3, 3], [0, 0, 0, 3, 0, 3, 0], [0, -1, 3, 0, 5, 2, 0], [0, 3, 3, 3, 0, 0, 3], [0, 3, 3, 3, 0, 0, 3], [0, 0, 0, 3, 0, 0, 3], [0, 3, 0, 0, 0, 3, 3], [0, 0, 0, 3, 0, 5, 0], [0, 3, 3, 3, 0, 0, 0], [0, 0, 1, 3, 1, 0, 1], [0, 0, 1, 3, 1, 0, 1], [0, 0, 3, 0, 3, 0, 3], [0, 0, 3, 0, 3, 0, 3], [0, -1, 3, 0, 5, 2, 0], [0, 0, 3, 0, 0, 3, 3], [0, 0, 0, 3, 0, 3, 0], [0, 3, 0, 0, 3, 3, 0], [0, 3, 3, 3, 3, 3, 0], [0, 0, 0, 3, 0, 5, 0], [0, 3, 3, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 1], [0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 3, 0, 5, 0], [0, 5, 0, 0, 5, 5, 0], [0, 0, 3, 0, 0, 3, 3], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 3, 0, 3, 0], [0, -1, 3, 0, 5, 2, 0], [0, 3, 3, 3, 0, 0, 3], [0, 5, 0, 0, 5, 5, 0], [0, 0, 1, 3, 1, 0, 1], [0, 3, 3, 3, 0, 0, 3], [0, 3, 3, 3, 0, 0, 0], [0, 0, 1, 3, 1, 0, 1], [0, 3, 3, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 3, 5, 1], [0, -1, 3, 0, 5, 2, 0], [0, 5, 0, 0, 5, 5, 0], [0, 0, 1, 0, 4, 5, 1], [0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 3, 0, 5, 0], [0, 0, 0, 3, 0, 5, 0], [0, 0, 1, 0, 2, 5, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 3, 1, 0, 1], [0, 5, 0, 0, 5, 5, 0], [0, -1, 1, 0, 3, 4, 2], [0, 0, 1, 0, 0, 5, 1], [0, 0, 0, 0, 0, 0, 1], [0, 5, 0, 0, 5, 5, 0], [0, 0, 1, 0, 1, 5, 1], ];
#[rustfmt::skip]
pub(crate) static BASE_CELL_DATA: [BaseCellData; NUM_BASE_CELLS as usize] = [
BaseCellData { home_fijk: FaceIJK { face: 1, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 2, coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 1, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 2, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 0, coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 1, coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 1, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 2, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 0, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 2, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 1, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 1, coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 3, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 3, coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 11,coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [2, 6] }, BaseCellData { home_fijk: FaceIJK { face: 4, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 0, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 6, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 0, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 2, coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 7, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 2, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 0, coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 6, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 10,coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [1, 5] }, BaseCellData { home_fijk: FaceIJK { face: 6, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 3, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 11,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 4, coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 3, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 0, coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 4, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 5, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 0, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 7, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 11,coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 7, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 10,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 12,coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [3, 7] }, BaseCellData { home_fijk: FaceIJK { face: 6, coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 7, coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 4, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 3, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 3, coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 4, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 6, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 11,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 8, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 5, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 14,coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [0, 9] }, BaseCellData { home_fijk: FaceIJK { face: 5, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 12,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 10,coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 4, coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 12,coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 7, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 11,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 10,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 13,coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [4, 8] }, BaseCellData { home_fijk: FaceIJK { face: 10,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 11,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 9, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 8, coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 6, coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [11,15] }, BaseCellData { home_fijk: FaceIJK { face: 8, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 9, coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 14,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 5, coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 16,coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 8, coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 5, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 12,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 7, coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [12,16] }, BaseCellData { home_fijk: FaceIJK { face: 12,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 10,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 9, coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 13,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 16,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 15,coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 15,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 16,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 14,coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 13,coord: CoordIJK { i: 1, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 5, coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [10,19] }, BaseCellData { home_fijk: FaceIJK { face: 8, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 14,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 9, coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 14,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 17,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 12,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 16,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 17,coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 15,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 16,coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 9, coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 15,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 13,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 8, coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [13,17] }, BaseCellData { home_fijk: FaceIJK { face: 13,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 17,coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 19,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 14,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 19,coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 17,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 13,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 17,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 16,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 9, coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [14,18] }, BaseCellData { home_fijk: FaceIJK { face: 15,coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 15,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 18,coord: CoordIJK { i: 0, j: 1, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 18,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 19,coord: CoordIJK { i: 0, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 17,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 19,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 18,coord: CoordIJK { i: 0, j: 1, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 18,coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 19,coord: CoordIJK { i: 2, j: 0, k: 0 } }, is_pentagon: true, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 19,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 18,coord: CoordIJK { i: 0, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 19,coord: CoordIJK { i: 1, j: 0, k: 1 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, BaseCellData { home_fijk: FaceIJK { face: 18,coord: CoordIJK { i: 1, j: 0, k: 0 } }, is_pentagon: false, cw_offset_pent: [-1, -1] }, ];
pub const MAX_FACE_COORD: i32 = 2;
pub(crate) const INVALID_ROTATIONS: i32 = -1;
#[derive(Debug, Clone, Copy)]
struct BaseCellRotation {
base_cell: i32,
ccw_rot60: i32,
}
#[rustfmt::skip]
static FACE_IJK_TO_BASE_CELL_ROTATIONS:
[[[[BaseCellRotation; 3]; 3]; 3]; NUM_ICOSA_FACES as usize] = [
[[[BaseCellRotation { base_cell: 16, ccw_rot60: 0 }, BaseCellRotation { base_cell: 18, ccw_rot60: 0 }, BaseCellRotation { base_cell: 24, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 33, ccw_rot60: 0 }, BaseCellRotation { base_cell: 30, ccw_rot60: 0 }, BaseCellRotation { base_cell: 32, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 49, ccw_rot60: 1 }, BaseCellRotation { base_cell: 48, ccw_rot60: 3 }, BaseCellRotation { base_cell: 50, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 8, ccw_rot60: 0 }, BaseCellRotation { base_cell: 5, ccw_rot60: 5 }, BaseCellRotation { base_cell: 10, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 22, ccw_rot60: 0 }, BaseCellRotation { base_cell: 16, ccw_rot60: 0 }, BaseCellRotation { base_cell: 18, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 41, ccw_rot60: 1 }, BaseCellRotation { base_cell: 33, ccw_rot60: 0 }, BaseCellRotation { base_cell: 30, ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 4, ccw_rot60: 0 }, BaseCellRotation { base_cell: 0, ccw_rot60: 5 }, BaseCellRotation { base_cell: 2, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 15, ccw_rot60: 1 }, BaseCellRotation { base_cell: 8, ccw_rot60: 0 }, BaseCellRotation { base_cell: 5, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 31, ccw_rot60: 1 }, BaseCellRotation { base_cell: 22, ccw_rot60: 0 }, BaseCellRotation { base_cell: 16, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 2, ccw_rot60: 0 }, BaseCellRotation { base_cell: 6, ccw_rot60: 0 }, BaseCellRotation { base_cell: 14, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 10, ccw_rot60: 0 }, BaseCellRotation { base_cell: 11, ccw_rot60: 0 }, BaseCellRotation { base_cell: 17, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 24, ccw_rot60: 1 }, BaseCellRotation { base_cell: 23, ccw_rot60: 3 }, BaseCellRotation { base_cell: 25, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 0, ccw_rot60: 0 }, BaseCellRotation { base_cell: 1, ccw_rot60: 5 }, BaseCellRotation { base_cell: 9, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 5, ccw_rot60: 0 }, BaseCellRotation { base_cell: 2, ccw_rot60: 0 }, BaseCellRotation { base_cell: 6, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 18, ccw_rot60: 1 }, BaseCellRotation { base_cell: 10, ccw_rot60: 0 }, BaseCellRotation { base_cell: 11, ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 4, ccw_rot60: 1 }, BaseCellRotation { base_cell: 3, ccw_rot60: 5 }, BaseCellRotation { base_cell: 7, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 8, ccw_rot60: 1 }, BaseCellRotation { base_cell: 0, ccw_rot60: 0 }, BaseCellRotation { base_cell: 1, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 16, ccw_rot60: 1 }, BaseCellRotation { base_cell: 5, ccw_rot60: 0 }, BaseCellRotation { base_cell: 2, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 7, ccw_rot60: 0 }, BaseCellRotation { base_cell: 21, ccw_rot60: 0 }, BaseCellRotation { base_cell: 38, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 9, ccw_rot60: 0 }, BaseCellRotation { base_cell: 19, ccw_rot60: 0 }, BaseCellRotation { base_cell: 34, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 14, ccw_rot60: 1 }, BaseCellRotation { base_cell: 20, ccw_rot60: 3 }, BaseCellRotation { base_cell: 36, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 3, ccw_rot60: 0 }, BaseCellRotation { base_cell: 13, ccw_rot60: 5 }, BaseCellRotation { base_cell: 29, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 1, ccw_rot60: 0 }, BaseCellRotation { base_cell: 7, ccw_rot60: 0 }, BaseCellRotation { base_cell: 21, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 6, ccw_rot60: 1 }, BaseCellRotation { base_cell: 9, ccw_rot60: 0 }, BaseCellRotation { base_cell: 19, ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 4, ccw_rot60: 2 }, BaseCellRotation { base_cell: 12, ccw_rot60: 5 }, BaseCellRotation { base_cell: 26, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 0, ccw_rot60: 1 }, BaseCellRotation { base_cell: 3, ccw_rot60: 0 }, BaseCellRotation { base_cell: 13, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 2, ccw_rot60: 1 }, BaseCellRotation { base_cell: 1, ccw_rot60: 0 }, BaseCellRotation { base_cell: 7, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 26, ccw_rot60: 0 }, BaseCellRotation { base_cell: 42, ccw_rot60: 0 }, BaseCellRotation { base_cell: 58, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 29, ccw_rot60: 0 }, BaseCellRotation { base_cell: 43, ccw_rot60: 0 }, BaseCellRotation { base_cell: 62, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 38, ccw_rot60: 1 }, BaseCellRotation { base_cell: 47, ccw_rot60: 3 }, BaseCellRotation { base_cell: 64, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 12, ccw_rot60: 0 }, BaseCellRotation { base_cell: 28, ccw_rot60: 5 }, BaseCellRotation { base_cell: 44, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 13, ccw_rot60: 0 }, BaseCellRotation { base_cell: 26, ccw_rot60: 0 }, BaseCellRotation { base_cell: 42, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 21, ccw_rot60: 1 }, BaseCellRotation { base_cell: 29, ccw_rot60: 0 }, BaseCellRotation { base_cell: 43, ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 4, ccw_rot60: 3 }, BaseCellRotation { base_cell: 15, ccw_rot60: 5 }, BaseCellRotation { base_cell: 31, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 3, ccw_rot60: 1 }, BaseCellRotation { base_cell: 12, ccw_rot60: 0 }, BaseCellRotation { base_cell: 28, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 7, ccw_rot60: 1 }, BaseCellRotation { base_cell: 13, ccw_rot60: 0 }, BaseCellRotation { base_cell: 26, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 31, ccw_rot60: 0 }, BaseCellRotation { base_cell: 41, ccw_rot60: 0 }, BaseCellRotation { base_cell: 49, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 44, ccw_rot60: 0 }, BaseCellRotation { base_cell: 53, ccw_rot60: 0 }, BaseCellRotation { base_cell: 61, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 58, ccw_rot60: 1 }, BaseCellRotation { base_cell: 65, ccw_rot60: 3 }, BaseCellRotation { base_cell: 75, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 15, ccw_rot60: 0 }, BaseCellRotation { base_cell: 22, ccw_rot60: 5 }, BaseCellRotation { base_cell: 33, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 28, ccw_rot60: 0 }, BaseCellRotation { base_cell: 31, ccw_rot60: 0 }, BaseCellRotation { base_cell: 41, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 42, ccw_rot60: 1 }, BaseCellRotation { base_cell: 44, ccw_rot60: 0 }, BaseCellRotation { base_cell: 53, ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 4, ccw_rot60: 4 }, BaseCellRotation { base_cell: 8, ccw_rot60: 5 }, BaseCellRotation { base_cell: 16, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 12, ccw_rot60: 1 }, BaseCellRotation { base_cell: 15, ccw_rot60: 0 }, BaseCellRotation { base_cell: 22, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 26, ccw_rot60: 1 }, BaseCellRotation { base_cell: 28, ccw_rot60: 0 }, BaseCellRotation { base_cell: 31, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 50, ccw_rot60: 0 }, BaseCellRotation { base_cell: 48, ccw_rot60: 0 }, BaseCellRotation { base_cell: 49, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 32, ccw_rot60: 0 }, BaseCellRotation { base_cell: 30, ccw_rot60: 3 }, BaseCellRotation { base_cell: 33, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 24, ccw_rot60: 3 }, BaseCellRotation { base_cell: 18, ccw_rot60: 3 }, BaseCellRotation { base_cell: 16, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 70, ccw_rot60: 0 }, BaseCellRotation { base_cell: 67, ccw_rot60: 0 }, BaseCellRotation { base_cell: 66, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 52, ccw_rot60: 3 }, BaseCellRotation { base_cell: 50, ccw_rot60: 0 }, BaseCellRotation { base_cell: 48, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 37, ccw_rot60: 3 }, BaseCellRotation { base_cell: 32, ccw_rot60: 0 }, BaseCellRotation { base_cell: 30, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 83, ccw_rot60: 0 }, BaseCellRotation { base_cell: 87, ccw_rot60: 3 }, BaseCellRotation { base_cell: 85, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 74, ccw_rot60: 3 }, BaseCellRotation { base_cell: 70, ccw_rot60: 0 }, BaseCellRotation { base_cell: 67, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 57, ccw_rot60: 1 }, BaseCellRotation { base_cell: 52, ccw_rot60: 3 }, BaseCellRotation { base_cell: 50, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 25, ccw_rot60: 0 }, BaseCellRotation { base_cell: 23, ccw_rot60: 0 }, BaseCellRotation { base_cell: 24, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 17, ccw_rot60: 0 }, BaseCellRotation { base_cell: 11, ccw_rot60: 3 }, BaseCellRotation { base_cell: 10, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 14, ccw_rot60: 3 }, BaseCellRotation { base_cell: 6, ccw_rot60: 3 }, BaseCellRotation { base_cell: 2, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 45, ccw_rot60: 0 }, BaseCellRotation { base_cell: 39, ccw_rot60: 0 }, BaseCellRotation { base_cell: 37, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 35, ccw_rot60: 3 }, BaseCellRotation { base_cell: 25, ccw_rot60: 0 }, BaseCellRotation { base_cell: 23, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 27, ccw_rot60: 3 }, BaseCellRotation { base_cell: 17, ccw_rot60: 0 }, BaseCellRotation { base_cell: 11, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 63, ccw_rot60: 0 }, BaseCellRotation { base_cell: 59, ccw_rot60: 3 }, BaseCellRotation { base_cell: 57, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 56, ccw_rot60: 3 }, BaseCellRotation { base_cell: 45, ccw_rot60: 0 }, BaseCellRotation { base_cell: 39, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 46, ccw_rot60: 3 }, BaseCellRotation { base_cell: 35, ccw_rot60: 3 }, BaseCellRotation { base_cell: 25, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 36, ccw_rot60: 0 }, BaseCellRotation { base_cell: 20, ccw_rot60: 0 }, BaseCellRotation { base_cell: 14, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 34, ccw_rot60: 0 }, BaseCellRotation { base_cell: 19, ccw_rot60: 3 }, BaseCellRotation { base_cell: 9, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 38, ccw_rot60: 3 }, BaseCellRotation { base_cell: 21, ccw_rot60: 3 }, BaseCellRotation { base_cell: 7, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 55, ccw_rot60: 0 }, BaseCellRotation { base_cell: 40, ccw_rot60: 0 }, BaseCellRotation { base_cell: 27, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 54, ccw_rot60: 3 }, BaseCellRotation { base_cell: 36, ccw_rot60: 0 }, BaseCellRotation { base_cell: 20, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 51, ccw_rot60: 3 }, BaseCellRotation { base_cell: 34, ccw_rot60: 0 }, BaseCellRotation { base_cell: 19, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 72, ccw_rot60: 0 }, BaseCellRotation { base_cell: 60, ccw_rot60: 3 }, BaseCellRotation { base_cell: 46, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 73, ccw_rot60: 3 }, BaseCellRotation { base_cell: 55, ccw_rot60: 0 }, BaseCellRotation { base_cell: 40, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 71, ccw_rot60: 3 }, BaseCellRotation { base_cell: 54, ccw_rot60: 3 }, BaseCellRotation { base_cell: 36, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 64, ccw_rot60: 0 }, BaseCellRotation { base_cell: 47, ccw_rot60: 0 }, BaseCellRotation { base_cell: 38, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 62, ccw_rot60: 0 }, BaseCellRotation { base_cell: 43, ccw_rot60: 3 }, BaseCellRotation { base_cell: 29, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 58, ccw_rot60: 3 }, BaseCellRotation { base_cell: 42, ccw_rot60: 3 }, BaseCellRotation { base_cell: 26, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 84, ccw_rot60: 0 }, BaseCellRotation { base_cell: 69, ccw_rot60: 0 }, BaseCellRotation { base_cell: 51, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 82, ccw_rot60: 3 }, BaseCellRotation { base_cell: 64, ccw_rot60: 0 }, BaseCellRotation { base_cell: 47, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 76, ccw_rot60: 3 }, BaseCellRotation { base_cell: 62, ccw_rot60: 0 }, BaseCellRotation { base_cell: 43, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 97, ccw_rot60: 0 }, BaseCellRotation { base_cell: 89, ccw_rot60: 3 }, BaseCellRotation { base_cell: 71, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 98, ccw_rot60: 3 }, BaseCellRotation { base_cell: 84, ccw_rot60: 0 }, BaseCellRotation { base_cell: 69, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 96, ccw_rot60: 3 }, BaseCellRotation { base_cell: 82, ccw_rot60: 3 }, BaseCellRotation { base_cell: 64, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 75, ccw_rot60: 0 }, BaseCellRotation { base_cell: 65, ccw_rot60: 0 }, BaseCellRotation { base_cell: 58, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 61, ccw_rot60: 0 }, BaseCellRotation { base_cell: 53, ccw_rot60: 3 }, BaseCellRotation { base_cell: 44, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 49, ccw_rot60: 3 }, BaseCellRotation { base_cell: 41, ccw_rot60: 3 }, BaseCellRotation { base_cell: 31, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 94, ccw_rot60: 0 }, BaseCellRotation { base_cell: 86, ccw_rot60: 0 }, BaseCellRotation { base_cell: 76, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 81, ccw_rot60: 3 }, BaseCellRotation { base_cell: 75, ccw_rot60: 0 }, BaseCellRotation { base_cell: 65, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 66, ccw_rot60: 3 }, BaseCellRotation { base_cell: 61, ccw_rot60: 0 }, BaseCellRotation { base_cell: 53, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 107,ccw_rot60: 0 }, BaseCellRotation { base_cell: 104,ccw_rot60: 3 }, BaseCellRotation { base_cell: 96, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 101,ccw_rot60: 3 }, BaseCellRotation { base_cell: 94, ccw_rot60: 0 }, BaseCellRotation { base_cell: 86, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 85, ccw_rot60: 3 }, BaseCellRotation { base_cell: 81, ccw_rot60: 3 }, BaseCellRotation { base_cell: 75, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 57, ccw_rot60: 0 }, BaseCellRotation { base_cell: 59, ccw_rot60: 0 }, BaseCellRotation { base_cell: 63, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 74, ccw_rot60: 0 }, BaseCellRotation { base_cell: 78, ccw_rot60: 3 }, BaseCellRotation { base_cell: 79, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 83, ccw_rot60: 3 }, BaseCellRotation { base_cell: 92, ccw_rot60: 3 }, BaseCellRotation { base_cell: 95, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 37, ccw_rot60: 0 }, BaseCellRotation { base_cell: 39, ccw_rot60: 3 }, BaseCellRotation { base_cell: 45, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 52, ccw_rot60: 0 }, BaseCellRotation { base_cell: 57, ccw_rot60: 0 }, BaseCellRotation { base_cell: 59, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 70, ccw_rot60: 3 }, BaseCellRotation { base_cell: 74, ccw_rot60: 0 }, BaseCellRotation { base_cell: 78, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 24, ccw_rot60: 0 }, BaseCellRotation { base_cell: 23, ccw_rot60: 3 }, BaseCellRotation { base_cell: 25, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 32, ccw_rot60: 3 }, BaseCellRotation { base_cell: 37, ccw_rot60: 0 }, BaseCellRotation { base_cell: 39, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 50, ccw_rot60: 3 }, BaseCellRotation { base_cell: 52, ccw_rot60: 0 }, BaseCellRotation { base_cell: 57, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 46, ccw_rot60: 0 }, BaseCellRotation { base_cell: 60, ccw_rot60: 0 }, BaseCellRotation { base_cell: 72, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 56, ccw_rot60: 0 }, BaseCellRotation { base_cell: 68, ccw_rot60: 3 }, BaseCellRotation { base_cell: 80, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 63, ccw_rot60: 3 }, BaseCellRotation { base_cell: 77, ccw_rot60: 3 }, BaseCellRotation { base_cell: 90, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 27, ccw_rot60: 0 }, BaseCellRotation { base_cell: 40, ccw_rot60: 3 }, BaseCellRotation { base_cell: 55, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 35, ccw_rot60: 0 }, BaseCellRotation { base_cell: 46, ccw_rot60: 0 }, BaseCellRotation { base_cell: 60, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 45, ccw_rot60: 3 }, BaseCellRotation { base_cell: 56, ccw_rot60: 0 }, BaseCellRotation { base_cell: 68, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 14, ccw_rot60: 0 }, BaseCellRotation { base_cell: 20, ccw_rot60: 3 }, BaseCellRotation { base_cell: 36, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 17, ccw_rot60: 3 }, BaseCellRotation { base_cell: 27, ccw_rot60: 0 }, BaseCellRotation { base_cell: 40, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 25, ccw_rot60: 3 }, BaseCellRotation { base_cell: 35, ccw_rot60: 0 }, BaseCellRotation { base_cell: 46, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 71, ccw_rot60: 0 }, BaseCellRotation { base_cell: 89, ccw_rot60: 0 }, BaseCellRotation { base_cell: 97, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 73, ccw_rot60: 0 }, BaseCellRotation { base_cell: 91, ccw_rot60: 3 }, BaseCellRotation { base_cell: 103,ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 72, ccw_rot60: 3 }, BaseCellRotation { base_cell: 88, ccw_rot60: 3 }, BaseCellRotation { base_cell: 105,ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 51, ccw_rot60: 0 }, BaseCellRotation { base_cell: 69, ccw_rot60: 3 }, BaseCellRotation { base_cell: 84, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 54, ccw_rot60: 0 }, BaseCellRotation { base_cell: 71, ccw_rot60: 0 }, BaseCellRotation { base_cell: 89, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 55, ccw_rot60: 3 }, BaseCellRotation { base_cell: 73, ccw_rot60: 0 }, BaseCellRotation { base_cell: 91, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 38, ccw_rot60: 0 }, BaseCellRotation { base_cell: 47, ccw_rot60: 3 }, BaseCellRotation { base_cell: 64, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 34, ccw_rot60: 3 }, BaseCellRotation { base_cell: 51, ccw_rot60: 0 }, BaseCellRotation { base_cell: 69, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 36, ccw_rot60: 3 }, BaseCellRotation { base_cell: 54, ccw_rot60: 0 }, BaseCellRotation { base_cell: 71, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 96, ccw_rot60: 0 }, BaseCellRotation { base_cell: 104,ccw_rot60: 0 }, BaseCellRotation { base_cell: 107,ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 98, ccw_rot60: 0 }, BaseCellRotation { base_cell: 110,ccw_rot60: 3 }, BaseCellRotation { base_cell: 115,ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 97, ccw_rot60: 3 }, BaseCellRotation { base_cell: 111,ccw_rot60: 3 }, BaseCellRotation { base_cell: 119,ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 76, ccw_rot60: 0 }, BaseCellRotation { base_cell: 86, ccw_rot60: 3 }, BaseCellRotation { base_cell: 94, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 82, ccw_rot60: 0 }, BaseCellRotation { base_cell: 96, ccw_rot60: 0 }, BaseCellRotation { base_cell: 104,ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 84, ccw_rot60: 3 }, BaseCellRotation { base_cell: 98, ccw_rot60: 0 }, BaseCellRotation { base_cell: 110,ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 58, ccw_rot60: 0 }, BaseCellRotation { base_cell: 65, ccw_rot60: 3 }, BaseCellRotation { base_cell: 75, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 62, ccw_rot60: 3 }, BaseCellRotation { base_cell: 76, ccw_rot60: 0 }, BaseCellRotation { base_cell: 86, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 64, ccw_rot60: 3 }, BaseCellRotation { base_cell: 82, ccw_rot60: 0 }, BaseCellRotation { base_cell: 96, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 85, ccw_rot60: 0 }, BaseCellRotation { base_cell: 87, ccw_rot60: 0 }, BaseCellRotation { base_cell: 83, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 101,ccw_rot60: 0 }, BaseCellRotation { base_cell: 102,ccw_rot60: 3 }, BaseCellRotation { base_cell: 100,ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 107,ccw_rot60: 3 }, BaseCellRotation { base_cell: 112,ccw_rot60: 3 }, BaseCellRotation { base_cell: 114,ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 66, ccw_rot60: 0 }, BaseCellRotation { base_cell: 67, ccw_rot60: 3 }, BaseCellRotation { base_cell: 70, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 81, ccw_rot60: 0 }, BaseCellRotation { base_cell: 85, ccw_rot60: 0 }, BaseCellRotation { base_cell: 87, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 94, ccw_rot60: 3 }, BaseCellRotation { base_cell: 101,ccw_rot60: 0 }, BaseCellRotation { base_cell: 102,ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 49, ccw_rot60: 0 }, BaseCellRotation { base_cell: 48, ccw_rot60: 3 }, BaseCellRotation { base_cell: 50, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 61, ccw_rot60: 3 }, BaseCellRotation { base_cell: 66, ccw_rot60: 0 }, BaseCellRotation { base_cell: 67, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 75, ccw_rot60: 3 }, BaseCellRotation { base_cell: 81, ccw_rot60: 0 }, BaseCellRotation { base_cell: 85, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 95, ccw_rot60: 0 }, BaseCellRotation { base_cell: 92, ccw_rot60: 0 }, BaseCellRotation { base_cell: 83, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 79, ccw_rot60: 0 }, BaseCellRotation { base_cell: 78, ccw_rot60: 0 }, BaseCellRotation { base_cell: 74, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 63, ccw_rot60: 1 }, BaseCellRotation { base_cell: 59, ccw_rot60: 3 }, BaseCellRotation { base_cell: 57, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 109,ccw_rot60: 0 }, BaseCellRotation { base_cell: 108,ccw_rot60: 0 }, BaseCellRotation { base_cell: 100,ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 93, ccw_rot60: 1 }, BaseCellRotation { base_cell: 95, ccw_rot60: 0 }, BaseCellRotation { base_cell: 92, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 77, ccw_rot60: 1 }, BaseCellRotation { base_cell: 79, ccw_rot60: 0 }, BaseCellRotation { base_cell: 78, ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 117,ccw_rot60: 4 }, BaseCellRotation { base_cell: 118,ccw_rot60: 5 }, BaseCellRotation { base_cell: 114,ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 106,ccw_rot60: 1 }, BaseCellRotation { base_cell: 109,ccw_rot60: 0 }, BaseCellRotation { base_cell: 108,ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 90, ccw_rot60: 1 }, BaseCellRotation { base_cell: 93, ccw_rot60: 1 }, BaseCellRotation { base_cell: 95, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 90, ccw_rot60: 0 }, BaseCellRotation { base_cell: 77, ccw_rot60: 0 }, BaseCellRotation { base_cell: 63, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 80, ccw_rot60: 0 }, BaseCellRotation { base_cell: 68, ccw_rot60: 0 }, BaseCellRotation { base_cell: 56, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 72, ccw_rot60: 1 }, BaseCellRotation { base_cell: 60, ccw_rot60: 3 }, BaseCellRotation { base_cell: 46, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 106,ccw_rot60: 0 }, BaseCellRotation { base_cell: 93, ccw_rot60: 0 }, BaseCellRotation { base_cell: 79, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 99, ccw_rot60: 1 }, BaseCellRotation { base_cell: 90, ccw_rot60: 0 }, BaseCellRotation { base_cell: 77, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 88, ccw_rot60: 1 }, BaseCellRotation { base_cell: 80, ccw_rot60: 0 }, BaseCellRotation { base_cell: 68, ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 117,ccw_rot60: 3 }, BaseCellRotation { base_cell: 109,ccw_rot60: 5 }, BaseCellRotation { base_cell: 95, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 113,ccw_rot60: 1 }, BaseCellRotation { base_cell: 106,ccw_rot60: 0 }, BaseCellRotation { base_cell: 93, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 105,ccw_rot60: 1 }, BaseCellRotation { base_cell: 99, ccw_rot60: 1 }, BaseCellRotation { base_cell: 90, ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 105,ccw_rot60: 0 }, BaseCellRotation { base_cell: 88, ccw_rot60: 0 }, BaseCellRotation { base_cell: 72, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 103,ccw_rot60: 0 }, BaseCellRotation { base_cell: 91, ccw_rot60: 0 }, BaseCellRotation { base_cell: 73, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 97, ccw_rot60: 1 }, BaseCellRotation { base_cell: 89, ccw_rot60: 3 }, BaseCellRotation { base_cell: 71, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 113,ccw_rot60: 0 }, BaseCellRotation { base_cell: 99, ccw_rot60: 0 }, BaseCellRotation { base_cell: 80, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 116,ccw_rot60: 1 }, BaseCellRotation { base_cell: 105,ccw_rot60: 0 }, BaseCellRotation { base_cell: 88, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 111,ccw_rot60: 1 }, BaseCellRotation { base_cell: 103,ccw_rot60: 0 }, BaseCellRotation { base_cell: 91, ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 117,ccw_rot60: 2 }, BaseCellRotation { base_cell: 106,ccw_rot60: 5 }, BaseCellRotation { base_cell: 90, ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 121,ccw_rot60: 1 }, BaseCellRotation { base_cell: 113,ccw_rot60: 0 }, BaseCellRotation { base_cell: 99, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 119,ccw_rot60: 1 }, BaseCellRotation { base_cell: 116,ccw_rot60: 1 }, BaseCellRotation { base_cell: 105,ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 119,ccw_rot60: 0 }, BaseCellRotation { base_cell: 111,ccw_rot60: 0 }, BaseCellRotation { base_cell: 97, ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 115,ccw_rot60: 0 }, BaseCellRotation { base_cell: 110,ccw_rot60: 0 }, BaseCellRotation { base_cell: 98, ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 107,ccw_rot60: 1 }, BaseCellRotation { base_cell: 104,ccw_rot60: 3 }, BaseCellRotation { base_cell: 96, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 121,ccw_rot60: 0 }, BaseCellRotation { base_cell: 116,ccw_rot60: 0 }, BaseCellRotation { base_cell: 103,ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 120,ccw_rot60: 1 }, BaseCellRotation { base_cell: 119,ccw_rot60: 0 }, BaseCellRotation { base_cell: 111,ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 112,ccw_rot60: 1 }, BaseCellRotation { base_cell: 115,ccw_rot60: 0 }, BaseCellRotation { base_cell: 110,ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 117,ccw_rot60: 1 }, BaseCellRotation { base_cell: 113,ccw_rot60: 5 }, BaseCellRotation { base_cell: 105,ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 118,ccw_rot60: 1 }, BaseCellRotation { base_cell: 121,ccw_rot60: 0 }, BaseCellRotation { base_cell: 116,ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 114,ccw_rot60: 1 }, BaseCellRotation { base_cell: 120,ccw_rot60: 1 }, BaseCellRotation { base_cell: 119,ccw_rot60: 0 }]]],
[[[BaseCellRotation { base_cell: 114,ccw_rot60: 0 }, BaseCellRotation { base_cell: 112,ccw_rot60: 0 }, BaseCellRotation { base_cell: 107,ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 100,ccw_rot60: 0 }, BaseCellRotation { base_cell: 102,ccw_rot60: 0 }, BaseCellRotation { base_cell: 101,ccw_rot60: 3 }],
[BaseCellRotation { base_cell: 83, ccw_rot60: 1 }, BaseCellRotation { base_cell: 87, ccw_rot60: 3 }, BaseCellRotation { base_cell: 85, ccw_rot60: 3 }]],
[[BaseCellRotation { base_cell: 118,ccw_rot60: 0 }, BaseCellRotation { base_cell: 120,ccw_rot60: 0 }, BaseCellRotation { base_cell: 115,ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 108,ccw_rot60: 1 }, BaseCellRotation { base_cell: 114,ccw_rot60: 0 }, BaseCellRotation { base_cell: 112,ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 92, ccw_rot60: 1 }, BaseCellRotation { base_cell: 100,ccw_rot60: 0 }, BaseCellRotation { base_cell: 102,ccw_rot60: 0 }]],
[[BaseCellRotation { base_cell: 117,ccw_rot60: 0 }, BaseCellRotation { base_cell: 121,ccw_rot60: 5 }, BaseCellRotation { base_cell: 119,ccw_rot60: 5 }],
[BaseCellRotation { base_cell: 109,ccw_rot60: 1 }, BaseCellRotation { base_cell: 118,ccw_rot60: 0 }, BaseCellRotation { base_cell: 120,ccw_rot60: 0 }],
[BaseCellRotation { base_cell: 95, ccw_rot60: 1 }, BaseCellRotation { base_cell: 108,ccw_rot60: 1 }, BaseCellRotation { base_cell: 114,ccw_rot60: 0 }]]],
];
#[inline]
#[must_use]
pub(crate) fn _is_base_cell_pentagon(base_cell: i32) -> bool {
if base_cell < 0 || base_cell >= NUM_BASE_CELLS as i32 {
return false; }
BASE_CELL_DATA[base_cell as usize].is_pentagon
}
#[inline]
#[must_use]
pub(crate) fn _is_base_cell_polar_pentagon(base_cell: i32) -> bool {
base_cell == 4 || base_cell == 117
}
#[inline]
#[must_use]
pub(crate) fn _face_ijk_to_base_cell(h: &FaceIJK) -> i32 {
if h.coord.i < 0
|| h.coord.i > MAX_FACE_COORD
|| h.coord.j < 0
|| h.coord.j > MAX_FACE_COORD
|| h.coord.k < 0
|| h.coord.k > MAX_FACE_COORD
|| h.face < 0
|| h.face >= NUM_ICOSA_FACES as i32
{
return INVALID_BASE_CELL; }
FACE_IJK_TO_BASE_CELL_ROTATIONS[h.face as usize][h.coord.i as usize][h.coord.j as usize][h.coord.k as usize].base_cell
}
#[inline]
#[must_use]
pub(crate) fn _face_ijk_to_base_cell_ccwrot60(h: &FaceIJK) -> i32 {
if h.coord.i < 0
|| h.coord.i > MAX_FACE_COORD
|| h.coord.j < 0
|| h.coord.j > MAX_FACE_COORD
|| h.coord.k < 0
|| h.coord.k > MAX_FACE_COORD
|| h.face < 0
|| h.face >= NUM_ICOSA_FACES as i32
{
return INVALID_ROTATIONS; }
FACE_IJK_TO_BASE_CELL_ROTATIONS[h.face as usize][h.coord.i as usize][h.coord.j as usize][h.coord.k as usize].ccw_rot60
}
#[inline]
pub(crate) fn _base_cell_to_face_ijk(base_cell: i32, h: &mut FaceIJK) {
if base_cell < 0 || base_cell >= NUM_BASE_CELLS as i32 {
*h = FaceIJK {
face: -1,
coord: CoordIJK { i: -1, j: -1, k: -1 },
}; return;
}
*h = BASE_CELL_DATA[base_cell as usize].home_fijk;
}
#[inline]
#[must_use]
pub(crate) fn _base_cell_to_ccwrot60(base_cell: i32, face: i32) -> i32 {
if face < 0 || face >= NUM_ICOSA_FACES as i32 || base_cell < 0 || base_cell >= NUM_BASE_CELLS as i32 {
return INVALID_ROTATIONS;
}
for i in 0..=MAX_FACE_COORD as usize {
for j in 0..=MAX_FACE_COORD as usize {
for k in 0..=MAX_FACE_COORD as usize {
if FACE_IJK_TO_BASE_CELL_ROTATIONS[face as usize][i][j][k].base_cell == base_cell {
return FACE_IJK_TO_BASE_CELL_ROTATIONS[face as usize][i][j][k].ccw_rot60;
}
}
}
}
INVALID_ROTATIONS
}
#[inline]
#[must_use]
pub(crate) fn _base_cell_is_cw_offset(base_cell: i32, test_face: i32) -> bool {
if base_cell < 0 || base_cell >= NUM_BASE_CELLS as i32 {
return false;
}
let data = &BASE_CELL_DATA[base_cell as usize];
data.is_pentagon && (data.cw_offset_pent[0] == test_face || data.cw_offset_pent[1] == test_face)
}
#[inline]
#[must_use]
pub(crate) fn _get_base_cell_neighbor(base_cell: i32, dir: Direction) -> i32 {
if base_cell < 0 || base_cell >= NUM_BASE_CELLS as i32 || (dir as u8) >= 7u8 {
return INVALID_BASE_CELL;
}
BASE_CELL_NEIGHBORS[base_cell as usize][dir as usize]
}
#[inline]
#[must_use]
pub(crate) fn _get_base_cell_direction(origin_base_cell: i32, neighboring_base_cell: i32) -> Direction {
if origin_base_cell < 0
|| origin_base_cell >= NUM_BASE_CELLS as i32
|| neighboring_base_cell < 0
|| neighboring_base_cell >= NUM_BASE_CELLS as i32
{
return Direction::InvalidDigit;
}
for dir_val in 0..7u8 {
let dir: Direction = unsafe { std::mem::transmute(dir_val) };
if _get_base_cell_neighbor(origin_base_cell, dir) == neighboring_base_cell {
return dir;
}
}
Direction::InvalidDigit
}
pub(crate) fn baseCellNumToCell(base_cell_num: i32) -> H3Index {
if base_cell_num < 0 || base_cell_num >= NUM_BASE_CELLS as i32 {
return H3_NULL;
}
let mut h = H3Index(crate::constants::H3_INIT); crate::h3_index::set_mode(&mut h, crate::constants::H3_CELL_MODE as u8);
crate::h3_index::set_resolution(&mut h, 0);
crate::h3_index::set_base_cell(&mut h, base_cell_num);
h
}