Approximate, incremental nearest-neighbour algorithm for moving bodies

前端 未结 7 1121
轮回少年
轮回少年 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:34

    When the distance that an Actor moves in a given timestep exceeds the distance to its furthest known neighbour, resample all neighbours.

    Another trigger: when the distance an Actor has moved since the last resample exceeds the distance to the furthest known neighbour, resample.

    Trivial optimisation goes well here, if there is a hierarchial spatial index, search for a node containing both a) a sphere of radius equal to the jump size, and b) at least N Actors.

提交回复
热议问题