浏览代码

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

Mr.doob 13 年之前
父节点
当前提交
e1451ce313
共有 1 个文件被更改,包括 0 次插入12 次删除
  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.origin = origin || new THREE.Vector3();
 	this.direction = direction || new THREE.Vector3();
 	this.direction = direction || new THREE.Vector3();
 
 
-	this.intersectScene = function ( scene ) {
-
-		return this.intersectObjects( scene.children );
-
-	};
-
 	this.intersectObjects = function ( objects ) {
 	this.intersectObjects = function ( objects ) {
 
 
 		var i, l, object,
 		var i, l, object,
@@ -46,12 +40,6 @@ THREE.Ray = function ( origin, direction ) {
 
 
 		var intersect, intersects = [];
 		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 ) {
 		if ( object instanceof THREE.Particle ) {
 
 
 			var distance = distanceFromIntersection( this.origin, this.direction, object.matrixWorld.getPosition() );
 			var distance = distanceFromIntersection( this.origin, this.direction, object.matrixWorld.getPosition() );