T_Rhino_Geometry_RTree - mcneel/rhinocommon-api-docs GitHub Wiki

RTree Class

Represents a spatial search structure based on implementations of the R-tree algorithm by Toni Gutman.

Inheritance Hierarchy

System.Object
  Rhino.Geometry.RTree
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public class RTree : IDisposable

VB

Public Class RTree
	Implements IDisposable

The RTree type exposes the following members.

Constructors

 

Name Description
Public methodCode example RTree Initializes a new, empty instance of the tree.
  Back to Top

Properties

 

Name Description
Public property Count Gets the number of items in this tree.
  Back to Top

Methods

 

Name Description
Public method Clear Removes all elements.
Public methodStatic member CreateMeshFaceTree 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 member CreatePointCloudTree Constructs a new tree with an element for each pointcloud point.
Public method Dispose() Actively reclaims unmanaged resources that this instance uses.
Protected method Dispose(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 method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Passively reclaims unmanaged resources when the class user did not explicitly call Dispose(). (Overrides Object.Finalize().)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Insert(BoundingBox, Int32) Inserts an element into the tree.
Public method Insert(BoundingBox, IntPtr) Inserts an element into the tree.
Public method Insert(Point2d, Int32) Inserts an element into the tree.
Public method Insert(Point2d, IntPtr) Inserts an element into the tree.
Public methodCode example Insert(Point3d, Int32) Inserts an element into the tree.
Public method Insert(Point3d, IntPtr) Inserts an element into the tree.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove(BoundingBox, Int32) Removes an element from the tree.
Public method Remove(BoundingBox, IntPtr) Removes an element from the tree.
Public method Remove(Point2d, Int32) Removes an element from the tree.
Public method Remove(Point3d, Int32) Removes an element from the tree.
Public method Remove(Point3d, IntPtr) Removes an element from the tree.
Public method Search(BoundingBox, EventHandler(RTreeEventArgs)) Searches for items in a bounding box. The bounding box can be singular and contain exactly one single point.
Public method Search(Sphere, EventHandler(RTreeEventArgs)) Searches for items in a sphere.
Public method Search(BoundingBox, EventHandler(RTreeEventArgs), Object) Searches for items in a bounding box. The bounding box can be singular and contain exactly one single point.
Public methodCode example Search(Sphere, EventHandler(RTreeEventArgs), Object) Searches for items in a sphere.
Public methodStatic member SearchOverlaps Searches two R-trees for all pairs elements whose bounding boxes overlap.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
  Back to 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

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Rhino.Geometry Namespace

⚠️ **GitHub.com Fallback** ⚠️