Get
Input from ancillary
Section titled “Input from ancillary”//where 1 is the input 2 of the attribute wrangles node@P = point(1,"P",@ptnum);
Get number of points from ancillary
Section titled “Get number of points from ancillary”// detail modeint numpnts = npoints(1);printf("%g" , numpnts);
Bounding box from second input (1)
Section titled “Bounding box from second input (1)”// Get bounding box from second inputvector bbox = getbbox_max(1);// set/create new vector with only one componentvector maxy = set(0, bbox.y, 0);v@P = v@P + maxy;
Get the Component of a Matrix
Section titled “Get the Component of a Matrix”float some_val = getcomp(4@transform, 0, 1);printf("%f", some_val);
Get Point Neighbors
Section titled “Get Point Neighbors”// point wrangle, points that share an edgei[]@Neighbors = neighbours(0, @ptnum);// or sortedi[]@Neighbors = sort(neighbours(0, @ptnum));
Get Interpolated Value from pcloud
Section titled “Get Interpolated Value from pcloud”// run over pointsint samples = chi("samples");float radius = chf("radius");
int handle = pcopen(1, "P", @P, radius, samples);vector rest = pcfilter(handle, 'rnml');v@rnml = rest;
Interpolated Values from xyzdist and primuv
Section titled “Interpolated Values from xyzdist and primuv”// run over pointsint posprim;vector param_uv;float maxdist = 10;float dist = xyzdist(1,@P,posprim,param_uv,maxdist);
float curveu = primuv(1,"curveu",posprim,param_uv);vector tangentu = primuv(1,"tangentu",posprim,param_uv);f@curveu = curveu;v@tangentu = tangentu;
source: The joy of xyzdist() and primuv()
Get Point/Primitive Groups
Section titled “Get Point/Primitive Groups”Get all the groups as an array
// run over pointsstring groups[] = detailintrinsic(0, "pointgroups");s[]@tags = groups;
example found on: Groups to Attribute with VEX