Creates a new BoundingSphere instance.
Optional
center: Vec3 = ...The world space coordinate marking the center of the sphere. The constructor takes a reference of this parameter.
Optional
radius: number = 0.5The radius of the bounding sphere. Defaults to 0.5.
Test if a Bounding Sphere is overlapping, enveloping, or inside this Bounding Sphere.
Bounding Sphere to test.
True if the Bounding Sphere is overlapping, enveloping, or inside this Bounding Sphere and false otherwise.
Test if a ray intersects with the sphere.
Ray to test against (direction must be normalized).
Optional
point: Vec3If there is an intersection, the intersection point will be copied into here.
True if there is an intersection.
A bounding sphere is a volume for facilitating fast intersection testing.