requires: {#LinkedCollection. #Region}. provides: {#QuadTree}. collections addPrototype: #QuadTree derivedFrom: {LinkedCollection}. "A QuadTree is a Tree structure designed for graphics comparisons, or at least 2-d region sorting." QuadTree addSlot: #treeParent. QuadTree addSlot: #bounds. "The Rectangle Region that corresponds to this node." collections addPrototype: #QuadTreeNode derivedFrom: {QuadTree}. "Each node has 4 sub-nodes, separated vertically and horizontally at one Point." QuadTree addSlot: #c1. QuadTree addSlot: #c2. QuadTree addSlot: #c3. QuadTree addSlot: #c4. collections addPrototype: #QuadTreeLeaf derivedFrom: {QuadTree}. "The leaves can reference Regions which they contain but which are not part of the QuadTree." QuadTree addSlot: #contents valued: ExtensibleArray newEmpty.