Ahhh! Now I know what you are meaning!
Sorry, I understood you thought that vec_for_vertex is the function for deformation, my fault.
Of course, if you have a wold coordinate and want to compare it with an Terrain/Model-Vertex you need the World-Coordinate of the Vertex (vec_for_vertex), after that you can search the Mesh-Coordinate (vec_for_mesh).
I made it this way in my code but haven't look exactly for that in Masters Code.
So keep your opinion you are right ;-)!