diff --git a/examples/js/Octree.js b/examples/js/Octree.js index 3cf644b6145d747eb55555cfa9b9ffef7d99efdc..5cd9e6dd0f51a61deb9dbf0ef0aabad9e528f2d9 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; - } };