Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

No commit message

  • Loading branch information...
commit f902b76d27f963029fcd4e7131892f1253280bc9 1 parent 2d4cea1
@imbcmdth authored
Showing with 1 addition and 80 deletions.
  1. +1 −80 README
View
81 README
@@ -1,80 +1 @@
-h2. *RTree*
-
-bq. *RTree* ( _[ Number *max_node_width* ]_ )
-
-h3. Parameters:
-
-bq. *max_node_width* : _optional_ : The maximum width of a node before a split is performed[1].
-
-h3. Returns:
-
-bq. An empty *RTree* object.
-
-h3. Usage:
-
-bq. Make a new RTree with a max node width of 10:
-@var myRTree = new RTree(10);@
-
-
-h2. *RTree.insert*
-
-bq. *RTree.insert* ( Rectangle[2] *bounds*, Object *element* )
-
-h3. Parameters:
-
-bq. *bounds* : *required* : A minimally bounding box for *element*.
-*element* : *required* : An object to add to the R-Tree.
-
-h3. Returns:
-
-bq. Nothing.
-
-h3. Usage:
-
-bq. Insert a 10x10 object that starts at position 10x10:
-@myRTree.insert({x:10, y:10, w:10, h:10}, myObject);@
-
-
-h2. *RTree.remove*
-
-bq. *RTree.remove* ( Rectangle[2] *area* _[, Object *element* ]_ )
-
-h3. Parameters:
-
-bq. *area* : *required* : An area to search within.
-*element* : _optional_ : An object to remove from the R-Tree. If no object is specified, *all* elements that touch *area* are deleted.
-
-h3. Returns:
-
-bq. The number of objects deleted from the R-Tree.
-
-h3. Usage:
-
-bq. Deletes all object that touch the 10x10 rectangle starting at position 10x10:
-@var myDelCount = myRTree.delete({x:10, y:10, w:10, h:10});@
-Delete only specific_object if it touches the 10x10 rectangle starting at position 10x10:
-@var myDelCount = myRTree.delete({x:10, y:10, w:10, h:10}, specific_object);@
-
-
-h2. *RTree.search*
-
-bq. *RTree.search* ( Rectangle[2] *area* )
-
-h3. Parameters:
-
-bq. *area* : *required* : An area to search within.
-
-h3. Returns:
-
-bq. An array of objects that overlap or touch *area*.
-
-h3. Usage:
-
-bq. Search a 10x10 area that starts at position 10x10:
-@var myObjects = myRTree.search({x:10, y:10, w:10, h:10});@
-
-h2. Notes
-
-fn1. Default max node width is currently 6.
-
-fn2. A _Rectangle_ is *any* object with public x, y, w, h properties. The object itself is not saved or used directly but copies are made of its x, y, w, h properties.
+Go to the Wiki or more information.
Please sign in to comment.
Something went wrong with that request. Please try again.