数字孪生Web 后台dt( digital twin)2.0版本 统一命名格式
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1125 lines
26 KiB

12 months ago
<!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>Camera - XbsjEarth 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> -->
<a href="index.html">EarthSDK</a>
Camera
<div class="titleCenterer"></div>
</h1>
<section>
<header>
<div class="class-description">相机管理类</div>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="Camera">
<a href="#Camera" class="doc-link"></a>
new Camera<span class="signature">()</span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="Camera.Immersion.html">Immersion</a></dt>
<dd></dd>
<dt><a href="Camera.Interaction.html">Interaction</a></dt>
<dd></dd>
<dt><a href="Camera.Navigator.html">Navigator</a></dt>
<dd></dd>
<dt><a href="Camera.Viewport.html">Viewport</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Members</h3>
<div class="nameContainer">
<h4 class="name" id="flying">
<a href="#flying" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>flying<span class="type-signature"> : boolean</span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
是否正在飞行
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="immersion">
<a href="#immersion" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>immersion<span class="type-signature"> : <a href="Camera.Immersion.html">Camera.Immersion</a></span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
沉浸式管理
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="interaction">
<a href="#interaction" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>interaction<span class="type-signature"> : <a href="Camera.Interaction.html">Camera.Interaction</a></span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
交互类
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="navigator">
<a href="#navigator" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>navigator<span class="type-signature"> : <a href="Camera.Navigator.html">Camera.Navigator</a></span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
指北针管理
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="position">
<a href="#position" class="doc-link"></a>
position<span class="type-signature"> : Array.&lt;number></span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
位置 [经度,纬度,高度]
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">[0, 0, 0]</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="rotation">
<a href="#rotation" class="doc-link"></a>
rotation<span class="type-signature"> : Array.&lt;number></span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
姿态 [偏航角,俯仰角,翻转角]
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">[0, 0, 0]</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="viewport">
<a href="#viewport" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span>viewport<span class="type-signature"> : <a href="Camera.Viewport.html">Camera.Viewport</a></span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
视口管理
</div>
<dl class="details">
</dl>
<h3 class="subsection-title">Methods</h3>
<div class="nameContainer">
<h4 class="name" id="flyAround">
<a href="#flyAround" class="doc-link"></a>
flyAround<span class="signature">(position, <span class="optional">viewDistance</span>, <span class="optional">rotation</span>, <span class="optional">flyToDuration</span>, <span class="optional">aroundSpeed</span>)</span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
相机环绕飞行
</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>position</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="default">
</td>
<td class="description last">
目标位置, 形式如:[经度, 纬度, 高度] 其中经纬度的单位是弧度,高度的单位是米。</td>
</tr>
<tr>
<td class="name"><code>viewDistance</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
环绕距离,默认为当前相机到目标点距离, 单位是米。</td>
</tr>
<tr>
<td class="name"><code>rotation</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>
相机飞入后的姿态控制,从什么角度观察目标,形式如: [偏航角, 俯仰角, 翻转角], 单位是弧度。</td>
</tr>
<tr>
<td class="name"><code>flyToDuration</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>
环绕飞行之前飞向目标代理的时间,如果是0,则直接跳转,默认为3秒</td>
</tr>
<tr>
<td class="name"><code>aroundSpeed</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
环绕速度,单位是弧度/秒</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="flyTo">
<a href="#flyTo" class="doc-link"></a>
flyTo<span class="signature">(position, <span class="optional">viewDistance</span>, <span class="optional">rotation</span>, <span class="optional">duration</span>)</span>
<div class="source-link rightLinks">
</div>
</h4>
</div>
<div class="description">
相机飞入
</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">Array.&lt;number></span>
</td>
<td class="description last">
目标位置, 形式如:[经度, 纬度, 高度] 其中经纬度的单位是弧度,高度的单位是米。</td>
</tr>
<tr>
<td class="name"><code>viewDistance</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">
<span class="optional">optional</span>
距离目标多远距离时停下,默认为0,即直接飞到目标点处,单位是米。</td>
</tr>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="description last">
<span class="optional">optional</span>
相机飞入后的姿态控制,从什么角度观察目标,形式如: [偏航角, 俯仰角, 翻转角], 单位是弧度。</td>
</tr>
<tr>
<td class="name"><code>duration</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">
<span class="optional">optional</span>
飞行持续时间,如果是0,则直接跳转,单位是秒。</td>
</tr>
</tbody>
</table>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// 示例1 // 相机直接飞入北京(116.39, 39.9)的位置,高度100米。相机位于目标点上。 earth.camera.flyTo([116.39*Math.PI/180, 39.9*Math.PI/180, 100]) // 示例2 // 相机直接飞向北京(116.39, 39.9)的位置,高度100米的目标,再距离目标点1000米的距离停下来,此时目标点刚好位置屏幕中心位置。 earth.camera.flyTo([116.39*Math.PI/180, 39.9*Math.PI/180, 100], 1000); // 示例3 // 相机直接飞向北京(116.39, 39.9)的位置,高度100米的目标,再距离目标点1000米的距离停下来,此时目标点刚好位置屏幕中心位置。 // 同时相机的方向是正东向,向下倾斜30度。 // 相机方向是这样的 朝北是0度,朝东是90度,朝南是180度,朝西是270度。抬头看天的俯仰角是90度,俯视地面是-90度。 earth.camera.flyTo([116.39*Math.PI/180, 39.9*Math.PI/180, 100], 1000, [90*Math.PI/180, -30*Math.PI/180, 0]); // 特别说明: // 注意示例中使用度数是方便理解,实际使用时,需要转换成弧度(乘上Math.PI/180) // 为了和Cesium保持一致(Cartographic,Cartesian),EarthSDK里面凡是涉及到角度的单位一律用弧度,凡是使用长度的单位一律用米。 // 实际上计算机地层中关于角度的计算都是使用弧度的,比如JS中的Math.cos/Math.sin等所有的角度计算操作。</code></pre>
</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="AmbientOcclusionStage"><a href="AmbientOcclusionStage.html">AmbientOcclusionStage</a></li><li data-name="Analyzation"><a href="Analyzation.html">Analyzation</a></li><li data-name="CutFillComputing"><a href="Analyzation.CutFillComputing.html">CutFillComputing</a></li><li data-name="Measurement"><a href="Analyzation.Measurement.html">Measurement</a></li><li data-name="BlackAndWhiteStage"><a href="BlackAndWhiteStage.html">BlackAndWhiteStage</a></li><li data-name="BloomStage"><a href="BloomStage.html">BloomStage</a></li><li data-name="BrightnessStage"><a href="BrightnessStage.html">BrightnessStage</a></li><li data-name="Camera"><a href="Camera.html">Camera</a></li><li data-name="Immersion"><a href="Camera.Immersion.html">Immersion</a></li><li data-name="Interaction"><a href="Camera.Interaction.html">Interaction</a></li><li data-name="Navigator"><a href="Camera.Navigator.html">Navigator</a></li><li data-name="Viewport"><a href="Camera.Viewport.html">Viewport</a></li><li data-name="CameraFlight"><a href="CameraFlight.html">CameraFlight</a></li><li data-name="CameraTrack"><a href="CameraFlight.CameraTrack.html">CameraTrack</a></li><li data-name="CameraView"><a href="CameraView.html">CameraView</a></li><li data-name="Manager"><a href="CameraView.Manager.html">Manager</a></li><li data-name="Status"><a href="CameraView.Status.html">Status</a></li><li data-name="View"><a href="CameraView.View.html">View</a></li><li data-name="DepthOfFieldStage"><a href="DepthOfFieldStage.html">DepthOfFieldStage</a></li><li data-name="Earth"><a href="Earth.html">Earth</a></li><li data-name="Effect"><a href="Effect.html">Effect</a></li><li data-name="ForceSunPos"><a href="Effect.ForceSunPos.html">ForceSunPos</a></li><li data-name="Shadow"><a href="Effect.Shadow.html">Shadow</a></li><li data-name="HTML"><a href="HTML.html">HTML</a></li><li data-name="LensFlareStage"><a href="LensFlareStage.html">LensFlareStage</a></li><li data-name="MapVLayer"><a href="MapVLayer.MapVLayer.html">MapVLayer</a></li><li data-name="MapVRenderer"><a href="MapVRenderer.MapVRenderer.html">MapVRenderer</a></li><li data-name="Misc"><a href="Misc.html">Misc</a></li><li data-name="Debug"><a href="Misc.Debug.html">Debug</a></li><li data-name="MosaicStage"><a href="MosaicStage.html">MosaicStage</a></li><li data-name="MVVM"><a href="MVVM.html">MVVM</a></li><li data-name="NightVisionStage"><a href="NightVisionStage.html">NightVisionStage</a></li><li data-name="Obj"><a href="Obj.html">Obj</a></li><li data-name="CameraVideo"><a href="Obj.CameraVideo.html">CameraVideo</a></li><li data-name="ClassificationPolygon"><a href="Obj.ClassificationPolygon.html">ClassificationPolygon</a></li><li data-name="Outline"><a href="Obj.ClassificationPolygon.Outline.html">Outline</a></li><li data-name="ClippingPlane"><a href="Obj.ClippingPlane.html">ClippingPlane</a></li><li data-name="CustomGroundRectangle"><a href="Obj.CustomGroundRectangle.html">CustomGroundRectangle</a></li><li data-name="CustomPrimitive"><a href="Obj.CustomPrimitive.html">CustomPrimitive</a></li><li data-name="Geometry"><a href="Obj.CustomPrimitive.Geometry.html">Geometry</a></li><li data-name="CutSurface"><a href="Obj.CutSurface.html">CutSurface</a></li><li data-name="FlattenedPolygonCollection"><a href="Obj.FlattenedPolygonCollection.html">FlattenedPolygonCollection</a></li><li data-name="FlattenedPolygon"><a href="Obj.FlattenedPolygonCollection.FlattenedPolygon.html">FlattenedPolygon</a></li><li data-name="Forest"><a href="Obj.Forest.html">Forest</a></li><li data-name="GroundImage"><a href="Obj.GroundImage.html">GroundImage</a></li><li data-name="HeatMap"><a href="Obj.HeatMap.html">HeatMap</a></li><li data-name="Imagery"><a href="Obj.Imagery.html">Imagery</a></li><li data-name="ImageryProvider"><a href="Obj.Imagery.ImageryProvider.html">ImageryProvider</a></li><li data-name="ArcGisMapServerImageryProvider"><a href="Obj.Imagery.ImageryProvider.ArcGisMapServerImageryProvider.html">ArcGisMapServerImageryProvider</a></li><li data-name="GoogleEarthEnterpriseImageryProvider"><a href="Obj.Image
</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>