Browse Source

adopt Sphere class as geometry.boundingSphere in extras.

Ben Houston 12 years ago
parent
commit
97d43cd4cd

+ 1 - 1
src/extras/geometries/CircleGeometry.js

@@ -46,7 +46,7 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
     this.computeCentroids();
     this.computeCentroids();
     this.computeFaceNormals();
     this.computeFaceNormals();
 
 
-    this.boundingSphere = { radius: radius };
+    this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius );
 
 
 };
 };
 
 

+ 1 - 1
src/extras/geometries/PolyhedronGeometry.js

@@ -139,7 +139,7 @@ THREE.PolyhedronGeometry = function ( vertices, faces, radius, detail ) {
 
 
 	this.computeCentroids();
 	this.computeCentroids();
 
 
-	this.boundingSphere = { radius: radius };
+    this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius );
 
 
 };
 };
 
 

+ 1 - 1
src/extras/geometries/SphereGeometry.js

@@ -89,7 +89,7 @@ THREE.SphereGeometry = function ( radius, widthSegments, heightSegments, phiStar
 	this.computeCentroids();
 	this.computeCentroids();
 	this.computeFaceNormals();
 	this.computeFaceNormals();
 
 
-	this.boundingSphere = { radius: this.radius };
+    this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius );
 
 
 };
 };