docs.unity3d.com
    Show / Hide Table of Contents

    Class RTree

    Inheritance
    Object
    RTree
    Namespace: Unity.Reflect.Collections
    Syntax
    public sealed class RTree : ISpatialCollection<ISpatialObject>, IDisposable

    Constructors

    RTree(Int32, Int32, Action<ISpatialObject>, Action<ISpatialObject>, Action<ISpatialObject>)

    Declaration
    public RTree(int minPerNode, int maxPerNode, Action<ISpatialObject> onNodeAdded = null, Action<ISpatialObject> onNodeChanged = null, Action<ISpatialObject> onNodeRemoved = null)
    Parameters
    Type Name Description
    Int32 minPerNode
    Int32 maxPerNode
    Action<ISpatialObject> onNodeAdded
    Action<ISpatialObject> onNodeChanged
    Action<ISpatialObject> onNodeRemoved

    Properties

    Bounds

    Declaration
    public Bounds Bounds { get; }
    Property Value
    Type Description
    Bounds
    Implements
    ISpatialCollection<TObject>.Bounds

    Depth

    Declaration
    public int Depth { get; }
    Property Value
    Type Description
    Int32
    Implements
    ISpatialCollection<TObject>.Depth

    ObjectCount

    Declaration
    public int ObjectCount { get; }
    Property Value
    Type Description
    Int32
    Implements
    ISpatialCollection<TObject>.ObjectCount

    Methods

    Add(ISpatialObject)

    Declaration
    public void Add(ISpatialObject obj)
    Parameters
    Type Name Description
    ISpatialObject obj
    Implements
    ISpatialCollection<TObject>.Add(TObject)

    Dispose()

    Declaration
    public void Dispose()

    DrawDebug(Gradient, Gradient, Single, Int32)

    Declaration
    public void DrawDebug(Gradient nodeGradient, Gradient objectGradient, float maxPriority, int maxDepth)
    Parameters
    Type Name Description
    Gradient nodeGradient
    Gradient objectGradient
    Single maxPriority
    Int32 maxDepth
    Implements
    ISpatialCollection<TObject>.DrawDebug(Gradient, Gradient, Single, Int32)

    Remove(ISpatialObject)

    Declaration
    public void Remove(ISpatialObject obj)
    Parameters
    Type Name Description
    ISpatialObject obj
    Implements
    ISpatialCollection<TObject>.Remove(TObject)

    Search<T>(Predicate<ISpatialObject>, Func<ISpatialObject, Single>, Action<T>, Int32, Single)

    Declaration
    public void Search<T>(Predicate<ISpatialObject> predicate, Func<ISpatialObject, float> prioritizer, Action<T> onObjectMatch, int maxResultsCount = 2147483647, float nodePriorityThreshold = 3.40282347E+38F)
        where T : ISpatialObject
    Parameters
    Type Name Description
    Predicate<ISpatialObject> predicate
    Func<ISpatialObject, Single> prioritizer
    Action<T> onObjectMatch
    Int32 maxResultsCount
    Single nodePriorityThreshold
    Type Parameters
    Name Description
    T
    Implements
    ISpatialCollection<TObject>.Search<T>(Predicate<ISpatialObject>, Func<ISpatialObject, Single>, Action<T>, Int32, Single)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023