title: How do you update a QuadTree after an object has moved in C++?
body: <p>The easiest method is removing and inserting the object, but there are probably faster methods. (If I'm overthinking this and I should just do it the simple way, let me know)</p>
  
  <p>Here are some notes about my QuadTree</p>
  
  <ul>
  <li>The objects that are moving are AABBs and may be bigger than the
  smallest QuadTree node.</li>
  <li>The objects are not removed when creating children QuadTrees. That
  means the root QuadTree has a pointer to every object inside the
  QuadTree.</li>
  <li>The objects are stored as pointers in a vector outside of the QuadTree.</li>
  </ul>
  
  <p>So far, each time an object moves it calls a function called Update() on the root QuadTree. It includes itself and its past bounding box before it moved in the parameters. I'm  not sure how to make the function though.</p>
  
  <p>Posting the entire code to my QuadTree here would make my post quite long, so I've created a <a href="https://github.com/epitaque/QuadTree" rel="nofollow">GitHub repository</a> for easier reading.</p>
  
  <p>Edit: For anyone looking for an answer <a href="http://zenpandainteractive.blogspot.com/" rel="nofollow">this</a> seems to update objects by removing and deleting them and is pretty efficient judging by the test he did in the comments. </p>