cesium-examples/map/3d/static/Cesium/Build/Documentation/OrientedBoundingBox.html

3343 lines
93 KiB
HTML
Raw Permalink Normal View History

<!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>OrientedBoundingBox - 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>
OrientedBoundingBox
<div class="titleCenterer"></div>
</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="OrientedBoundingBox">
<a href="#OrientedBoundingBox" class="doc-link"></a>
new Cesium.OrientedBoundingBox<span class="signature">(<span class="optional">center</span>, <span class="optional">halfAxes</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L59">Core/OrientedBoundingBox.js 59</a>
</div>
</h4>
</div>
<div class="description">
Creates an instance of an OrientedBoundingBox. An OrientedBoundingBox of some object is a closed and convex cuboid. It can provide a tighter bounding volume than <a href="BoundingSphere.html"><code>BoundingSphere</code></a> or <a href="AxisAlignedBoundingBox.html"><code>AxisAlignedBoundingBox</code></a> in many cases.
</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 box.</td>
</tr>
<tr>
<td class="name"><code>halfAxes</code></td>
<td class="type">
<span class="param-type"><a href="Matrix3.html">Matrix3</a></span>
</td>
<td class="default">
<code class="language-javascript">Matrix3.ZERO</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The three orthogonal half-axes of the bounding box. Equivalently, the transformation matrix, to rotate and scale a 0x0x0 cube centered at the origin.</td>
</tr>
</tbody>
</table>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Create an OrientedBoundingBox using a transformation matrix, a position where the box will be translated, and a scale. var center = new Cesium.Cartesian3(1.0, 0.0, 0.0); var halfAxes = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(1.0, 3.0, 2.0), new Cesium.Matrix3()); var obb = new Cesium.OrientedBoundingBox(center, halfAxes);</code></pre>
<h5>See:</h5>
<ul class="see-list">
<li><a href="BoundingSphere.html">BoundingSphere</a></li>
<li><a href="BoundingRectangle.html">BoundingRectangle</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.OrientedBoundingBox.packedLength<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L78">Core/OrientedBoundingBox.js 78</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/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L65">Core/OrientedBoundingBox.js 65</a>
</div>
</h4>
</div>
<div class="description">
The center of the box.
</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="halfAxes">
<a href="#halfAxes" class="doc-link"></a>
halfAxes<span class="type-signature"> : <a href="Matrix3.html">Matrix3</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L71">Core/OrientedBoundingBox.js 71</a>
</div>
</h4>
</div>
<div class="description">
The transformation matrix, to rotate the box to the right position.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript"><a href="Matrix3.html#.ZERO"><code>Matrix3.ZERO</code></a></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.OrientedBoundingBox.clone<span class="signature">(box, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L394">Core/OrientedBoundingBox.js 394</a>
</div>
</h4>
</div>
<div class="description">
Duplicates a OrientedBoundingBox 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>box</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
</td>
<td class="description last">
The bounding box to duplicate.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</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 OrientedBoundingBox instance if none was provided. (Returns undefined if box 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.OrientedBoundingBox.computePlaneDistances<span class="signature">(box, 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/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L545">Core/OrientedBoundingBox.js 545</a>
</div>
</h4>
</div>
<div class="description">
The distances calculated by the vector from the center of the bounding box to position projected onto direction. <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 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>box</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
</td>
<td class="description last">
The bounding box 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 box 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.OrientedBoundingBox.distanceSquaredTo<span class="signature">(box, cartesian)</span> &rarr; <span class="type-signature returnType">Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L468">Core/OrientedBoundingBox.js 468</a>
</div>
</h4>
</div>
<div class="description">
Computes the estimated distance squared from the closest point on a bounding box 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>box</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
</td>
<td class="description last">
The box.</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 estimated distance squared from the bounding sphere to the point.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Sort bounding boxes from back to front boxes.sort(function(a, b) { return Cesium.OrientedBoundingBox.distanceSquaredTo(b, camera.positionWC) - Cesium.OrientedBoundingBox.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.OrientedBoundingBox.equals<span class="signature">(left, right)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L753">Core/OrientedBoundingBox.js 753</a>
</div>
</h4>
</div>
<div class="description">
Compares the provided OrientedBoundingBox 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="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
</td>
<td class="description last">
The first OrientedBoundingBox.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
</td>
<td class="description last">
The second OrientedBoundingBox.</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=".fromPoints">
<a href="#.fromPoints" class="doc-link"></a>
<span class="type-signature attribute-static">static</span>Cesium.OrientedBoundingBox.fromPoints<span class="signature">(<span class="optional">positions</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L152">Core/OrientedBoundingBox.js 152</a>
</div>
</h4>
</div>
<div class="description">
Computes an instance of an OrientedBoundingBox of the given positions. This is an implementation of Stefan Gottschalk's Collision Queries using Oriented Bounding Boxes solution (PHD thesis). Reference: http://gamma.cs.unc.edu/users/gottschalk/main.pdf
</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>
List of <a href="Cartesian3.html"><code>Cartesian3</code></a> points that the bounding box will enclose.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</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 OrientedBoundingBox instance if one was not provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Compute an object oriented bounding box enclosing two points. var box = Cesium.OrientedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromRectangle">
<a href="#.fromRectangle" class="doc-link"></a>
<span class="type-signature attribute-static">static</span>Cesium.OrientedBoundingBox.fromRectangle<span class="signature">(rectangle, <span class="optional">minimumHeight</span>, <span class="optional">maximumHeight</span>, <span class="optional">ellipsoid</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L312">Core/OrientedBoundingBox.js 312</a>
</div>
</h4>
</div>
<div class="description">
Computes an OrientedBoundingBox that bounds a <a href="Rectangle.html"><code>Rectangle</code></a> on the surface of an <a href="Ellipsoid.html"><code>Ellipsoid</code></a>. There are no guarantees about the orientation of the bounding box.
</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">
The cartographic rectangle on the surface of the ellipsoid.</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 (elevation) within the tile.</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 (elevation) within the tile.</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 on which the rectangle is defined.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</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 OrientedBoundingBox instance if none was provided.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: rectangle.width must be between 0 and pi.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: rectangle.height must be between 0 and pi.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: ellipsoid must be an ellipsoid of revolution (<code>radii.x == radii.y</code>)
</div>
</li>
</ul>
<dl class="details">
</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.OrientedBoundingBox.intersectPlane<span class="signature">(box, plane)</span> &rarr; <span class="type-signature returnType"><a href="Intersect.html">Intersect</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L419">Core/OrientedBoundingBox.js 419</a>
</div>
</h4>
</div>
<div class="description">
Determines which side of a plane the oriented bounding box 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>box</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 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="Intersect.html#.INSIDE"><code>Intersect.INSIDE</code></a> if the entire box is on the side of the plane the normal is pointing, <a href="Intersect.html#.OUTSIDE"><code>Intersect.OUTSIDE</code></a> if the entire box is on the opposite side, and <a href="Intersect.html#.INTERSECTING"><code>Intersect.INTERSECTING</code></a> if the box 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.OrientedBoundingBox.isOccluded<span class="signature">(box, occluder)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L676">Core/OrientedBoundingBox.js 676</a>
</div>
</h4>
</div>
<div class="description">
Determines whether or not a bounding box 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>box</code></td>
<td class="type">
<span class="param-type"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
</td>
<td class="description last">
The bounding box 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 box 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.OrientedBoundingBox.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/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L89">Core/OrientedBoundingBox.js 89</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="OrientedBoundingBox.html">OrientedBoundingBox</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=".unpack">
<a href="#.unpack" class="doc-link"></a>
<span class="type-signature attribute-static">static</span>Cesium.OrientedBoundingBox.unpack<span class="signature">(array, <span class="optional">startingIndex</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L111">Core/OrientedBoundingBox.js 111</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="OrientedBoundingBox.html">OrientedBoundingBox</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 OrientedBoundingBox 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="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L767">Core/OrientedBoundingBox.js 767</a>
</div>
</h4>
</div>
<div class="description">
Duplicates this OrientedBoundingBox 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="OrientedBoundingBox.html">OrientedBoundingBox</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 OrientedBoundingBox instance if one was not 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/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L731">Core/OrientedBoundingBox.js 731</a>
</div>
</h4>
</div>
<div class="description">
The distances calculated by the vector from the center of the bounding box to position projected onto direction. <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 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>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 box 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/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L716">Core/OrientedBoundingBox.js 716</a>
</div>
</h4>
</div>
<div class="description">
Computes the estimated distance squared from the closest point on a bounding box 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 boxes from back to front boxes.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/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L778">Core/OrientedBoundingBox.js 778</a>
</div>
</h4>
</div>
<div class="description">
Compares this OrientedBoundingBox against the provided OrientedBoundingBox 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="OrientedBoundingBox.html">OrientedBoundingBox</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The right hand side OrientedBoundingBox.</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="Intersect.html">Intersect</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L700">Core/OrientedBoundingBox.js 700</a>
</div>
</h4>
</div>
<div class="description">
Determines which side of a plane the oriented bounding box 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="Intersect.html#.INSIDE"><code>Intersect.INSIDE</code></a> if the entire box is on the side of the plane the normal is pointing, <a href="Intersect.html#.OUTSIDE"><code>Intersect.OUTSIDE</code></a> if the entire box is on the opposite side, and <a href="Intersect.html#.INTERSECTING"><code>Intersect.INTERSECTING</code></a> if the box 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/AnalyticalGraphicsInc/cesium/blob/1.58/Source/Core/OrientedBoundingBox.js#L741">Core/OrientedBoundingBox.js 741</a>
</div>
</h4>
</div>
<div class="description">
Determines whether or not a bounding box 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>
</article>
</section>
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</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="ArcType"><a href="ArcType.html">ArcType</a></li><li data-name="AssociativeArray"><a href="AssociativeArray.html">AssociativeArray</a></li><li data-name="AxisAlignedBoundingBox"><a href="AxisAlignedBoundingBox.html">AxisAlignedBoundingBox</a></li><li data-name="barycentricCoordinates"><a href="barycentricCoordinates.html">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="binarySearch.html">binarySearch</a></li><li data-name="BingMapsApi"><a href="BingMapsApi.html">BingMapsApi</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="BingMapsStyle.html">BingMapsStyle</a></li><li data-name="BlendEquation"><a href="BlendEquation.html">BlendEquation</a></li><li data-name="BlendFunction"><a href="BlendFunction.html">BlendFunction</a></li><li data-name="BlendingState"><a href="BlendingState.html">BlendingState</a></li><li data-name="BlendOption"><a href="BlendOption.html">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="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="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="CameraEventType.html">CameraEventType</a></li><li data-name="cancelAnimationFrame"><a href="cancelAnimationFrame.html">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="CartographicGeocoderService.html">CartographicGeocoderService</a></li><li data-name="CatmullRomSpline"><a href="CatmullRomSpline.html">CatmullRomSpline</a></li><li data-name="Cesium3DTile"><a href="Cesium3DTile.html">Cesium3DTile</a></li><li data-name="Cesium3DTileColorBlendMode"><a href="Cesium3DTileColorBlendMode.html">Cesium3DTileColorBlendMode</a></li><li data-name="Cesium3DTileContent"><a href="Cesium3DTileContent.html">Cesium3DTileContent</a></li><li data-name="Cesium3DTileFeature"><a href="Cesium3DTileFeature.html">Cesium3DTileFeature</a></li><li data-name="Cesium3DTilePointFeature"><a href="Cesium3
</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>