qd-changjing/public/static/Build/Documentation/BoundingSphere.html

6315 lines
138 KiB
HTML
Raw Normal View History

2022-07-05 16:56:29 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BoundingSphere - Cesium Documentation</title>
<!--[if lt IE 9]>
<script src="javascript/html5.js"></script>
<![endif]-->
<link href="styles/jsdoc-default.css" rel="stylesheet">
<link href="styles/prism.css" rel="stylesheet">
</head>
<body>
<div id="main">
<h1 class="page-title">
<a href="index.html"><img src="Images/CesiumLogo.png" class="cesiumLogo"></a>
BoundingSphere
<div class="titleCenterer"></div>
</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="BoundingSphere">
<a href="#BoundingSphere" class="doc-link"></a>
new Cesium.BoundingSphere<span class="signature">(<span class="optional">center</span>, <span class="optional">radius</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L27">Core/BoundingSphere.js 27</a>
</div>
</h4>
</div>
<div class="description">
A bounding sphere with a center and a radius.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>center</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="default">
<code class="language-javascript">Cartesian3.ZERO</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The center of the bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>radius</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The radius of the bounding sphere.</td>
</tr>
</tbody>
</table>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="AxisAlignedBoundingBox.html">AxisAlignedBoundingBox</a></li>
<li><a href="BoundingRectangle.html">BoundingRectangle</a></li>
<li><a href="Packable.html">Packable</a></li>
</ul>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<div class="nameContainer">
<h4 class="name" id=".packedLength">
<a href="#.packedLength" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.packedLength<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L941">Core/BoundingSphere.js 941</a>
</div>
</h4>
</div>
<div class="description">
The number of elements used to pack the object into an array.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="center">
<a href="#center" class="doc-link"></a>
center<span class="type-signature"> : <a href="Cartesian3.html">Cartesian3</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L33">Core/BoundingSphere.js 33</a>
</div>
</h4>
</div>
<div class="description">
The center point of the sphere.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript"><a href="Cartesian3.html#.ZERO"><code>Cartesian3.ZERO</code></a></code>
</dl>
<div class="nameContainer">
<h4 class="name" id="radius">
<a href="#radius" class="doc-link"></a>
radius<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L40">Core/BoundingSphere.js 40</a>
</div>
</h4>
</div>
<div class="description">
The radius of the sphere.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">0.0</code>
</dl>
<h3 class="subsection-title">Methods</h3>
<div class="nameContainer">
<h4 class="name" id=".clone">
<a href="#.clone" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.clone<span class="signature">(sphere, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L923">Core/BoundingSphere.js 923</a>
</div>
</h4>
</div>
<div class="description">
Duplicates a BoundingSphere instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
The bounding sphere to duplicate.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided. (Returns undefined if sphere is undefined)
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".computePlaneDistances">
<a href="#.computePlaneDistances" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.computePlaneDistances<span class="signature">(sphere, position, direction, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Interval.html">Interval</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1227">Core/BoundingSphere.js 1227</a>
</div>
</h4>
</div>
<div class="description">
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.
<br>
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
The bounding sphere to calculate the distance to.</td>
</tr>
<tr>
<td class="name"><code>position</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The position to calculate the distance from.</td>
</tr>
<tr>
<td class="name"><code>direction</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The direction from position.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Interval.html">Interval</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
A Interval to store the nearest and farthest distances.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The nearest and farthest distances on the bounding sphere from position in direction.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".distanceSquaredTo">
<a href="#.distanceSquaredTo" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.distanceSquaredTo<span class="signature">(sphere, cartesian)</span> &rarr; <span class="type-signature returnType">Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1158">Core/BoundingSphere.js 1158</a>
</div>
</h4>
</div>
<div class="description">
Computes the estimated distance squared from the closest point on a bounding sphere to a point.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
The sphere.</td>
</tr>
<tr>
<td class="name"><code>cartesian</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The point</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The distance squared from the bounding sphere to the point. Returns 0 if the point is inside the sphere.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Sort bounding spheres from back to front
spheres.sort(function(a, b) {
return Cesium.BoundingSphere.distanceSquaredTo(b, camera.positionWC) - Cesium.BoundingSphere.distanceSquaredTo(a, camera.positionWC);
});</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".equals">
<a href="#.equals" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.equals<span class="signature">(<span class="optional">left</span>, <span class="optional">right</span>)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1402">Core/BoundingSphere.js 1402</a>
</div>
</h4>
</div>
<div class="description">
Compares the provided BoundingSphere componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The first BoundingSphere.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The second BoundingSphere.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if left and right are equal, <code>false</code> otherwise.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".expand">
<a href="#.expand" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.expand<span class="signature">(sphere, point, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1066">Core/BoundingSphere.js 1066</a>
</div>
</h4>
</div>
<div class="description">
Computes a bounding sphere by enlarging the provided sphere to contain the provided point.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
A sphere to expand.</td>
</tr>
<tr>
<td class="name"><code>point</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
A point to enclose in a bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromBoundingSpheres">
<a href="#.fromBoundingSpheres" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromBoundingSpheres<span class="signature">(<span class="optional">boundingSpheres</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L802">Core/BoundingSphere.js 802</a>
</div>
</h4>
</div>
<div class="description">
Computes a tight-fitting bounding sphere enclosing the provided array of bounding spheres.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>boundingSpheres</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="BoundingSphere.html">BoundingSphere</a>></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The array of bounding spheres.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromCornerPoints">
<a href="#.fromCornerPoints" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromCornerPoints<span class="signature">(<span class="optional">corner</span>, <span class="optional">oppositeCorner</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L754">Core/BoundingSphere.js 754</a>
</div>
</h4>
</div>
<div class="description">
Computes a bounding sphere from the corner points of an axis-aligned bounding box. The sphere
tighly and fully encompases the box.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>corner</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The minimum height over the rectangle.</td>
</tr>
<tr>
<td class="name"><code>oppositeCorner</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The maximum height over the rectangle.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Create a bounding sphere around the unit cube
const sphere = Cesium.BoundingSphere.fromCornerPoints(new Cesium.Cartesian3(-0.5, -0.5, -0.5), new Cesium.Cartesian3(0.5, 0.5, 0.5));</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromEllipsoid">
<a href="#.fromEllipsoid" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromEllipsoid<span class="signature">(ellipsoid, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L779">Core/BoundingSphere.js 779</a>
</div>
</h4>
</div>
<div class="description">
Creates a bounding sphere encompassing an ellipsoid.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>ellipsoid</code></td>
<td class="type">
<span class="param-type"><a href="Ellipsoid.html">Ellipsoid</a></span>
</td>
<td class="description last">
The ellipsoid around which to create a bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">const boundingSphere = Cesium.BoundingSphere.fromEllipsoid(ellipsoid);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromEncodedCartesianVertices">
<a href="#.fromEncodedCartesianVertices" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromEncodedCartesianVertices<span class="signature">(<span class="optional">positionsHigh</span>, <span class="optional">positionsLow</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L567">Core/BoundingSphere.js 567</a>
</div>
</h4>
</div>
<div class="description">
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>positionsHigh</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="description last">
<span class="optional">optional</span>
An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
is formed from three elements in the array in the order X, Y, Z.</td>
</tr>
<tr>
<td class="name"><code>positionsLow</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="description last">
<span class="optional">optional</span>
An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
is formed from three elements in the array in the order X, Y, Z.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if one was not provided.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/">Bounding Sphere computation article</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromOrientedBoundingBox">
<a href="#.fromOrientedBoundingBox" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromOrientedBoundingBox<span class="signature">(orientedBoundingBox, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L856">Core/BoundingSphere.js 856</a>
</div>
</h4>
</div>
<div class="description">
Computes a tight-fitting bounding sphere enclosing the provided oriented bounding box.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>orientedBoundingBox</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
</td>
<td class="description last">
The oriented bounding box.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromPoints">
<a href="#.fromPoints" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromPoints<span class="signature">(<span class="optional">positions</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L68">Core/BoundingSphere.js 68</a>
</div>
</h4>
</div>
<div class="description">
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>positions</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="Cartesian3.html">Cartesian3</a>></span>
</td>
<td class="description last">
<span class="optional">optional</span>
An array of points that the bounding sphere will enclose. Each point must have <code>x</code>, <code>y</code>, and <code>z</code> properties.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if one was not provided.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="http://help.agi.com/AGIComponents/html/BlogBoundingSphere.htm">Bounding Sphere computation article</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromRectangle2D">
<a href="#.fromRectangle2D" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromRectangle2D<span class="signature">(<span class="optional">rectangle</span>, <span class="optional">projection</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L240">Core/BoundingSphere.js 240</a>
</div>
</h4>
</div>
<div class="description">
Computes a bounding sphere from a rectangle projected in 2D.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rectangle</code></td>
<td class="type">
<span class="param-type"><a href="Rectangle.html">Rectangle</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The rectangle around which to create a bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>projection</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="default">
<code class="language-javascript">GeographicProjection</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The projection used to project the rectangle into 2D.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromRectangle3D">
<a href="#.fromRectangle3D" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromRectangle3D<span class="signature">(<span class="optional">rectangle</span>, <span class="optional">ellipsoid</span>, <span class="optional">surfaceHeight</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L319">Core/BoundingSphere.js 319</a>
</div>
</h4>
</div>
<div class="description">
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rectangle</code></td>
<td class="type">
<span class="param-type"><a href="Rectangle.html">Rectangle</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The valid rectangle used to create a bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>ellipsoid</code></td>
<td class="type">
<span class="param-type"><a href="Ellipsoid.html">Ellipsoid</a></span>
</td>
<td class="default">
<code class="language-javascript">Ellipsoid.WGS84</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The ellipsoid used to determine positions of the rectangle.</td>
</tr>
<tr>
<td class="name"><code>surfaceHeight</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The height above the surface of the ellipsoid.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromRectangleWithHeights2D">
<a href="#.fromRectangleWithHeights2D" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromRectangleWithHeights2D<span class="signature">(<span class="optional">rectangle</span>, <span class="optional">projection</span>, <span class="optional">minimumHeight</span>, <span class="optional">maximumHeight</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L261">Core/BoundingSphere.js 261</a>
</div>
</h4>
</div>
<div class="description">
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rectangle</code></td>
<td class="type">
<span class="param-type"><a href="Rectangle.html">Rectangle</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The rectangle around which to create a bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>projection</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="default">
<code class="language-javascript">GeographicProjection</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The projection used to project the rectangle into 2D.</td>
</tr>
<tr>
<td class="name"><code>minimumHeight</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The minimum height over the rectangle.</td>
</tr>
<tr>
<td class="name"><code>maximumHeight</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The maximum height over the rectangle.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromTransformation">
<a href="#.fromTransformation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromTransformation<span class="signature">(transformation, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L892">Core/BoundingSphere.js 892</a>
</div>
</h4>
</div>
<div class="description">
Computes a tight-fitting bounding sphere enclosing the provided affine transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>transformation</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The affine transformation.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromVertices">
<a href="#.fromVertices" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.fromVertices<span class="signature">(<span class="optional">positions</span>, <span class="optional">center</span>, <span class="optional">stride</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L379">Core/BoundingSphere.js 379</a>
</div>
</h4>
</div>
<div class="description">
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>positions</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
An array of points that the bounding sphere will enclose. Each point
is formed from three elements in the array in the order X, Y, Z.</td>
</tr>
<tr>
<td class="name"><code>center</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="default">
<code class="language-javascript">Cartesian3.ZERO</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The position to which the positions are relative, which need not be the
origin of the coordinate system. This is useful when the positions are to be used for
relative-to-center (RTC) rendering.</td>
</tr>
<tr>
<td class="name"><code>stride</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">3</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The number of array elements per vertex. It must be at least 3, but it may
be higher. Regardless of the value of this parameter, the X coordinate of the first position
is at array index 0, the Y coordinate is at array index 1, and the Z coordinate is at array index
2. When stride is 3, the X coordinate of the next position then begins at array index 3. If
the stride is 5, however, two array elements are skipped and the next position begins at array
index 5.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if one was not provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Compute the bounding sphere from 3 positions, each specified relative to a center.
// In addition to the X, Y, and Z coordinates, the points array contains two additional
// elements per point which are ignored for the purpose of computing the bounding sphere.
const center = new Cesium.Cartesian3(1.0, 2.0, 3.0);
const points = [1.0, 2.0, 3.0, 0.1, 0.2,
4.0, 5.0, 6.0, 0.1, 0.2,
7.0, 8.0, 9.0, 0.1, 0.2];
const sphere = Cesium.BoundingSphere.fromVertices(points, center, 5);</code></pre>
<h5>See:</h5>
<ul class="see-list">
<li><a href="http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/">Bounding Sphere computation article</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".intersectPlane">
<a href="#.intersectPlane" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.intersectPlane<span class="signature">(sphere, plane)</span> &rarr; <span class="type-signature returnType"><a href="global.html#Intersect">Intersect</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1094">Core/BoundingSphere.js 1094</a>
</div>
</h4>
</div>
<div class="description">
Determines which side of a plane a sphere is located.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
The bounding sphere to test.</td>
</tr>
<tr>
<td class="name"><code>plane</code></td>
<td class="type">
<span class="param-type"><a href="Plane.html">Plane</a></span>
</td>
<td class="description last">
The plane to test against.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<a href="global.html#Intersect#.INSIDE"><code>Intersect.INSIDE</code></a> if the entire sphere is on the side of the plane
the normal is pointing, <a href="global.html#Intersect#.OUTSIDE"><code>Intersect.OUTSIDE</code></a> if the entire sphere is
on the opposite side, and <a href="global.html#Intersect#.INTERSECTING"><code>Intersect.INTERSECTING</code></a> if the sphere
intersects the plane.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".isOccluded">
<a href="#.isOccluded" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.isOccluded<span class="signature">(sphere, occluder)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1386">Core/BoundingSphere.js 1386</a>
</div>
</h4>
</div>
<div class="description">
Determines whether or not a sphere is hidden from view by the occluder.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
The bounding sphere surrounding the occludee object.</td>
</tr>
<tr>
<td class="name"><code>occluder</code></td>
<td class="type">
<span class="param-type"><a href="Occluder.html">Occluder</a></span>
</td>
<td class="description last">
The occluder.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if the sphere is not visible; otherwise <code>false</code>.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".pack">
<a href="#.pack" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.pack<span class="signature">(value, array, <span class="optional">startingIndex</span>)</span> &rarr; <span class="type-signature returnType">Array.&lt;Number></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L952">Core/BoundingSphere.js 952</a>
</div>
</h4>
</div>
<div class="description">
Stores the provided instance into the provided array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="default">
</td>
<td class="description last">
The value to pack.</td>
</tr>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="default">
</td>
<td class="description last">
The array to pack into.</td>
</tr>
<tr>
<td class="name"><code>startingIndex</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The index into the array at which to start packing the elements.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The array that was packed into
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".projectTo2D">
<a href="#.projectTo2D" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.projectTo2D<span class="signature">(sphere, <span class="optional">projection</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1275">Core/BoundingSphere.js 1275</a>
</div>
</h4>
</div>
<div class="description">
Creates a bounding sphere in 2D from a bounding sphere in 3D world coordinates.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="default">
</td>
<td class="description last">
The bounding sphere to transform to 2D.</td>
</tr>
<tr>
<td class="name"><code>projection</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="default">
<code class="language-javascript">GeographicProjection</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The projection to 2D.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".transform">
<a href="#.transform" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.transform<span class="signature">(sphere, transform, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1123">Core/BoundingSphere.js 1123</a>
</div>
</h4>
</div>
<div class="description">
Applies a 4x4 affine transformation matrix to a bounding sphere.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
The bounding sphere to apply the transformation to.</td>
</tr>
<tr>
<td class="name"><code>transform</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The transformation matrix to apply to the bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".transformWithoutScale">
<a href="#.transformWithoutScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.transformWithoutScale<span class="signature">(sphere, transform, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1193">Core/BoundingSphere.js 1193</a>
</div>
</h4>
</div>
<div class="description">
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 <a href="BoundingSphere.html#.transform"><code>BoundingSphere.transform</code></a>.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>sphere</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
The bounding sphere to apply the transformation to.</td>
</tr>
<tr>
<td class="name"><code>transform</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The transformation matrix to apply to the bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">const modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid);
const boundingSphere = new Cesium.BoundingSphere();
const newBoundingSphere = Cesium.BoundingSphere.transformWithoutScale(boundingSphere, modelMatrix);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".union">
<a href="#.union" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.union<span class="signature">(left, right, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1006">Core/BoundingSphere.js 1006</a>
</div>
</h4>
</div>
<div class="description">
Computes a bounding sphere that contains both the left and right bounding spheres.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
A sphere to enclose in a bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
A sphere to enclose in a bounding sphere.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".unpack">
<a href="#.unpack" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.BoundingSphere.unpack<span class="signature">(array, <span class="optional">startingIndex</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L977">Core/BoundingSphere.js 977</a>
</div>
</h4>
</div>
<div class="description">
Retrieves an instance from a packed array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="default">
</td>
<td class="description last">
The packed array.</td>
</tr>
<tr>
<td class="name"><code>startingIndex</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The starting index of the element to be unpacked.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object into which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="clone">
<a href="#clone" class="doc-link"></a>
clone<span class="signature">(<span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="BoundingSphere.html">BoundingSphere</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1493">Core/BoundingSphere.js 1493</a>
</div>
</h4>
</div>
<div class="description">
Duplicates this BoundingSphere instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new BoundingSphere instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="computePlaneDistances">
<a href="#computePlaneDistances" class="doc-link"></a>
computePlaneDistances<span class="signature">(position, direction, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Interval.html">Interval</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1453">Core/BoundingSphere.js 1453</a>
</div>
</h4>
</div>
<div class="description">
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.
<br>
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>position</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The position to calculate the distance from.</td>
</tr>
<tr>
<td class="name"><code>direction</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The direction from position.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Interval.html">Interval</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
A Interval to store the nearest and farthest distances.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The nearest and farthest distances on the bounding sphere from position in direction.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="distanceSquaredTo">
<a href="#distanceSquaredTo" class="doc-link"></a>
distanceSquaredTo<span class="signature">(cartesian)</span> &rarr; <span class="type-signature returnType">Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1437">Core/BoundingSphere.js 1437</a>
</div>
</h4>
</div>
<div class="description">
Computes the estimated distance squared from the closest point on a bounding sphere to a point.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cartesian</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The point</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The estimated distance squared from the bounding sphere to the point.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Sort bounding spheres from back to front
spheres.sort(function(a, b) {
return b.distanceSquaredTo(camera.positionWC) - a.distanceSquaredTo(camera.positionWC);
});</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id="equals">
<a href="#equals" class="doc-link"></a>
equals<span class="signature">(<span class="optional">right</span>)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1483">Core/BoundingSphere.js 1483</a>
</div>
</h4>
</div>
<div class="description">
Compares this BoundingSphere against the provided BoundingSphere componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="BoundingSphere.html">BoundingSphere</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The right hand side BoundingSphere.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if they are equal, <code>false</code> otherwise.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="intersectPlane">
<a href="#intersectPlane" class="doc-link"></a>
intersectPlane<span class="signature">(plane)</span> &rarr; <span class="type-signature returnType"><a href="global.html#Intersect">Intersect</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1421">Core/BoundingSphere.js 1421</a>
</div>
</h4>
</div>
<div class="description">
Determines which side of a plane the sphere is located.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>plane</code></td>
<td class="type">
<span class="param-type"><a href="Plane.html">Plane</a></span>
</td>
<td class="description last">
The plane to test against.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<a href="global.html#Intersect#.INSIDE"><code>Intersect.INSIDE</code></a> if the entire sphere is on the side of the plane
the normal is pointing, <a href="global.html#Intersect#.OUTSIDE"><code>Intersect.OUTSIDE</code></a> if the entire sphere is
on the opposite side, and <a href="global.html#Intersect#.INTERSECTING"><code>Intersect.INTERSECTING</code></a> if the sphere
intersects the plane.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="isOccluded">
<a href="#isOccluded" class="doc-link"></a>
isOccluded<span class="signature">(occluder)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1472">Core/BoundingSphere.js 1472</a>
</div>
</h4>
</div>
<div class="description">
Determines whether or not a sphere is hidden from view by the occluder.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>occluder</code></td>
<td class="type">
<span class="param-type"><a href="Occluder.html">Occluder</a></span>
</td>
<td class="description last">
The occluder.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if the sphere is not visible; otherwise <code>false</code>.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="volume">
<a href="#volume" class="doc-link"></a>
volume<span class="signature">()</span> &rarr; <span class="type-signature returnType">Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/BoundingSphere.js#L1501">Core/BoundingSphere.js 1501</a>
</div>
</h4>
</div>
<div class="description">
Computes the radius of the BoundingSphere.
</div>
<h5>Returns:</h5>
<div class="param-desc">
The radius of the BoundingSphere.
</div>
<dl class="details">
</dl>
</article>
</section>
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a>
</footer>
</div>
<div class="nav">
<div class="menu">
<input type="text" class="classFilter" id="ClassFilter" placeholder="Search">
<ul id="ClassList"><li data-name="Animation"><a href="Animation.html">Animation</a></li><li data-name="AnimationViewModel"><a href="AnimationViewModel.html">AnimationViewModel</a></li><li data-name="Appearance"><a href="Appearance.html">Appearance</a></li><li data-name="ArcGisMapServerImageryProvider"><a href="ArcGisMapServerImageryProvider.html">ArcGisMapServerImageryProvider</a></li><li data-name="ArcGISTiledElevationTerrainProvider"><a href="ArcGISTiledElevationTerrainProvider.html">ArcGISTiledElevationTerrainProvider</a></li><li data-name="ArcType"><a href="global.html#ArcType">ArcType</a></li><li data-name="AssociativeArray"><a href="AssociativeArray.html">AssociativeArray</a></li><li data-name="Axis"><a href="global.html#Axis">Axis</a></li><li data-name="AxisAlignedBoundingBox"><a href="AxisAlignedBoundingBox.html">AxisAlignedBoundingBox</a></li><li data-name="backFaceCulling"><a href="global.html#backFaceCulling">backFaceCulling</a></li><li data-name="barycentricCoordinates"><a href="global.html#barycentricCoordinates">barycentricCoordinates</a></li><li data-name="BaseLayerPicker"><a href="BaseLayerPicker.html">BaseLayerPicker</a></li><li data-name="BaseLayerPickerViewModel"><a href="BaseLayerPickerViewModel.html">BaseLayerPickerViewModel</a></li><li data-name="Billboard"><a href="Billboard.html">Billboard</a></li><li data-name="BillboardCollection"><a href="BillboardCollection.html">BillboardCollection</a></li><li data-name="BillboardGraphics"><a href="BillboardGraphics.html">BillboardGraphics</a></li><li data-name="BillboardVisualizer"><a href="BillboardVisualizer.html">BillboardVisualizer</a></li><li data-name="binarySearch"><a href="global.html#binarySearch">binarySearch</a></li><li data-name="binarySearchComparator"><a href="global.html#binarySearchComparator">binarySearchComparator</a></li><li data-name="BingMapsGeocoderService"><a href="BingMapsGeocoderService.html">BingMapsGeocoderService</a></li><li data-name="BingMapsImageryProvider"><a href="BingMapsImageryProvider.html">BingMapsImageryProvider</a></li><li data-name="BingMapsStyle"><a href="global.html#BingMapsStyle">BingMapsStyle</a></li><li data-name="BlendEquation"><a href="global.html#BlendEquation">BlendEquation</a></li><li data-name="BlendFunction"><a href="global.html#BlendFunction">BlendFunction</a></li><li data-name="BlendingState"><a href="BlendingState.html">BlendingState</a></li><li data-name="BlendOption"><a href="global.html#BlendOption">BlendOption</a></li><li data-name="BoundingRectangle"><a href="BoundingRectangle.html">BoundingRectangle</a></li><li data-name="BoundingSphere"><a href="BoundingSphere.html">BoundingSphere</a></li><li data-name="boundingSphere"><a href="global.html#boundingSphere">boundingSphere</a></li><li data-name="BoxEmitter"><a href="BoxEmitter.html">BoxEmitter</a></li><li data-name="BoxGeometry"><a href="BoxGeometry.html">BoxGeometry</a></li><li data-name="BoxGeometryUpdater"><a href="BoxGeometryUpdater.html">BoxGeometryUpdater</a></li><li data-name="BoxGraphics"><a href="BoxGraphics.html">BoxGraphics</a></li><li data-name="BoxOutlineGeometry"><a href="BoxOutlineGeometry.html">BoxOutlineGeometry</a></li><li data-name="buildModuleUrl"><a href="global.html#buildModuleUrl">buildModuleUrl</a></li><li data-name="CallbackProperty"><a href="CallbackProperty.html">CallbackProperty</a></li><li data-name="Camera"><a href="Camera.html">Camera</a></li><li data-name="CameraEventAggregator"><a href="CameraEventAggregator.html">CameraEventAggregator</a></li><li data-name="CameraEventType"><a href="global.html#CameraEventType">CameraEventType</a></li><li data-name="cancelAnimationFrame"><a href="global.html#cancelAnimationFrame">cancelAnimationFrame</a></li><li data-name="Cartesian2"><a href="Cartesian2.html">Cartesian2</a></li><li data-name="Cartesian3"><a href="Cartesian3.html">Cartesian3</a></li><li data-name="Cartesian4"><a href="Cartesian4.html">Cartesian4</a></li><li data-name="Cartographic"><a href="Cartographic.html">Cartographic</a></li><li data-name="CartographicGeocoderService"><a href="CartographicGeocoderServic
</div>
</div>
<script>
if (window.frameElement) {
document.body.className = 'embedded';
var ele = document.createElement('a');
ele.className = 'popout';
ele.target = '_blank';
ele.href = window.location.href;
ele.title = 'Pop out';
document.getElementById('main').appendChild(ele);
}
// Set targets on external links. Sandcastle and GitHub shouldn't be embedded in any iframe.
Array.prototype.forEach.call(document.getElementsByTagName('a'), function(a) {
if (/^https?:/i.test(a.getAttribute('href'))) {
a.target='_blank';
}
});
</script>
<script src="javascript/prism.js"></script>
<script src="javascript/cesiumDoc.js"></script>
</body>
</html>