/// <summary> /// Removes all child nodes. /// </summary> internal void ClearChildren() { if (_leftUpChild != null) { _leftUpChild.ClearChildren(); _owner._nodeCount--; } if (_rightUpChild != null) { _rightUpChild.ClearChildren(); _owner._nodeCount--; } if (_leftDownChild != null) { _leftDownChild.ClearChildren(); _owner._nodeCount--; } if (_rightDownChild != null) { _rightDownChild.ClearChildren(); _owner._nodeCount--; } _leftUpChild = null; _rightUpChild = null; _leftDownChild = null; _rightDownChild = null; }
/// <summary> /// Removes all child nodes. /// </summary> public void Clear() { _root.ClearChildren(); }