VEX: surfacedist() but in topology distance?

   543   1   0
User Avatar
Member
696 posts
Joined: 8月 2019
オフライン
surfacedist()can find the nearest point to a given point. However, it measures the real distance along the surface, or along the edges.

I'd like to measure the distance by topology distance. In other words, given a group of points Pts, and a target point Target, I'd like to find the point among Ptsthat has shortest path to Target, assuming all the edges have a length of 1.

How to achieve this? On paper it should be simpler than surfacedist, but I can't find a function that does this.

(I know I can implement a BFS algorithm in VEX, but is there a built-in or at least simpler way?)
Edited by raincole - 2025年3月12日 14:44:54
User Avatar
Member
9402 posts
Joined: 7月 2007
オフライン
Fins Shortest Path SOP allows you to ignore edge length ( Omit Distance From Cost )
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links