RTree Class

RTree Class

Represents a spatial search structure based on implementations of the R-tree algorithm by Toni Gutman.
Inheritance Hierarchy
SystemObject
  Rhino.GeometryRTree

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public class RTree : IDisposable
Public Class RTree
	Implements IDisposable

The RTree type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleRTree
Initializes a new, empty instance of the tree.
Top
Properties
  NameDescription
Public propertyCount
Gets the number of items in this tree.
Top
Methods
  NameDescription
Public methodClear
Removes all elements.
Public methodStatic memberCreateFromPointArray
Constructs a new tree with an element for each pointcloud point.
Public methodStatic memberCreateMeshFaceTree
Constructs a new tree with an element for each face in the mesh. The element id is set to the index of the face.
Public methodStatic memberCreatePointCloudTree
Constructs a new tree with an element for each pointcloud point.
Public methodDispose
Actively reclaims unmanaged resources that this instance uses.
Protected methodDispose(Boolean)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

Public methodEquals (Inherited from Object.)
Protected methodFinalize
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
(Overrides ObjectFinalize.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInsert(BoundingBox, Int32)
Inserts an element into the tree.
Public methodInsert(BoundingBox, IntPtr)
Inserts an element into the tree.
Public methodInsert(Point2d, Int32)
Inserts an element into the tree.
Public methodInsert(Point2d, IntPtr)
Inserts an element into the tree.
Public methodCode exampleInsert(Point3d, Int32)
Inserts an element into the tree.
Public methodInsert(Point3d, IntPtr)
Inserts an element into the tree.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodStatic memberPoint3dClosestPoints
Finds the point in a list of 3D points that is closest to a test point.
Public methodStatic memberPoint3dKNeighbors
Finds a certain amout of points in a list of 3D points that are the k-closest to a test point.
Public methodStatic memberPointCloudClosestPoints
Finds the point in a list of 3D points that is closest to a test point.
Public methodStatic memberPointCloudKNeighbors
Finds a certain amout of points in a list of 3D points that are the k-closest to a test point.
Public methodRemove(BoundingBox, Int32)
Removes an element from the tree.
Public methodRemove(BoundingBox, IntPtr)
Removes an element from the tree.
Public methodRemove(Point2d, Int32)
Removes an element from the tree.
Public methodRemove(Point3d, Int32)
Removes an element from the tree.
Public methodRemove(Point3d, IntPtr)
Removes an element from the tree.
Public methodSearch(BoundingBox, EventHandlerRTreeEventArgs)
Searches for items in a bounding box.

The bounding box can be singular and contain exactly one single point.

Public methodSearch(Sphere, EventHandlerRTreeEventArgs)
Searches for items in a sphere.
Public methodSearch(BoundingBox, EventHandlerRTreeEventArgs, Object)
Searches for items in a bounding box.

The bounding box can be singular and contain exactly one single point.

Public methodCode exampleSearch(Sphere, EventHandlerRTreeEventArgs, Object)
Searches for items in a sphere.
Public methodStatic memberSearchOverlaps
Searches two R-trees for all pairs elements whose bounding boxes overlap.
Public methodToString (Inherited from Object.)
Top
Remarks
The opennurbs rtree code is a modifed version of the free and unrestricted R-tree implementation obtianed from http://www.superliminal.com/sources/sources.htm .
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.8
See Also