nanome.util.octree module¶
-
class
Octree
(world_size=5000, max_per_node=8)[source]¶ Bases:
object
Tree containing inserted objects and their positions.Commonly used to get neighboring objects.-
add
(data, position)[source]¶ - Add a data node to the octree.
Parameters: - data (
object
) – Data node to add to the octree - position – Position of this data node
- data (
-
get_near
(pos, radius, max_result_nb=None)[source]¶ - Get nodes within the octree neighboring a position.
Parameters:
-
get_near_append
(pos, radius, out_list, max_result_nb=None)[source]¶ - Functions like get_near, but with an externally controlled list.
Parameters:
-