Quadtree vs Red-Black tree for a game in C++?

后端 未结 6 852
小鲜肉
小鲜肉 2021-02-02 03:33

I have been looking for a quadtree/quadtree node implementation on the net for ages. There is some basic stuff but nothing that I would be able to really use it a game.

6条回答
  •  滥情空心
    2021-02-02 03:50

    A red-black tree is not a spatial index; it can only sort on a single ordinal key. A quadtree is (for two dimensions) a spatial index that allows fast lookup and elimination of points. An Octree does the same thing for three dimensions.

提交回复
热议问题