computePlaneDistances
fun computePlaneDistances(sphere: BoundingSphere, position: Cartesian3, direction: Cartesian3, result: Interval? = definedExternally): Interval(source)
The distances calculated by the vector from the center of the bounding sphere to position projected onto direction plus/minus the radius of the bounding sphere.
If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the closest and farthest planes from position that intersect the bounding sphere.
Return
The nearest and farthest distances on the bounding sphere from position in direction.
Parameters
sphere
The bounding sphere to calculate the distance to.
position
The position to calculate the distance from.
direction
The direction from position.
result
A Interval to store the nearest and farthest distances.