warp.mesh_query_point_sign_normal#

warp.mesh_query_point_sign_normal(
id: uint64,
point: vec3f,
max_dist: float32,
epsilon: float32,
) MeshQueryPoint#
  • Kernel

  • Differentiable

Compute the closest point on the warp.Mesh with identifier id to the given point in space.

Identifies the sign of the distance (inside/outside) using the angle-weighted pseudo normal. This approach to sign determination is robust for well conditioned meshes that are watertight and non-self intersecting. It is also comparatively fast to compute.

Parameters:
  • id – The mesh identifier

  • point – The point in space to query

  • max_dist – Mesh faces above this distance will not be considered by the query

  • epsilon – Epsilon treating distance values as equal, when locating the minimum distance vertex/face/edge, as a fraction of the average edge length, also for treating closest point as being on edge/vertex default 1e-3.