BoundingSphere

external class BoundingSphere(var center: Cartesian3 = definedExternally, var radius: Double = definedExternally)(source)

A bounding sphere with a center and a radius.

See also

Constructors

Link copied to clipboard
constructor(center: Cartesian3 = definedExternally, radius: Double = definedExternally)

Types

Link copied to clipboard

Properties

Link copied to clipboard

The center of the bounding sphere. Default value - Cartesian3.ZERO

Link copied to clipboard

The radius of the bounding sphere. Default value - 0.0

Functions

Link copied to clipboard
fun clone(result: BoundingSphere? = definedExternally): BoundingSphere

Duplicates this BoundingSphere instance.

Link copied to clipboard
fun computePlaneDistances(position: Cartesian3, direction: Cartesian3, result: Interval? = definedExternally): Interval

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.

Link copied to clipboard

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

Link copied to clipboard

Determines which side of a plane the sphere is located.

Link copied to clipboard
fun isOccluded(occluder: Occluder): Boolean

Determines whether or not a sphere is hidden from view by the occluder.

Link copied to clipboard
fun volume(): Double

Computes the radius of the BoundingSphere.