|
@@ -413,6 +413,9 @@ THREE.Box3.prototype = {
|
|
|
|
|
|
return function ( matrix ) {
|
|
|
|
|
|
+ // transform of empty box is an empty box.
|
|
|
+ if( this.isEmpty() ) return this;
|
|
|
+
|
|
|
// NOTE: I am using a binary pattern to specify all 2^3 combinations below
|
|
|
points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000
|
|
|
points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001
|
|
@@ -423,7 +426,6 @@ THREE.Box3.prototype = {
|
|
|
points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110
|
|
|
points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111
|
|
|
|
|
|
- this.makeEmpty();
|
|
|
this.setFromPoints( points );
|
|
|
|
|
|
return this;
|