applyToVector3Array method

List<double> applyToVector3Array (
  1. List<double> array,
  2. [int offset = 0]
)

Multiply this to each set of xyz values in array starting at offset.

Implementation

List<double> applyToVector3Array(List<double> array, [int offset = 0]) {
  for (int i = 0, j = offset; i < array.length; i += 3, j += 3) {
    final Vector3 v = new Vector3.array(array, j)..applyMatrix4(this);
    array[j] = v.storage[0];
    array[j + 1] = v.storage[1];
    array[j + 2] = v.storage[2];
  }

  return array;
}