diff --git a/src/math/Box2.js b/src/math/Box2.js index 0f4eedc2b8860dc141ce8dac066e65bb2c7b792d..3b3fd64860be7a02021df1523b345fb839845afc 100644 --- a/src/math/Box2.js +++ b/src/math/Box2.js @@ -115,12 +115,6 @@ THREE.Box2.prototype = { }, - volume: function () { - - return ( this.max.x - this.min.x ) * ( this.max.y - this.min.y ); - - }, - center: function () { return new THREE.Vector2().add( this.min, this.max ).multiplyScalar( 0.5 ); diff --git a/src/math/Box3.js b/src/math/Box3.js index 7de0b325edde8db44da995c4df4a85c76a5eeb4d..86edda579a2117c0c5851b4f7fca699be1536a0c 100644 --- a/src/math/Box3.js +++ b/src/math/Box3.js @@ -133,12 +133,6 @@ THREE.Box3.prototype = { }, - volume: function () { - - return ( this.max.x - this.min.x ) * ( this.max.y - this.min.y ) * ( this.max.z - this.min.z ); - - }, - center: function () { return new THREE.Vector3().add( this.min, this.max ).multiplyScalar( 0.5 ); diff --git a/src/math/Plane.js b/src/math/Plane.js index 96fdb76425f7b62743d0923d8a3e0f7e7225e7d4..fc27af247ea71cb577c06ac07e5b67793c91585e 100644 --- a/src/math/Plane.js +++ b/src/math/Plane.js @@ -71,14 +71,6 @@ THREE.Plane.prototype = { }, - flip: function () { - - this.normal.negate(); - - return this; - - }, - normalize: function () { // Note: will lead to a divide by zero if the plane is invalid. diff --git a/src/math/Ray.js b/src/math/Ray.js index ce0a8f5e34141ad62c29958b9723f3ef9ac9156a..0e2f4c2f22aaf9acb11fa89981ad6c399625a722 100644 --- a/src/math/Ray.js +++ b/src/math/Ray.js @@ -46,19 +46,6 @@ THREE.Ray.prototype = { }, - recast: function ( t ) { - - return this.clone().recastSelf( t ); - - }, - - flip: function () { - - this.direction.negate(); - - return this; - }, - closestPointToPoint: function ( point ) { var result = point.clone().subSelf( this.origin ); diff --git a/src/math/Sphere.js b/src/math/Sphere.js index a2f0b2ca60a2ffe756d437712f24f18ca665052c..a907e47ec86998ad175b238eb72ca74cb8d71707 100644 --- a/src/math/Sphere.js +++ b/src/math/Sphere.js @@ -65,12 +65,6 @@ THREE.Sphere.prototype = { }, - volume: function () { - - return Math.PI * 4 / 3 * ( this.radius * this.radius * this.radius ); - - }, - containsPoint: function ( point ) { return ( point.distanceToSquared( this.center ) <= ( this.radius * this.radius ) ); diff --git a/test/core/Box2.js b/test/core/Box2.js index 03141424c792213c332ca3ba7c9d2826564cf720..0782c3551cd421ef1215cc8f02afdeec70be3831 100644 --- a/test/core/Box2.js +++ b/test/core/Box2.js @@ -51,14 +51,6 @@ test( "empty/makeEmpty", function() { ok( a.empty(), "Passed!" ); }); -test( "volume", function() { - var a = new THREE.Box2( zero2, one2 ); - ok( a.volume() == 1, "Passed!" ); - - a = new THREE.Box2( one2.clone().negate(), zero2 ); - ok( a.volume() == 1, "Passed!" ); -}); - test( "center", function() { var a = new THREE.Box2( zero2 ); diff --git a/test/core/Box3.js b/test/core/Box3.js index 67d950364393772ebd09e5e8eae6d26e78449e89..99a00d74db8247444db3441bf801c9087224c624 100644 --- a/test/core/Box3.js +++ b/test/core/Box3.js @@ -51,11 +51,6 @@ test( "empty/makeEmpty", function() { ok( a.empty(), "Passed!" ); }); -test( "volume", function() { - var a = new THREE.Box3( zero3, one3 ); - ok( a.volume() == 1, "Passed!" ); -}); - test( "center", function() { var a = new THREE.Box3( zero3 ); diff --git a/test/core/Plane.js b/test/core/Plane.js index 1a7eb526fb706a06a03c2d52d845079c635ecb74..1c11335d8335dfedb89e9ccc135011ff9395c00a 100644 --- a/test/core/Plane.js +++ b/test/core/Plane.js @@ -78,14 +78,6 @@ test( "setFromNormalAndCoplanarPoint", function() { ok( a.constant == 0, "Passed!" ); }); -test( "flip", function() { - var a = new THREE.Plane( one3, 0 ); - - ok( a.normal.equals( one3 ), "Passed!" ); - a.flip(); - ok( a.normal.negate().equals( one3 ), "Passed!" ); -}); - test( "normalize", function() { var a = new THREE.Plane( new THREE.Vector3( 2, 0, 0 ), 2 ); diff --git a/test/core/Ray.js b/test/core/Ray.js index 001dd074eac0240e19bdf6432db3ea4d40cc0b35..da07f234b00458d8cd269fa595f8f79da01931da 100644 --- a/test/core/Ray.js +++ b/test/core/Ray.js @@ -43,7 +43,7 @@ test( "at", function() { ok( a.at( 1 ).equals( new THREE.Vector3( 1, 1, 2 ) ), "Passed!" ); }); -test( "recast/recastSelf/clone", function() { +test( "recastSelf/clone", function() { var a = new THREE.Ray( one3, new THREE.Vector3( 0, 0, 1 ) ); ok( a.recastSelf( 0 ).equals( a ), "Passed!" ); @@ -55,25 +55,12 @@ test( "recast/recastSelf/clone", function() { ok( c.recastSelf( 1 ).equals( new THREE.Ray( new THREE.Vector3( 1, 1, 2 ), new THREE.Vector3( 0, 0, 1 ) ) ), "Passed!" ); var d = a.clone(); - var e = d.recast( 1 ); + var e = d.clone().recastSelf( 1 ); ok( d.equals( a ), "Passed!" ); ok( ! e.equals( d ), "Passed!" ); ok( e.equals( c ), "Passed!" ); }); -test( "flip", function() { - var a = new THREE.Ray( one3, new THREE.Vector3( 0, 0, 1 ) ); - - var b = a.clone(); - b.flip(); - ok( b.direction.equals( new THREE.Vector3( 0, 0, -1 ) ), "Passed!" ); - ok( ! b.equals( a ), "Passed!" ); - - // and let's flip back to original direction - b.flip(); - ok( b.equals( a ), "Passed!" ); -}); - test( "closestPointToPoint", function() { var a = new THREE.Ray( one3, new THREE.Vector3( 0, 0, 1 ) );