SpatialTree_Coords

Description

abstract class Tinman.Terrain.Util.SpatialTree_Coords
<TBounds val>
<TCoords val>

Derived from

SpatialTree_Bounds<TBounds> abstract

Extended by

SpatialTree_Entity abstract

A generic tree data structure for storing spatial entities.

This abstract base class provides those members that depend on the type parameter for the spatial coordinate type.

Public / Methods

Distance

2 overloads


[Pure]
public abstract method Distance1 → (3)

node in : int32

The root node.

coords in : TCoords

Coordinates of point.

nearest opt : float64 = Maths.MaxDouble

The maximum value to return.

returns → float64

The smallest distance.

Finds the smallest distance from the given point to any spatial entity in the tree.


[Pure]
public abstract method Distance2 → (5)

node in : int32

The root node.

coords in : TCoords

Coordinates of point.

vertices out : Vec3I

Vertex indices that describe the location of the nearest spatial entity feature.

weights out : Vec3D

Location of the nearest spatial entity feature, given as relative weights (i.e. the weight sum is 1) of vertices out. The weights are sorted in descending order, i.e. Vec3D.X always holds the greatest weight and Vec3D.Z always holds the smallest weight.

nearest opt : float64 = Maths.MaxDouble

The maximum value to return.

returns → float64

The smallest distance.

Finds the smallest distance from the given point to any spatial entity in the tree.

Protected / Constructors

Spatial​Tree_​Coords


protected constructor SpatialTree_Coords → (2)

childCount in : int32

The tree child count.

bounds in : TBounds

The initial tree bounds.

Creates a new instance of SpatialTree_Coords.