Insert inserts the given item to the quadtree
(item AABBer)
| 245 | |
| 246 | // Insert inserts the given item to the quadtree |
| 247 | func (qt *Quadtree) Insert(item AABBer) { |
| 248 | qt.Total++ |
| 249 | pRect := item.AABB() |
| 250 | qt.root.Insert(qt.newQuadtreeNodeData(item, pRect)) |
| 251 | } |
| 252 | |
| 253 | func (qt *quadtreeNode) Insert(item *quadtreeNodeData) { |
| 254 | if qt.hasNodes { |
no test coverage detected