2
0
Эх сурвалжийг харах

Octree: Removed dead code.

Mr.doob 11 жил өмнө
parent
commit
1bce53a623
1 өөрчлөгдсөн 0 нэмэгдсэн , 27 устгасан
  1. 0 27
      examples/js/Octree.js

+ 0 - 27
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;
-			
 		}
 		
 	};