提交 0a3ee86c 编写于 作者: J Jan Wrobel

Remove duplicated Box3.addPoint.

resolves mrdoob/three.js#4848
上级 69645b62
......@@ -51,15 +51,6 @@
Sets the lower and upper (x, y, z) boundaries of this box.
</div>
<h3>.addPoint([page:Vector3 point]) [page:Box3 this]</h3>
<div>
point -- [page:Vector3] to add to the box <br />
</div>
<div>
If the *point* is outside the bounds of the box, the bounds are expanded
so that the point is within the bounds.
</div>
<h3>.applyMatrix4([page:Matrix4 matrix]) [page:Box3 this]</h3>
<div>
matrix -- The [page:Matrix4] to apply
......
......@@ -329,7 +329,7 @@ THREE.BufferGeometry.prototype = {
for ( var i = 0, il = positions.length; i < il; i += 3 ) {
vector.set( positions[ i ], positions[ i + 1 ], positions[ i + 2 ] );
box.addPoint( vector );
box.expandByPoint( vector );
}
......
......@@ -23,42 +23,6 @@ THREE.Box3.prototype = {
},
addPoint: function ( point ) {
if ( point.x < this.min.x ) {
this.min.x = point.x;
} else if ( point.x > this.max.x ) {
this.max.x = point.x;
}
if ( point.y < this.min.y ) {
this.min.y = point.y;
} else if ( point.y > this.max.y ) {
this.max.y = point.y;
}
if ( point.z < this.min.z ) {
this.min.z = point.z;
} else if ( point.z > this.max.z ) {
this.max.z = point.z;
}
return this;
},
setFromPoints: function ( points ) {
if ( points.length > 0 ) {
......@@ -70,7 +34,7 @@ THREE.Box3.prototype = {
for ( var i = 1, il = points.length; i < il; i ++ ) {
this.addPoint( points[ i ] )
this.expandByPoint( points[ i ] )
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册