Skip to content
imbcmdth edited this page Sep 13, 2010 · 31 revisions

RTree ( max_node_width )

Parameters:

max_node_width : optional : The maximum width of a node before a split is forced. Defaults to 6.

Returns:

A new and empty RTree object.

Usage:

var myRTree = new RTree(10); // Makes a new RTree with a max node width of 10.

RTree.count ( area_to_search )

Parameters:

area_to_search : required : An area to search within.

Returns:

The number of objects that overlap or touch area_to_search.

Usage:

var myCount = myRTree.count({x:10, y:10, w:10, h:10}); // searches a 10×10 area that starts at position 10×10.

RTree.search

RTree.insert

RTree.remove

Clone this wiki locally