Inserts obj at x, y @param obj @param x @param y @throws Exception throws an exception, if the element couldn't be inserted
(T obj, int x, int y)
| 98 | * @throws Exception throws an exception, if the element couldn't be inserted |
| 99 | */ |
| 100 | public void insert(T obj, int x, int y) throws Exception{ |
| 101 | if(root == null){ |
| 102 | root = new QuadtreeNode(null, x, y, DEFAULT_LENGTH); |
| 103 | } |
| 104 | root.insert(new QuadtreeLeaf(obj, x, y)); |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Removes el from the quadtree |
no outgoing calls