Creates a new entity that has a point query structure, and can be passed to other functions in this service.
The created entity has an internal hidden component, and an external PointQueryStructTag component.
To free the allocated memory used by the structure, destroy the entity.
Query for the closest point to point in ps. Closeness is based on Euclidean distance. This query only considers points inside the hull around the point, which is described by maxDist (exclusive) and minDist (inclusive).
Returns the id of the closest point as specified when it was added.
Entity created via createPointQueryStruct
Query for the n closest points to point in ps. Closeness is based on Euclidean distance. This query only considers points inside the hull around the point, which is described by maxDist (exclusive) and minDist (inclusive). Returns a list of ids and distances of the closest points, sorted by most distant first. This is slower than single-point queries. For best results, n should not be too large.
Entity created via createPointQueryStruct
Reference query for testing only. It yields the same results as queryNClosestPoints, but takes much longer to execute. Avoid using it.
Entity created via createPointQueryStruct
Prepares and resets a point query structure. You can use this to clear a query structure, or optimize allocations when the number of items is known ahead of time.
Entity created via createPointQueryStruct
Number of points expected. This is an optional hint for performance and does not need to match exactly.
Generated using TypeDoc
Adds a single point to the query structure. The point id is returned when the point is found. The id Entity does not have to be a valid entity, and can be treated as an integer id. The only disallowed id is the NONE entity, which is used internally.