Example #1
0
        protected void SetLevels(SpatialSheetPowerTypes level1, SpatialSheetPowerTypes level2, SpatialSheetPowerTypes level3, SpatialSheetPowerTypes level4)
        {
            if (NodeCount > 0)
            {
                return;
            }

            Power[1] = level1;
            if (Power.Length > 2)
            {
                Power[2] = level2;
            }
            if (Power.Length > 3)
            {
                Power[3] = level3;
            }
            if (Power.Length > 4)
            {
                Power[4] = level4;
            }

            for (var i = 5; i < Power.Length; i++)
            {
                Power[i] = SpatialSheetPowerTypes.Low;
            }
            //Root spatial index sheet includes whole world
            _root = new SpatialSheet <TNode>(this, 1, 1, CoordinateRectangle.Empty);

            //Array to grab index stats for tuning
            NodeDimension = new int[Power.Length - 1];
        }
Example #2
0
 private void PostSheetAction(GoogleBlock block, SpatialSheet <TNode> sheet, SheetActionType actionType)
 {
     switch (actionType)
     {
     case SheetActionType.Delete:
     {
         //delete sheet from index without elements
         if (sheet.IsEmpty)
         {
             Sheets.Remove(block);
         }
     } break;
     }
 }