Class KdTreeCollection
KdTree Collection is a feature collection using KdTree mainly for distance based searchs like "find all buildings 100m around
player" or "find 10 closest buildings to this point".
KdTree structures focus on search performance so querying for features will be very fast using this collection. On the other
hand it's not good for dynamic/moving entities but we don't have such features on map so it's one of the best options for maps.
Inheritance
ScriptableObject
KdTreeCollection
Namespace:Mapbox.Unity.MeshGeneration
Assembly:cs.temp.dll.dll
Syntax
public class KdTreeCollection : FeatureCollectionBase
Fields
Count
Declaration
Field Value
Type |
Description |
System.Int32 |
|
Methods
AddFeature(Double[], VectorEntity)
Declaration
public override void AddFeature(double[] position, VectorEntity ve)
Parameters
Type |
Name |
Description |
System.Double[] |
position |
|
VectorEntity |
ve |
|
Overrides
Initialize()
Declaration
public override void Initialize()
Overrides
NearestNeighbors(Double[], Int32, Single)
Declaration
public NearestNeighbour<VectorEntity> NearestNeighbors(double[] v, int maxCount, float range)
Parameters
Type |
Name |
Description |
System.Double[] |
v |
|
System.Int32 |
maxCount |
|
System.Single |
range |
|
Returns