QuadTree

QuadTree

Construction: QuadTree newObj = QuadTree();
Clone: QuadTree newObj = QuadTree(other);

QuadTree is a container used to store indexes (integers) to objects using a latitude-longitude location.

Methods

int Add(double aLatitude, double aLongitude, int aId)

Stores a point in the quad-tree at the specified latitude-longitude. aId can be any script integer.

bool Remove(int aId)

Finds and removes aId from the QuadTree. Returns ‘true’ if successful.

Array<int> InRange(double aLatitude, double aLongitude, double aRange)

Returns a list of indexes that are within horizontal range of the specified location (latitude-longitude) and range (meters).