BoundingSphere

BoundingSphere

BoundingSphere defines a sphere that defines a container for a group of vertices of a particular piece of geometry. This
sphere defines a radius and a center.



A typical usage is to allow the class define the center and radius by calling either containAABB or
averagePoints. A call to computeFramePoint in turn calls containAABB.

Constructor

new BoundingSphere(centeropt, radiusopt)

Parameters:
Name Type Attributes Default Description
center Vector3 <optional>
(0, 0, 0)
radius number <optional>
1

Methods

clone() → {BoundingSphere}

Returns a clone of this bounding sphere

containsPoint(point) → {boolean}

Method to test whether a point is inside the bounding box or not

Parameters:
Name Type Description
point Vector3

copy(source) → {BoundingSphere}

Copies data from another bounding sphere

Parameters:
Name Type Description
source BoundingSphere

bounding sphere to copy from