Compute and store a one-off signed distance function from a triangulated mesh.