DSDSWeb/static/js/Cesium-1.53/Build/Documentation/GroundPrimitive.html

2423 lines
82 KiB
HTML
Raw Normal View History

2024-07-11 18:02:47 +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>GroundPrimitive - 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>
GroundPrimitive
<div class="titleCenterer"></div>
</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="GroundPrimitive">
<a href="#GroundPrimitive" class="doc-link"></a>
new Cesium.GroundPrimitive<span class="signature">(<span class="optional">options</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L159">Scene/GroundPrimitive.js 159</a>
</div>
</h4>
</div>
<div class="description">
A ground primitive represents geometry draped over the terrain in the <a href="Scene.html"><code>Scene</code></a>. <p> A primitive combines geometry instances with an <a href="Appearance.html"><code>Appearance</code></a> that describes the full shading, including <a href="Material.html"><code>Material</code></a> and <code>RenderState</code>. Roughly, the geometry instance defines the structure and placement, and the appearance defines the visual characteristics. Decoupling geometry and appearance allows us to mix and match most of them and add a new geometry or appearance independently of each other. Only <a href="PerInstanceColorAppearance.html"><code>PerInstanceColorAppearance</code></a> with the same color across all instances is supported at this time when classifying <a href="ClassificationType.html"><code>ClassificationType</code></a>.CESIUM_3D_TILE and <a href="ClassificationType.html"><code>ClassificationType</code></a>.BOTH. Support for the WEBGL_depth_texture extension is required to use GeometryInstances with different PerInstanceColors or materials besides PerInstanceColorAppearance. Textured GroundPrimitives were designed for notional patterns and are not meant for precisely mapping textures to terrain - for that use case, use <a href="SingleTileImageryProvider.html"><code>SingleTileImageryProvider</code></a>. </p> <p> For correct rendering, this feature requires the EXT_frag_depth WebGL extension. For hardware that do not support this extension, there will be rendering artifacts for some viewing angles. </p> <p> Valid geometries are <a href="CircleGeometry.html"><code>CircleGeometry</code></a>, <a href="CorridorGeometry.html"><code>CorridorGeometry</code></a>, <a href="EllipseGeometry.html"><code>EllipseGeometry</code></a>, <a href="PolygonGeometry.html"><code>PolygonGeometry</code></a>, and <a href="RectangleGeometry.html"><code>RectangleGeometry</code></a>. </p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
<span class="optional">optional</span>
Object with the following properties:
<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>geometryInstances</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type"><a href="GeometryInstance.html">GeometryInstance</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The geometry instances to render.</td>
</tr>
<tr>
<td class="name"><code>appearance</code></td>
<td class="type">
<span class="param-type"><a href="Appearance.html">Appearance</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The appearance used to render the primitive. Defaults to a flat PerInstanceColorAppearance when GeometryInstances have a color attribute.</td>
</tr>
<tr>
<td class="name"><code>show</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
Determines if this primitive will be shown.</td>
</tr>
<tr>
<td class="name"><code>vertexCacheOptimize</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
When <code>true</code>, geometry vertices are optimized for the pre and post-vertex-shader caches.</td>
</tr>
<tr>
<td class="name"><code>interleave</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
When <code>true</code>, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.</td>
</tr>
<tr>
<td class="name"><code>compressVertices</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
When <code>true</code>, the geometry vertices are compressed, which will save memory.</td>
</tr>
<tr>
<td class="name"><code>releaseGeometryInstances</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
When <code>true</code>, the primitive does not keep a reference to the input <code>geometryInstances</code> to save memory.</td>
</tr>
<tr>
<td class="name"><code>allowPicking</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
When <code>true</code>, each geometry instance will only be pickable with <a href="Scene.html#pick"><code>Scene#pick</code></a>. When <code>false</code>, GPU memory is saved.</td>
</tr>
<tr>
<td class="name"><code>asynchronous</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
Determines if the primitive will be created asynchronously or block until ready. If false initializeTerrainHeights() must be called first.</td>
</tr>
<tr>
<td class="name"><code>classificationType</code></td>
<td class="type">
<span class="param-type"><a href="ClassificationType.html">ClassificationType</a></span>
</td>
<td class="default">
<code class="language-javascript">ClassificationType.TERRAIN</code>
</td>
<td class="description last">
<span class="optional">optional</span>
Determines whether terrain, 3D Tiles or both will be classified.</td>
</tr>
<tr>
<td class="name"><code>debugShowBoundingVolume</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
For debugging only. Determines if this primitive's commands' bounding spheres are shown.</td>
</tr>
<tr>
<td class="name"><code>debugShowShadowVolume</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be <code>true</code> on creation for the volumes to be created before the geometry is released or options.releaseGeometryInstance must be <code>false</code>.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Example 1: Create primitive with a single instance var rectangleInstance = new Cesium.GeometryInstance({ geometry : new Cesium.RectangleGeometry({ rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0) }), id : 'rectangle', attributes : { color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5) } }); scene.primitives.add(new Cesium.GroundPrimitive({ geometryInstances : rectangleInstance })); // Example 2: Batch instances var color = new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5); // Both instances must have the same color. var rectangleInstance = new Cesium.GeometryInstance({ geometry : new Cesium.RectangleGeometry({ rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0) }), id : 'rectangle', attributes : { color : color } }); var ellipseInstance = new Cesium.GeometryInstance({ geometry : new Cesium.EllipseGeometry({ center : Cesium.Cartesian3.fromDegrees(-105.0, 40.0), semiMinorAxis : 300000.0, semiMajorAxis : 400000.0 }), id : 'ellipse', attributes : { color : color } }); scene.primitives.add(new Cesium.GroundPrimitive({ geometryInstances : [rectangleInstance, ellipseInstance] }));</code></pre>
<h5>See:</h5>
<ul class="see-list">
<li><a href="Primitive.html">Primitive</a></li>
<li><a href="ClassificationPrimitive.html">ClassificationPrimitive</a></li>
<li><a href="GeometryInstance.html">GeometryInstance</a></li>
<li><a href="Appearance.html">Appearance</a></li>
</ul>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<div class="nameContainer">
<h4 class="name" id="allowPicking">
<a href="#allowPicking" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>allowPicking<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L342">Scene/GroundPrimitive.js 342</a>
</div>
</h4>
</div>
<div class="description">
When <code>true</code>, each geometry instance will only be pickable with <a href="Scene.html#pick"><code>Scene#pick</code></a>. When <code>false</code>, GPU memory is saved.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">true</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="appearance">
<a href="#appearance" class="doc-link"></a>
appearance<span class="type-signature"> : <a href="Appearance.html">Appearance</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L187">Scene/GroundPrimitive.js 187</a>
</div>
</h4>
</div>
<div class="description">
The <a href="Appearance.html"><code>Appearance</code></a> used to shade this primitive. Each geometry instance is shaded with the same appearance. Some appearances, like <a href="PerInstanceColorAppearance.html"><code>PerInstanceColorAppearance</code></a> allow giving each instance unique properties.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">undefined</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="asynchronous">
<a href="#asynchronous" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>asynchronous<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L358">Scene/GroundPrimitive.js 358</a>
</div>
</h4>
</div>
<div class="description">
Determines if the geometry instances will be created and batched on a web worker.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">true</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="classificationType">
<a href="#classificationType" class="doc-link"></a>
classificationType<span class="type-signature"> : <a href="ClassificationType.html">ClassificationType</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L219">Scene/GroundPrimitive.js 219</a>
</div>
</h4>
</div>
<div class="description">
Determines whether terrain, 3D Tiles or both will be classified.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">ClassificationType.TERRAIN</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="compressVertices">
<a href="#compressVertices" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>compressVertices<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L374">Scene/GroundPrimitive.js 374</a>
</div>
</h4>
</div>
<div class="description">
When <code>true</code>, geometry vertices are compressed, which will save memory.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">true</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="debugShowBoundingVolume">
<a href="#debugShowBoundingVolume" class="doc-link"></a>
debugShowBoundingVolume<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L230">Scene/GroundPrimitive.js 230</a>
</div>
</h4>
</div>
<div class="description">
This property is for debugging only; it is not for production use nor is it optimized. <p> Draws the bounding sphere for each draw command in the primitive. </p>
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">false</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="debugShowShadowVolume">
<a href="#debugShowShadowVolume" class="doc-link"></a>
debugShowShadowVolume<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L242">Scene/GroundPrimitive.js 242</a>
</div>
</h4>
</div>
<div class="description">
This property is for debugging only; it is not for production use nor is it optimized. <p> Draws the shadow volume for each geometry in the primitive. </p>
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">false</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="geometryInstances">
<a href="#geometryInstances" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>geometryInstances<span class="type-signature"> : Array|<a href="GeometryInstance.html">GeometryInstance</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L202">Scene/GroundPrimitive.js 202</a>
</div>
</h4>
</div>
<div class="description">
The geometry instances rendered with this primitive. This may be <code>undefined</code> if <code>options.releaseGeometryInstances</code> is <code>true</code> when the primitive is constructed. <p> Changing this property after the primitive is rendered has no effect. </p>
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">undefined</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="interleave">
<a href="#interleave" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>interleave<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L310">Scene/GroundPrimitive.js 310</a>
</div>
</h4>
</div>
<div class="description">
Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">false</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="ready">
<a href="#ready" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>ready<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L390">Scene/GroundPrimitive.js 390</a>
</div>
</h4>
</div>
<div class="description">
Determines if the primitive is complete and ready to render. If this property is true, the primitive will be rendered the next time that <a href="GroundPrimitive.html#update"><code>GroundPrimitive#update</code></a> is called.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="readyPromise">
<a href="#readyPromise" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>readyPromise<span class="type-signature"> : Promise.&lt;<a href="GroundPrimitive.html">GroundPrimitive</a>></span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L402">Scene/GroundPrimitive.js 402</a>
</div>
</h4>
</div>
<div class="description">
Gets a promise that resolves when the primitive is ready to render.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="releaseGeometryInstances">
<a href="#releaseGeometryInstances" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>releaseGeometryInstances<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L326">Scene/GroundPrimitive.js 326</a>
</div>
</h4>
</div>
<div class="description">
When <code>true</code>, the primitive does not keep a reference to the input <code>geometryInstances</code> to save memory.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">true</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="show">
<a href="#show" class="doc-link"></a>
show<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L211">Scene/GroundPrimitive.js 211</a>
</div>
</h4>
</div>
<div class="description">
Determines if the primitive will be shown. This affects all geometry instances in the primitive.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">true</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="vertexCacheOptimize">
<a href="#vertexCacheOptimize" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>vertexCacheOptimize<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L294">Scene/GroundPrimitive.js 294</a>
</div>
</h4>
</div>
<div class="description">
When <code>true</code>, geometry vertices are optimized for the pre and post-vertex-shader caches.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">true</code>
</dl>
<h3 class="subsection-title">Methods</h3>
<div class="nameContainer">
<h4 class="name" id=".initializeTerrainHeights">
<a href="#.initializeTerrainHeights" class="doc-link"></a>
<span class="type-signature attribute-static">static</span>Cesium.GroundPrimitive.initializeTerrainHeights<span class="signature">()</span> &rarr; <span class="type-signature returnType">Promise</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L624">Scene/GroundPrimitive.js 624</a>
</div>
</h4>
</div>
<div class="description">
Initializes the minimum and maximum terrain heights. This only needs to be called if you are creating the GroundPrimitive synchronously.
</div>
<h5>Returns:</h5>
<div class="param-desc">
A promise that will resolve once the terrain heights have been loaded.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".isSupported">
<a href="#.isSupported" class="doc-link"></a>
<span class="type-signature attribute-static">static</span>Cesium.GroundPrimitive.isSupported<span class="signature">(scene)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L416">Scene/GroundPrimitive.js 416</a>
</div>
</h4>
</div>
<div class="description">
Determines if GroundPrimitive rendering is supported.
</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>scene</code></td>
<td class="type">
<span class="param-type"><a href="Scene.html">Scene</a></span>
</td>
<td class="description last">
The scene.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if GroundPrimitives are supported; otherwise, returns <code>false</code>
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".supportsMaterials">
<a href="#.supportsMaterials" class="doc-link"></a>
<span class="type-signature attribute-static">static</span>Cesium.GroundPrimitive.supportsMaterials<span class="signature">(scene)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L892">Scene/GroundPrimitive.js 892</a>
</div>
</h4>
</div>
<div class="description">
Checks if the given Scene supports materials on GroundPrimitives. Materials on GroundPrimitives require support for the WEBGL_depth_texture extension.
</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>scene</code></td>
<td class="type">
<span class="param-type"><a href="Scene.html">Scene</a></span>
</td>
<td class="description last">
The current scene.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
Whether or not the current scene supports materials on GroundPrimitives.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="destroy">
<a href="#destroy" class="doc-link"></a>
destroy<span class="signature">()</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L869">Scene/GroundPrimitive.js 869</a>
</div>
</h4>
</div>
<div class="description">
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object. <p> Once an object is destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a <a href="DeveloperError.html"><code>DeveloperError</code></a> exception. Therefore, assign the return value (<code>undefined</code>) to the object as done in the example. </p>
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: This object was destroyed, i.e., destroy() was called.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">e = e &amp;&amp; e.destroy();</code></pre>
<h5>See:</h5>
<ul class="see-list">
<li><a href="GroundPrimitive.html#isDestroyed">GroundPrimitive#isDestroyed</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id="getGeometryInstanceAttributes">
<a href="#getGeometryInstanceAttributes" class="doc-link"></a>
getGeometryInstanceAttributes<span class="signature">(id)</span> &rarr; <span class="type-signature returnType">Object</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L829">Scene/GroundPrimitive.js 829</a>
</div>
</h4>
</div>
<div class="description">
Returns the modifiable per-instance attributes for a <a href="GeometryInstance.html"><code>GeometryInstance</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>id</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last">
The id of the <a href="GeometryInstance.html"><code>GeometryInstance</code></a>.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The typed array in the attribute's format or undefined if the is no instance with id.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: must call update before calling getGeometryInstanceAttributes.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">var attributes = primitive.getGeometryInstanceAttributes('an id'); attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA); attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id="isDestroyed">
<a href="#isDestroyed" class="doc-link"></a>
isDestroyed<span class="signature">()</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L849">Scene/GroundPrimitive.js 849</a>
</div>
</h4>
</div>
<div class="description">
Returns true if this object was destroyed; otherwise, false. <p> If this object was destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a <a href="DeveloperError.html"><code>DeveloperError</code></a> exception. </p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if this object was destroyed; otherwise, <code>false</code>.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="GroundPrimitive.html#destroy">GroundPrimitive#destroy</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id="update">
<a href="#update" class="doc-link"></a>
update<span class="signature">()</span>
<div class="source-link rightLinks">
<a href="https://github.com/AnalyticalGraphicsInc/cesium/blob/1.53/Source/Scene/GroundPrimitive.js#L640">Scene/GroundPrimitive.js 640</a>
</div>
</h4>
</div>
<div class="description">
Called when <a href="Viewer.html"><code>Viewer</code></a> or <a href="CesiumWidget.html"><code>CesiumWidget</code></a> render the scene to get the draw commands needed to render this primitive. <p> Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered: </p>
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: For synchronous GroundPrimitive, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: All instance geometries must have the same primitiveType.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: Appearance and material have a uniform with the same name.
</div>
</li>
</ul>
<dl class="details">
</dl>
</article>
</section>
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</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="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="Cesium3DTilePointFeature.html">Cesium3DTilePointFeature</a></li><li da
</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>