BoundingSphere

open 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
external object Companion : Packable<BoundingSphere>

Properties

Link copied to clipboard
external var center: Cartesian3

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

Link copied to clipboard
external var radius: Double

The radius of the bounding sphere. Default value - 0.0

Functions

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

Duplicates this BoundingSphere instance.

Link copied to clipboard
external 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
external fun distanceSquaredTo(cartesian: Cartesian3): Double

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

Link copied to clipboard
external fun intersectPlane(plane: Plane): Intersect

Determines which side of a plane the sphere is located.

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

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

Link copied to clipboard
external fun volume(): Double

Computes the radius of the BoundingSphere.