setXYZ method
Sets the x, y and z components of the vector at the given index.
Implementation
void setXYZ(int index, double x, double y, double z) {
int idx = index * itemSize;
array[idx + 0] = x.toDouble();
array[idx + 1] = y.toDouble();
array[idx + 2] = z.toDouble();
}