zyy-engine

图形引擎API


倾斜摄影

<h1>倾斜摄影</h1> <h2>一、倾斜摄影配置类 - BCore.Extension.GIS.B3DMConfig</h2> <p><strong>构造:</strong> </p> <pre><code class="language-javascript">new BCore.Extension.GIS.B3DMConfig(viewer)</code></pre> <p><strong>参数:</strong></p> <ul> <li><strong>viewer</strong> (类型: <code>BCore.Viewer.Viewer3D</code>) - 视图对象</li> </ul> <p><strong>属性:</strong></p> <ul> <li> <p><strong>geometricErrorFactory</strong> (类型: <code>number</code>) - 几何容差</p> <ul> <li>默认值: 0.1</li> <li>PC推荐值: 0.1</li> <li>移动端推荐值: 0.005 - 0.008</li> </ul> </li> <li> <p><strong>maxCacheSize</strong> (类型: <code>number</code>) - 切片文件缓存上限</p> <ul> <li>默认值: 1200</li> <li>PC推荐值: 1200</li> <li>移动端推荐值: 1200</li> </ul> </li> <li><strong>minCacheSize</strong> (类型: <code>number</code>) - 切片文件缓存下限 <ul> <li>默认值: 0</li> <li>PC推荐值: 200</li> <li>移动端推荐值: 0</li> </ul></li> </ul> <hr /> <h2>二、倾斜摄影操作类 - BCore.Extension.GIS.B3DM</h2> <p><strong>构造:</strong> </p> <pre><code class="language-javascript">new BCore.Extension.GIS.B3DM(config)</code></pre> <p><strong>参数:</strong></p> <ul> <li><strong>config</strong> (类型: <code>BCore.Extension.GIS.B3DMConfig</code>): 倾斜摄影配置参对象</li> </ul> <p><strong>方法:</strong></p> <ul> <li><strong>add3DTileModel()</strong>: 加载倾斜摄影模型</li> <li><strong>delete3DTileModel()</strong>: 卸载倾斜摄影模型</li> <li><strong>set3DTileModelOffset()</strong>: 设置倾斜摄影模型偏移</li> <li><strong>get3DTileModelOffset()</strong>: 获取倾斜摄影模型偏移</li> <li><strong>setGeometricErrorFactory(factory: number)</strong>: 设置几何容差</li> <li><strong>getGeometricErrorFactory()</strong>: 获取几何容差</li> </ul> <hr /> <h2>方法示例</h2> <h3>1. 加载倾斜摄影模型</h3> <p><strong>接口:</strong> </p> <pre><code class="language-javascript">add3DTileModel(fileId, position, rotation)</code></pre> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>fileId</td> <td>是</td> <td>string</td> <td>模型id</td> </tr> <tr> <td>position</td> <td>否</td> <td>{ x: number, y: number, z: number }</td> <td>模型坐标点</td> </tr> <tr> <td>rotation</td> <td>否</td> <td>{ x: number, y: number, z: number }</td> <td>模型旋转</td> </tr> </tbody> </table> <p><strong>示例:</strong></p> <pre><code class="language-javascript">let mB3DMConfig = new BCore.Extension.GIS.B3DMConfig(mViewer3D); let mB3DM = new BCore.Extension.GIS.B3DM(mB3DMConfig); mB3DM.add3DTileModel(&amp;#039;fileId&amp;#039;);</code></pre> <hr /> <h3>2. 卸载倾斜摄影模型</h3> <p><strong>简要描述:</strong> 卸载倾斜摄影模型</p> <p><strong>接口:</strong> </p> <pre><code class="language-javascript">delete3DTileModel(fileId)</code></pre> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>fileId</td> <td>是</td> <td>string</td> <td>模型id</td> </tr> </tbody> </table> <p><strong>示例:</strong></p> <pre><code class="language-javascript">let mB3DMConfig = new BCore.Extension.GIS.B3DMConfig(mViewer3D); let mB3DM = new BCore.Extension.GIS.B3DM(mB3DMConfig); mB3DM.delete3DTileModel(&amp;#039;fileId&amp;#039;);</code></pre> <hr /> <h3>3. 倾斜摄影模型偏移</h3> <p><strong>简要描述:</strong> 设置与获取倾斜摄影模型偏移</p> <p><strong>接口:</strong></p> <ul> <li><strong>设置偏移:</strong> <pre><code class="language-javascript">set3DTileModelOffset(fileId, position)</code></pre></li> <li><strong>获取偏移:</strong> <pre><code class="language-javascript">get3DTileModelOffset(fileId)</code></pre></li> </ul> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>fileId</td> <td>是</td> <td>string</td> <td>模型id</td> </tr> <tr> <td>position</td> <td>是</td> <td>{ x: number, y: number, z: number }</td> <td>模型坐标点</td> </tr> </tbody> </table> <p><strong>示例:</strong></p> <pre><code class="language-javascript">let mB3DMConfig = new BCore.Extension.GIS.B3DMConfig(mViewer3D); let mB3DM = new BCore.Extension.GIS.B3DM(mB3DMConfig); mB3DM.add3DTileModel(&amp;#039;fileId&amp;#039;); mB3DM.set3DTileModelOffset(&amp;#039;fileId&amp;#039;, {x: 0, y: 0, z: 10}); //mB3DM.get3DTileModelOffset(&amp;#039;fileId&amp;#039;);</code></pre> <hr /> <h3>4. 几何容差</h3> <p><strong>简要描述:</strong> 几何容差为控制倾斜摄影模型加载精细度的参数</p> <p><strong>接口:</strong></p> <ul> <li><strong>设置几何容差:</strong> <pre><code class="language-javascript">setGeometricErrorFactory(factory: number)</code></pre></li> <li><strong>获取几何容差:</strong> <pre><code class="language-javascript">getGeometricErrorFactory()</code></pre></li> </ul> <p><strong>参数:</strong></p> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> <th>默认值</th> </tr> </thead> <tbody> <tr> <td>factory</td> <td>是</td> <td>number</td> <td>PC 可选 0.1 左右;iPhone 可选 0.005~0.008,越小加载精度约粗糙</td> <td>0.1</td> </tr> </tbody> </table> <p><strong>示例:</strong></p> <pre><code class="language-javascript">let mB3DMConfig = new BCore.Extension.GIS.B3DMConfig(mViewer3D); let mB3DM = new BCore.Extension.GIS.B3DM(mB3DMConfig); mB3DM.setGeometricErrorFactory(0.005);</code></pre> <hr /> <p>以上是倾斜摄影的接口文档,包含了构造函数、参数、方法及示例代码,便于开发者理解和使用。</p>

页面列表

ITEM_HTML