applyMatrix4 method
dynamic
applyMatrix4(
- dynamic matrix
Implementation
applyMatrix4(matrix) {
var normalMatrix = three.Matrix3().getNormalMatrix(matrix);
for (var i = 0, il = vertices.length; i < il; i++) {
var vertex = vertices[i];
vertex.applyMatrix4(matrix);
}
for (var i = 0, il = faces.length; i < il; i++) {
var face = faces[i];
face.normal.applyMatrix3(normalMatrix).normalize();
for (var j = 0, jl = face.vertexNormals.length; j < jl; j++) {
face.vertexNormals[j].applyMatrix3(normalMatrix).normalize();
}
}
if (boundingBox != null) {
computeBoundingBox();
}
if (boundingSphere != null) {
computeBoundingSphere();
}
verticesNeedUpdate = true;
normalsNeedUpdate = true;
return this;
}