浏览代码

BufferGeometry: Compute BoundingBox/Sphere after applyMatrix(). #6167

Mr.doob 10 年之前
父节点
当前提交
48b299b23b
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      src/core/BufferGeometry.js

+ 12 - 0
src/core/BufferGeometry.js

@@ -84,6 +84,18 @@ THREE.BufferGeometry.prototype = {
 
 
 		}
 		}
 
 
+		if ( this.boundingBox instanceof THREE.Box3 ) {
+
+			this.computeBoundingBox();
+
+		}
+
+		if ( this.boundingSphere instanceof THREE.Sphere ) {
+
+			this.computeBoundingSphere();
+
+		}
+
 	},
 	},
 
 
 	center: function () {
 	center: function () {