public StorageTreeNode( IStorageGroupOrganizer <StoredChunkEdits> parent, int[] anchorPosition, int[] relativeAnchorPosition, int sizePower) : base(anchorPosition, relativeAnchorPosition, sizePower) { this.parent = parent; }
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)); } }
public bool TryGetNodeWithSizePower(int[] relativePosition, int sizePow, out IStorageGroupOrganizer <StoredChunkEdits> child) { if (sizePow == sizePower) { child = this; } else { child = null; } return(child != null); }
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); }
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; }