pointdist expression function

Returns the distance between a point and a primitive.

All Usage Examples

See also: primdist, xyzdist, nearpoint

Usage

pointdist(surface_node, point_num, surface_node, prim_num, return_type)

Given a point and a primitive, this function finds the distance between the point and the closest spot on the primitive. If prim_num is minus one, the closest distance to any primitive is found.

Examples

pointdist("/obj/geo1/add1", 0, "/obj/geo1/grid1", 0, 0)

Returns the distance between point 0 of add1 and the closest spot from the surface of grid1 primitive number 0. If the return_type were 1, the u parametric value that is closest to the point would be returned.