Sphere
A geometric sphere defined by a center position and radius.
Constructor
Properties
Methods
Sets the center and radius.
Transforms this sphere with the provided
Matrix4.
point --
Vector3 The point to clamp
optionalTarget --
Vector3 The optional target point to return
Clamps a point within the sphere. If the point is is outside the sphere, it will clamp it to the closets point on the edge of the sphere.
Translate the sphere's center by the provided offset vector.
Provides a new copy of the sphere.
Checks to see if the two spheres' centers and radii are equal.
points --
Array of
Vector3 positions.
optionalCenter -- Optional
Vector3 position for the sphere's center.
Computes the minimum bounding sphere for points. If optionalCenter is given, it is used as the sphere's center. Otherwise, the center of the axis-aligned bounding box encompassing points is calculated.
Returns the closest distance from the boundary of the sphere to the point. If the sphere contains the point, the distance will be negative.
Returns a bounding box for the sphere, optionally setting a provided box target.
Checks to see if the sphere contains the provided point inclusive of the edge of the sphere.
Copies the values of the passed sphere to this sphere.
Checks to see if two spheres intersect.
Checks to see if the sphere is empty (the radius set to 0).
Source
src/math/Sphere.js
Edit