A Vector3 defining the center of the sphere. Default is (0, 0, 0).
The radius of the sphere. Default is -1.
Read-only flag to check if a given object is of type Sphere.
Clamps a point within the sphere. If the point is outside the sphere, it will clamp it to the closest point on the edge of the sphere. Points already inside the sphere will not be affected.
The clamped point.
Create new sphere with the same center and radius as this one.
The new sphere.
Checks to see if the sphere contains the provided point inclusive of the surface of the sphere.
True if point is contained by this sphere.
The Vector3 to be checked
Computes the closest distance from the boundary of the sphere to a point. If the sphere contains the point, the distance will be negative.
The distance to the point.
The point to compute the distance to.
Checks to see if the two spheres' centers and radii are equal.
True if the 2 spheres are equal.
The sphere to compare for equality.
Determines whether or not this sphere intersects a given box.
True if the sphere and box intersect.
Box3 to check for intersection against.
Determines whether or not this sphere intersects a given plane.
True if this sphere and plane intersect.
Plane to check for intersection against.
Checks to see if two spheres intersect.
True if the spheres intersect.
Sphere to check for intersection against.
Checks to see if the sphere is empty (the radius set to a negative number). Spheres with a radius of 0 contain only their center point and are not considered to be empty.
True if empty.
Makes the sphere empty by setting center to (0, 0, 0) and radius to -1.
This instance.
Computes the minimum bounding sphere for an array of points. If optionalCenteris given, it is used as the sphere's center. Otherwise, the center of the axis-aligned bounding box encompassing points is calculated.
This instance.
Expands this sphere to enclose both the original sphere and the given sphere based on algorithm
This instance.
Bounding sphere that will be unioned with this sphere.
A sphere defined by a center and radius.