/// <summary> /// Reset factory to default values /// </summary> public void Reset() { X = 0f; Y = 0f; Width = 1f; Height = 1f; Capacity = QuadTreeCapacity.Medium; }
/// <summary> /// Returns a new instance of QuadTreeNode<typeparamref name="T"/> /// <para/>Used to make a new QuadTree /// </summary> /// <param name="capacity">Max capacity of a single leaf, it is strongly recommanded you leave it by default. Performs better</param> /// <param name="width">Width of the square where items will lies</param> /// <param name="height">Height of the square where items will lies</param> /// <param name="x">Coordinate of X-Axis of the square where items will lies</param> /// <param name="y">Coordinate of Y-Axis of the square where items will lies</param> /// <returns></returns> public static QuadTreeNode <T> BuildNewRoot(QuadTreeCapacity capacity = QuadTreeCapacity.Medium, float width = float.MaxValue, float height = float.MaxValue, float x = 0f, float y = 0f) { return(new QuadTreeNode <T>((int)capacity, width, height, x, y)); }