copyAt method

InterleavedBuffer copyAt(
  1. int index1,
  2. InterleavedBuffer attribute,
  3. int index2
)

Copies data from attribute[index2] to arrayindex1.

Implementation

InterleavedBuffer copyAt(int index1, InterleavedBuffer attribute, int index2) {
  index1 *= stride;
  index2 *= attribute.stride;

  for (int i = 0, l = stride; i < l; i++) {
    array[index1 + i] = attribute.array[index2 + i];
  }

  return this;
}