You are viewing the documentation for Houdini 9.5. Read the latest version (Houdini 14.0) here.

setcomp VEX function

Sets a single component of a vector type, matrix type, or array.

Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex

See also: getcomp

  1. void setcomp(vector &target, float value, int index)

  2. void setcomp(vector4 &target, float value, int index)

  3. void setcomp(matrix &target, float value, int row, int col)

  4. void setcomp(matrix3 &target, float value, int row, int col)

  5. type setcomp(arraytype array; type value, int index)

Note

You can also use name[index] = value notation to set the value at index for vectors and arrays. See arrays.