applyMatrix4 method

void applyMatrix4(
  1. Matrix4 matrix
)

Implementation

void applyMatrix4(Matrix4 matrix) {
  var position = attributes["position"];
  if (position != null) {
    position.applyMatrix4(matrix);
    position.needsUpdate = true;
  }

  var normal = attributes["normal"];

  if (normal != null) {
    var normalMatrix = Matrix3().getNormalMatrix(matrix);

    normal.applyNormalMatrix(normalMatrix);

    normal.needsUpdate = true;
  }

  var tangent = attributes["tangent"];

  if (tangent != null) {
    tangent.transformDirection(matrix);

    tangent.needsUpdate = true;
  }

  if (boundingBox != null) {
    computeBoundingBox();
  }

  if (boundingSphere != null) {
    computeBoundingSphere();
  }
}