setXYZW method

  1. @override
InterleavedBufferAttribute setXYZW(
  1. int index,
  2. num x,
  3. num y,
  4. num z,
  5. num w,
)
override

Sets the x, y, z and w components of the item at the given index.

Implementation

@override
InterleavedBufferAttribute setXYZW(int index, num x, num y, num z, num w) {
  index = index * data!.stride + offset;

  data!.array[index + 0] = x.toDouble();
  data!.array[index + 1] = y.toDouble();
  data!.array[index + 2] = z.toDouble();
  data!.array[index + 3] = w.toDouble();

  return this;
}