Skip to content

Commit 8c2d2e9

Browse files
committed
boundingSphere -> getBoundingSphere(), boundingBox -> getBoundingBox() per @mrdoob
1 parent 2b4373b commit 8c2d2e9

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/math/Box3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ THREE.Box3.prototype = {
226226

227227
},
228228

229-
boundingSphere: function ( optionalTarget ) {
229+
getBoundingSphere: function ( optionalTarget ) {
230230

231231
var result = optionalTarget || new THREE.Sphere();
232232

src/math/Sphere.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ THREE.Sphere.prototype = {
8585

8686
},
8787

88-
boundingBox: function ( optionalTarget ) {
88+
getBoundingBox: function ( optionalTarget ) {
8989

9090
var box = optionalTarget || new THREE.Box3();
9191

test/math/Box3.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ test( "isIntersectionBox", function() {
208208
ok( ! b.isIntersectionBox( c ), "Passed!" );
209209
});
210210

211-
test( "boundingSphere", function() {
211+
test( "getBoundingSphere", function() {
212212
var a = new THREE.Box3( zero3, zero3 );
213213
var b = new THREE.Box3( zero3, one3 );
214214
var c = new THREE.Box3( one3.clone().negate(), one3 );
215215

216-
ok( a.boundingSphere().equals( new THREE.Sphere( zero3, 0 ) ), "Passed!" );
217-
ok( b.boundingSphere().equals( new THREE.Sphere( one3.clone().multiplyScalar( 0.5 ), Math.sqrt( 3 ) * 0.5 ) ), "Passed!" );
218-
ok( c.boundingSphere().equals( new THREE.Sphere( zero3, Math.sqrt( 12 ) * 0.5 ) ), "Passed!" );
216+
ok( a.getBoundingSphere().equals( new THREE.Sphere( zero3, 0 ) ), "Passed!" );
217+
ok( b.getBoundingSphere().equals( new THREE.Sphere( one3.clone().multiplyScalar( 0.5 ), Math.sqrt( 3 ) * 0.5 ) ), "Passed!" );
218+
ok( c.getBoundingSphere().equals( new THREE.Sphere( zero3, Math.sqrt( 12 ) * 0.5 ) ), "Passed!" );
219219
});
220220

221221
test( "intersect", function() {

test/math/Sphere.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ test( "clampPoint", function() {
6767
ok( a.clampPoint( new THREE.Vector3( 1, 1, -3 ) ).equals( new THREE.Vector3( 1, 1, 0 ) ), "Passed!" );
6868
});
6969

70-
test( "boundingBox", function() {
70+
test( "getBoundingBox", function() {
7171
var a = new THREE.Sphere( one3, 1 );
7272

73-
ok( a.boundingBox().equals( new THREE.Box3( zero3, two3 ) ), "Passed!" );
73+
ok( a.getBoundingBox().equals( new THREE.Box3( zero3, two3 ) ), "Passed!" );
7474

7575
a.set( zero3, 0 )
76-
ok( a.boundingBox().equals( new THREE.Box3( zero3, zero3 ) ), "Passed!" );
76+
ok( a.getBoundingBox().equals( new THREE.Box3( zero3, zero3 ) ), "Passed!" );
7777
});
7878

7979
test( "transform", function() {
@@ -83,7 +83,7 @@ test( "transform", function() {
8383
var t1 = new THREE.Vector3( 1, -2, 1 );
8484
m.makeTranslation( t1 );
8585

86-
ok( a.clone().transform( m ).boundingBox().equals( a.boundingBox().transform( m ) ), "Passed!" );
86+
ok( a.clone().transform( m ).getBoundingBox().equals( a.getBoundingBox().transform( m ) ), "Passed!" );
8787
});
8888

8989
test( "translate", function() {

0 commit comments

Comments
 (0)