B.Math.Sphere()Represents a sphere. To create the object use B.Math.makeSphere(). PROPERTIES:METHODS:clone() Clones this sphere to a new sphere. RETURNS:this copy(sphere) Copies a given sphere into this sphere. set(center, radius) Sets this sphere from a center and a radius. fromArray(array, offset) Sets this shere from a part of array. PARAMETERS:{Array.<number>} array {number} [offset] = 0 RETURNS:{number} new offset toArray(array, offset) Sets this sphere to a part of array. PARAMETERS:{Array.<number>} array {number} [offset] = 0 RETURNS:{number} new offset fromPoints(points) Sets this sphere from an array of points. fromAABox(aabox) Sets this sphere from an axis-aligned box. reset() Resets this sphere to the initial state. RETURNS:this empty() Check this sphere for zero volume. RETURNS:{boolean} translate(offset) Translates this sphere by a given offset. transform(matrix) Transforms this sphere by a 4x4 matrix. merge(object) Merges this sphere with an object. PARAMETERS:{B.Math.Vector3 | B.Math.Segment | B.Math.Triangle | B.Math.AABox | B.Math.Sphere} object RETURNS:this THROWS:{Error} if the object argument has unsupported type equal(sphere) Checks for strict equality of this sphere and another sphere. |
PROPERTIES:METHODS: |