Ejemplo n.º 1
0
 public StorageTreeNode(
     IStorageGroupOrganizer <StoredChunkEdits> parent,
     int[] anchorPosition,
     int[] relativeAnchorPosition,
     int sizePower) : base(anchorPosition, relativeAnchorPosition, sizePower)
 {
     this.parent = parent;
 }
Ejemplo n.º 2
0
 public bool TryGetNodeWithSizePower(int[] relativePosition, int sizePow, out IStorageGroupOrganizer <StoredChunkEdits> child)
 {
     if (this.child == null)
     {
         child = default;
         return(false);
     }
     else
     {
         return(this.child.TryGetNodeWithSizePower(relativePosition, sizePow, out child));
     }
 }
Ejemplo n.º 3
0
        public bool TryGetNodeWithSizePower(int[] relativePosition, int sizePow, out IStorageGroupOrganizer <StoredChunkEdits> child)
        {
            if (sizePow == sizePower)
            {
                child = this;
            }
            else
            {
                child = null;
            }

            return(child != null);
        }
Ejemplo n.º 4
0
        public bool TryGetNodeWithSizePower(int[] relativePosition, int sizePow, out IStorageGroupOrganizer <StoredChunkEdits> child)
        {
            if (sizePower == sizePow)
            {
                child = this;
            }
            else
            {
                relativePosition[0] -= groupRelativeAnchorPosition[0];
                relativePosition[1] -= groupRelativeAnchorPosition[1];
                relativePosition[2] -= groupRelativeAnchorPosition[2];
                int childIndex = GetIndexForLocalPosition(relativePosition);

                if (children[childIndex] == null)
                {
                    child = null;
                }
                else
                {
                    return(children[childIndex].TryGetNodeWithSizePower(relativePosition, sizePow, out child));
                }
            }
            return(child != null);
        }
Ejemplo n.º 5
0
 public StorageTreeLeaf(IStorageGroupOrganizer <StoredChunkEdits> parent, StoredChunkEdits leaf, int index, int[] relativeAnchorPoint, int[] anchorPoint, int sizePower) : base(leaf, index, relativeAnchorPoint, anchorPoint, sizePower)
 {
     leaf.leaf   = this;
     this.parent = parent;
 }