From 1bce53a623030307c4ee3baf5330ea4c4d43b42c Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 21 Feb 2014 18:43:41 -0500 Subject: [PATCH] Octree: Removed dead code. --- examples/js/Octree.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/examples/js/Octree.js b/examples/js/Octree.js index 3cf644b614..5cd9e6dd0f 100644 --- a/examples/js/Octree.js +++ b/examples/js/Octree.js @@ -624,12 +624,6 @@ this.face3 = true; this.utilVec31FaceBounds = new THREE.Vector3(); - } else if ( part instanceof THREE.Face4 ) { - - this.face4 = true; - this.faces = part; - this.utilVec31FaceBounds = new THREE.Vector3(); - } else if ( part instanceof THREE.Vector3 ) { this.vertices = part; @@ -660,11 +654,6 @@ this.radius = this.getFace3BoundingRadius( this.object, this.faces ); this.position.copy( this.faces.centroid ).applyMatrix4( this.object.matrixWorld ); - } else if ( this.face4 ) { - - this.radius = this.getFace4BoundingRadius( this.object, this.faces ); - this.position.copy( this.faces.centroid ).applyMatrix4( this.object.matrixWorld ); - } else if ( this.vertices ) { this.radius = this.object.material.size || 1; @@ -710,22 +699,6 @@ return radius; - }, - - getFace4BoundingRadius: function ( object, face ) { - - var geometry = object.geometry || object, - vertices = geometry.vertices, - centroid = face.centroid, - va = vertices[ face.a ], vb = vertices[ face.b ], vc = vertices[ face.c ], vd = vertices[ face.d ], - centroidToVert = this.utilVec31FaceBounds, - radius; - - centroid.addVectors( va, vb ).add( vc ).add( vd ).divideScalar( 4 ); - radius = Math.max( centroidToVert.subVectors( centroid, va ).length(), centroidToVert.subVectors( centroid, vb ).length(), centroidToVert.subVectors( centroid, vc ).length(), centroidToVert.subVectors( centroid, vd ).length() ); - - return radius; - } }; -- GitLab