unserialize VEX function

Turns a flat array of floats into an array of vectors or matrices.

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

See also: serialize

  1. float [] serialize(vector [])

  2. float [] serialize(vector4 [])

  3. float [] serialize(matrix3 [])

  4. float [] serialize(matrix4 [])

The inverse operation to serialize. This operation takes an array of float values and creates a new array of vectors or floats by taking each float and assigning it to the next component of the vector or matrix in the output array. For example:

vector v[]
float  f[] = { 1, 2, 3,  7, 8, 9 };

v = vector(unserialize(f));
// Now v has a length of 2 and contains { {1,2,3}, {7,8,9} }