distanceSquaredTo

Computes the estimated distance squared from the closest point on a bounding box to a point.

// Sort bounding boxes from back to front
boxes.sort(function(a, b) {
return b.distanceSquaredTo(camera.positionWC) - a.distanceSquaredTo(camera.positionWC);
});

Return

The estimated distance squared from the bounding sphere to the point.

Parameters

cartesian

The point

See also