Logo Euclid.BVH

LineBvh2d Type

A static Bounding Volume Hierarchy (BVH) over 2D lines built from Euclid bounding rectangles (BRect).

Instance members

Instance member Description

this.ClosePairs

Full Usage: this.ClosePairs

Parameters:
    maxDistance : float

Returns: ResizeArray<LinePair2d>

Finds all pairs of lines closer than the given maximum distance.

maxDistance : float
Returns: ResizeArray<LinePair2d>

this.ClosestLine

Full Usage: this.ClosestLine

Parameters:
    pt : Pt
    ?skipIdx : int

Returns: int * float

Finds the closest line in the tree to the given 2D point.

pt : Pt
?skipIdx : int
Returns: int * float

this.ClosestLine

Full Usage: this.ClosestLine

Parameters:
    query : Line2D
    ?skipIdx : int

Returns: int * float

Finds the closest line in the tree to the given query line.

query : Line2D
?skipIdx : int
Returns: int * float

this.ClosestPair

Full Usage: this.ClosestPair

Returns: LinePair2d

Finds the pair of closest lines among all lines in the tree.

Returns: LinePair2d

this.ClosestPoint

Full Usage: this.ClosestPoint

Parameters:
Returns: Pt

Finds the point on any line in the tree that is closest to the given 2D point.

pt : Pt
Returns: Pt

this.Count

Full Usage: this.Count

Returns: int

The count of lines in this LineBvh2d.

Returns: int

this.Lines

Full Usage: this.Lines

Returns: IList<Line2D>

The input lines this LineBvh2d was built from. Do not mutate this array.

Returns: IList<Line2D>

this.LinesInRect

Full Usage: this.LinesInRect

Parameters:
    rect : BRect
    ?tolerance : float

Returns: ResizeArray<int>

Finds all lines whose bounding rectangle is within tolerance of the given rectangle.

rect : BRect
?tolerance : float
Returns: ResizeArray<int>

this.LinesNearPoint

Full Usage: this.LinesNearPoint

Parameters:
    pt : Pt
    ?tolerance : float

Returns: ResizeArray<int>

Finds all lines whose bounding rectangle is within tolerance of the given point.

pt : Pt
?tolerance : float
Returns: ResizeArray<int>

this.NearestNeighbors

Full Usage: this.NearestNeighbors

Returns: LinePair2d[]

For every line in the tree finds its nearest neighbor line.

Returns: LinePair2d[]

this.Rectangle

Full Usage: this.Rectangle

Returns: BRect

The axis aligned bounding rectangle around all lines in this LineBvh2d.

Returns: BRect

this.Tree

Full Usage: this.Tree

Returns: Bvh2d<Line2D>

The underlying 2D tree.

Returns: Bvh2d<Line2D>

Static members

Static member Description

LineBvh2d.DefaultLeafSize

Full Usage: LineBvh2d.DefaultLeafSize

Returns: int
Returns: int

LineBvh2d.create (lines, ?leafSize)

Full Usage: LineBvh2d.create (lines, ?leafSize)

Parameters:
    lines : Line2D[]
    ?leafSize : int

Returns: LineBvh2d

Builds a LineBvh2d from the given lines.

lines : Line2D[]
?leafSize : int
Returns: LineBvh2d

Type something to start searching.