given a mesh made entirely of quads, where every vertex has valence n (with n >= 3), and does not lie on the same plane, I need to find the distance of every vertex in the m
This may be better suited for the theoretical computer science stack exchange. See this post on shortest edge paths.
https://cstheory.stackexchange.com/questions/6822/shortest-paths-disallowing-each-edge
and perhaps
https://cstheory.stackexchange.com/questions/4034/complexity-of-computing-shortest-paths-in-the-plane-with-polygonal-obstacles