pcfilter VEX function
Filters the points found by pcopen using a simple reconstruction filter.
Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex
-
float pcfilter(int handle, string channel_name) -
vector pcfilter(int handle, string channel_name) -
vector4 pcfilter(int handle, string channel_name) -
matrix pcfilter(int handle, string channel_name) -
matrix3 pcfilter(int handle, string channel_name)
Filters the points queued up by pcopen using a simple reconstruction filter.
This function is roughly equivalent to:
float pcfilter(int handle; string channel) { float sum, w, d; float value, result = 0; while (pciterate(handle)) { pcimport(handle, "point.distance", d); pcimport(handle, channel, value); w = 1 - smooth(0, radius, d); sum += w; result += w * value; } result /= sum; return result; }