Maths.MeshHeight

public static class Maths.MeshHeight
Vertical "how high is the mesh over this spot" queries, answered in bulk.

Methods

At

#
public static double[] At(Mesh mesh, Point2d[] queryPoints, double tolerance = 0)
For each 2d query point, the z of the topmost mesh face directly above or below it.
Remarks: This is a bulk query on purpose: the spatial index over the mesh is built once per call and reused for every query point. Calling it once per point in a loop rebuilds that index every time, so batch the points instead.
mesh (Mesh)Mesh to measure. Not modified.
queryPoints (Point2d[])Points to measure over, in world xy.
tolerance (double = 0)Intersection tolerance. Pass zero to let the native implementation choose its own small default.
One height per query point, in the same order, or double.NaN where the vertical ray misses the mesh. Null if the query could not be answered at all.