Browse Source

Removed hierarchy support in Ray. Removed .intersectScene() to avoid disappointment.

Mr.doob 13 years ago
parent
commit
e1451ce313
1 changed files with 0 additions and 12 deletions
  1. 0 12
      src/core/Ray.js

+ 0 - 12
src/core/Ray.js

@@ -7,12 +7,6 @@ THREE.Ray = function ( origin, direction ) {
 	this.origin = origin || new THREE.Vector3();
 	this.direction = direction || new THREE.Vector3();
 
-	this.intersectScene = function ( scene ) {
-
-		return this.intersectObjects( scene.children );
-
-	};
-
 	this.intersectObjects = function ( objects ) {
 
 		var i, l, object,
@@ -46,12 +40,6 @@ THREE.Ray = function ( origin, direction ) {
 
 		var intersect, intersects = [];
 
-		for ( var i = 0, l = object.children.length; i < l; i ++ ) {
-
-			Array.prototype.push.apply( intersects, this.intersectObject( object.children[ i ] ) );
-
-		}
-
 		if ( object instanceof THREE.Particle ) {
 
 			var distance = distanceFromIntersection( this.origin, this.direction, object.matrixWorld.getPosition() );