intersectsBoundingSphere method

bool intersectsBoundingSphere(
  1. BoundingSphere sphere
)

Returns true if the given bounding sphere intersects this bounding sphere.

Implementation

bool intersectsBoundingSphere(BoundingSphere sphere ) {
	final radius = this.radius + sphere.radius;
	return ( sphere.center.squaredDistanceTo( center ) <= ( radius * radius ) );
}