computeBoundingBox() { const boundingBox = new Box3(); const w = Math.min(this.width / this.height, 1.0); const h = Math.min(this.height / this.width, 1.0); boundingBox.min.set(0, 0, 0); boundingBox.max.set(w, 1, h); boundingBox.applyMatrix4(this.getTransformation()); return boundingBox; }
computeBoundingBox() { const s = this.s0; const boundingBox = new Box3(); boundingBox.min.x = Math.min(-s.x, -1.0); boundingBox.min.y = Math.min(-s.y, -1.0); boundingBox.min.z = Math.min(-s.z, -1.0); boundingBox.max.x = Math.max(s.x, 1.0); boundingBox.max.y = Math.max(s.y, 1.0); boundingBox.max.z = Math.max(s.z, 1.0); boundingBox.applyMatrix4(this.getTransformation()); return boundingBox; }