xyzdist() finds the distance between the nearest point on a primitive and the point specified.

Returns the shortest distance.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 03:53 PM

xyzdistfloat xfloatyfloat zString SOPfloat prim_numfloat return_type)

//the return types:
//0 returns minimum distance
//1 returns the u parametric value at the point of minimum distance
//2 returns the v parametric value at the point of minimum distance
//3 returns the closest primitive number

/ -> echo `xyzdist( 0, 0, 0,"/obj/model/merge1",1,0)`

/ -> echo `xyzdist(point("../sphere2",0,"P",0),point("../sphere2",0,"P",1),point("../sphere2",0,"P",2),"/obj/model/merge1",1,0)`


Download: 514 B

Please login or Click Here to register for downloads
Creative Commons License
xyzdist by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at
Permissions beyond the scope of this license may be available at