Companion

Properties

Link copied to clipboard
open override val packedLength: Int

The number of elements used to pack the object into an array.

Functions

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

Duplicates a BoundingSphere instance.

Link copied to clipboard
fun computePlaneDistances(sphere: BoundingSphere, 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
fun equals(left: BoundingSphere? = definedExternally, right: BoundingSphere? = definedExternally): Boolean

Compares the provided BoundingSphere componentwise and returns true if they are equal, false otherwise.

Link copied to clipboard
fun expand(sphere: BoundingSphere, point: Cartesian3, result: BoundingSphere? = definedExternally): BoundingSphere

Computes a bounding sphere by enlarging the provided sphere to contain the provided point.

Link copied to clipboard
fun fromBoundingSpheres(    boundingSpheres: <Error class: unknown class><BoundingSphere>? = definedExternally,     result: BoundingSphere? = definedExternally): BoundingSphere

Computes a tight-fitting bounding sphere enclosing the provided array of bounding spheres.

Link copied to clipboard
fun fromCornerPoints(    corner: Cartesian3? = definedExternally,     oppositeCorner: Cartesian3? = definedExternally,     result: BoundingSphere? = definedExternally): BoundingSphere

Computes a bounding sphere from the corner points of an axis-aligned bounding box. The sphere tightly and fully encompasses the box.

Link copied to clipboard
fun fromEllipsoid(ellipsoid: Ellipsoid, result: BoundingSphere? = definedExternally): BoundingSphere

Creates a bounding sphere encompassing an ellipsoid.

Link copied to clipboard
fun fromEncodedCartesianVertices(    positionsHigh: <Error class: unknown class><Double>? = definedExternally,     positionsLow: <Error class: unknown class><Double>? = definedExternally,     result: BoundingSphere? = definedExternally): BoundingSphere

Computes a tight-fitting bounding sphere enclosing a list of EncodedCartesian3s, where the points are stored in parallel flat arrays in X, Y, Z, order. The bounding sphere is computed by running two algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.

Link copied to clipboard
fun fromOrientedBoundingBox(orientedBoundingBox: OrientedBoundingBox, result: BoundingSphere? = definedExternally): BoundingSphere

Computes a tight-fitting bounding sphere enclosing the provided oriented bounding box.

Link copied to clipboard
fun fromPoints(    positions: <Error class: unknown class><Cartesian3>? = definedExternally,     result: BoundingSphere? = definedExternally): BoundingSphere

Computes a tight-fitting bounding sphere enclosing a list of 3D Cartesian points. The bounding sphere is computed by running two algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.

Link copied to clipboard
fun fromRectangle2D(    rectangle: Rectangle? = definedExternally,     projection: Any? = definedExternally,     result: BoundingSphere? = definedExternally): BoundingSphere

Computes a bounding sphere from a rectangle projected in 2D.

Link copied to clipboard
fun fromRectangle3D(    rectangle: Rectangle? = definedExternally,     ellipsoid: Ellipsoid? = definedExternally,     surfaceHeight: Double? = definedExternally,     result: BoundingSphere? = definedExternally): BoundingSphere

Computes a bounding sphere from a rectangle in 3D. The bounding sphere is created using a subsample of points on the ellipsoid and contained in the rectangle. It may not be accurate for all rectangles on all types of ellipsoids.

Link copied to clipboard
fun fromRectangleWithHeights2D(    rectangle: Rectangle? = definedExternally,     projection: Any? = definedExternally,     minimumHeight: Double? = definedExternally,     maximumHeight: Double? = definedExternally,     result: BoundingSphere? = definedExternally): BoundingSphere

Computes a bounding sphere from a rectangle projected in 2D. The bounding sphere accounts for the object's minimum and maximum heights over the rectangle.

Link copied to clipboard
fun fromTransformation(transformation: Matrix4, result: BoundingSphere? = definedExternally): BoundingSphere

Computes a tight-fitting bounding sphere enclosing the provided affine transformation.

Link copied to clipboard
fun fromVertices(    positions: <Error class: unknown class><Double>? = definedExternally,     center: Cartesian3? = definedExternally,     stride: Int? = definedExternally,     result: BoundingSphere? = definedExternally): BoundingSphere

Computes a tight-fitting bounding sphere enclosing a list of 3D points, where the points are stored in a flat array in X, Y, Z, order. The bounding sphere is computed by running two algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.

Link copied to clipboard

Determines which side of a plane a sphere is located.

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

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

Link copied to clipboard
open override fun pack(    value: BoundingSphere,     array: <Error class: unknown class><Double>,     startingIndex: Int?): <Error class: unknown class><Double>

Stores the provided instance into the provided array.

Link copied to clipboard
fun projectTo2D(sphere: BoundingSphere, projection: Any? = definedExternally, result: BoundingSphere? = definedExternally): BoundingSphere

Creates a bounding sphere in 2D from a bounding sphere in 3D world coordinates.

Link copied to clipboard
fun transform(sphere: BoundingSphere, transform: Matrix4, result: BoundingSphere? = definedExternally): BoundingSphere

Applies a 4x4 affine transformation matrix to a bounding sphere.

Link copied to clipboard
fun transformWithoutScale(sphere: BoundingSphere, transform: Matrix4, result: BoundingSphere? = definedExternally): BoundingSphere

Applies a 4x4 affine transformation matrix to a bounding sphere where there is no scale The transformation matrix is not verified to have a uniform scale of 1. This method is faster than computing the general bounding sphere transform using BoundingSphere.transform.

Link copied to clipboard
fun union(left: BoundingSphere, right: BoundingSphere, result: BoundingSphere? = definedExternally): BoundingSphere

Computes a bounding sphere that contains both the left and right bounding spheres.

Link copied to clipboard
open override fun unpack(array: <Error class: unknown class><Double>, startingIndex: Int?, result: BoundingSphere?): BoundingSphere

Retrieves an instance from a packed array.