Approximate, incremental nearest-neighbour algorithm for moving bodies

前端 未结 7 1137
轮回少年
轮回少年 2021-01-30 12:04

Bounty

This question raises several issues. The bounty will go to an answer which addresses them holistically.


Here\'s a problem I\'ve been playing with.

7条回答
  •  醉酒成梦
    2021-01-30 12:23

    Have you tried using a quad tree?

    That is, recursively partition the "world" into a graph with four subnodes each. The tree can then quickly check which objects are inside a particular square of the world and discard the rest. A very effective culling technique often used for improving performance of collision detection in games.

    If this is 3D, extend it to an octree.

提交回复
热议问题