transformDirection method

  1. @override
InterleavedBufferAttribute transformDirection(
  1. Matrix4 m
)
override

Applies matrix m to every Vector3 element of this InterleavedBufferAttribute, interpreting the elements as a direction vectors.

Implementation

@override
InterleavedBufferAttribute transformDirection(Matrix4 m) {
  for (int i = 0, l = count; i < l; i++) {
    _vector.fromBuffer( this, i );
    _vector.transformDirection(m);
    setXYZ(i, _vector.x, _vector.y, _vector.z);
  }

  return this;
}