Class TriangleQuadTree | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class TriangleQuadTree

    A Quadtree implementation optimized for triangles.

    Inheritance
    System.Object
    TriangleQuadTree
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: UnityEngine.Experimental.U2D.TriangleNet.Tools
    Syntax
    public class TriangleQuadTree

    Constructors

    TriangleQuadTree(Mesh, Int32, Int32)

    Initializes a new instance of the TriangleQuadTree class.

    Declaration
    public TriangleQuadTree(Mesh mesh, int maxDepth = 10, int sizeBound = 10)
    Parameters
    Type Name Description
    Mesh mesh

    Mesh containing triangles.

    System.Int32 maxDepth

    The maximum depth of the tree.

    System.Int32 sizeBound

    The maximum number of triangles contained in a leaf.

    Remarks

    The quadtree does not track changes of the mesh. If a mesh is refined or changed in any other way, a new quadtree has to be built to make the point location work.

    A node of the tree will be split, if its level if less than the max depth parameter AND the number of triangles in the node is greater than the size bound.

    Methods

    Query(Double, Double)

    Declaration
    public ITriangle Query(double x, double y)
    Parameters
    Type Name Description
    System.Double x
    System.Double y
    Returns
    Type Description
    ITriangle
    Back to top
    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