public void Remove(NodeQuad <type> node) { var hash = node.GetHashCode(); Links.Remove(node.Value); for (int i = 0; i < attached.Length; i++) { if (attached[i] == null) { continue; } if (attached[i].GetHashCode() == hash) { attached[i] = null; return; } } }
public void Set(NodeQuad <type> node, Side side) { Links.Add(node.Value, node); switch (side) { case Side.Top: attached[0] = node; break; case Side.Right: attached[1] = node; break; case Side.Bottom: attached[2] = node; break; case Side.Left: attached[3] = node; break; } }