Merge pull request #1392 from michael-erskine/patch-1

tidy up vertices for computeTransformedBoundingBox
This commit is contained in:
Markus Schütz 2024-05-14 16:31:49 +02:00 committed by GitHub
commit 785e7a95aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,14 +197,13 @@ export class Utils {
*/
static computeTransformedBoundingBox (box, transform) {
let vertices = [
new THREE.Vector3(box.min.x, box.min.y, box.min.z).applyMatrix4(transform),
new THREE.Vector3(box.min.x, box.min.y, box.min.z).applyMatrix4(transform),
new THREE.Vector3(box.max.x, box.min.y, box.min.z).applyMatrix4(transform),
new THREE.Vector3(box.min.x, box.max.y, box.min.z).applyMatrix4(transform),
new THREE.Vector3(box.min.x, box.min.y, box.max.z).applyMatrix4(transform),
new THREE.Vector3(box.min.x, box.max.y, box.max.z).applyMatrix4(transform),
new THREE.Vector3(box.max.x, box.max.y, box.min.z).applyMatrix4(transform),
new THREE.Vector3(box.min.x, box.min.y, box.max.z).applyMatrix4(transform),
new THREE.Vector3(box.max.x, box.min.y, box.max.z).applyMatrix4(transform),
new THREE.Vector3(box.min.x, box.max.y, box.max.z).applyMatrix4(transform),
new THREE.Vector3(box.max.x, box.max.y, box.max.z).applyMatrix4(transform)
];