热力图
<h1>热力图</h1>
<h2>类说明</h2>
<p><code>HeatMap</code> 热力图对象,用于数据可视化。</p>
<p><code>HeatMapConfig</code> 热力图对象的配置参数。</p>
<p><code>HeatMapManager</code> 热力图工具类</p>
<p><code>HeatMapManagerConfig</code> 热力图工具类的配置类</p>
<hr />
<h2>BCore.Extension.HeatMapConfig</h2>
<h3>构造</h3>
<pre><code class="language-javascript">new BCore.Extension.HeatMapConfig()</code></pre>
<h3>成员变量</h3>
<table>
<thead>
<tr>
<th>成员变量</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>samplingDatas</td>
<td>Array</td>
<td>热力图的采样点</td>
</tr>
<tr>
<td>maxValue</td>
<td>number</td>
<td>最大值,默认为 <code>Math.max(samplingDatas.value)</code></td>
</tr>
<tr>
<td>minValue</td>
<td>number</td>
<td>最小值,默认为 <code>Math.min(samplingDatas.value)</code></td>
</tr>
<tr>
<td>size</td>
<td>number</td>
<td>热力图的边长</td>
</tr>
<tr>
<td>position</td>
<td>{ x: 0, y: 0, z: 0 }</td>
<td>世界坐标</td>
</tr>
<tr>
<td>depthTest</td>
<td>bool</td>
<td>是否开启深度检测</td>
</tr>
<tr>
<td>radius</td>
<td>number</td>
<td>采样点影响半径,未设置时使用默认值</td>
</tr>
<tr>
<td>gradient</td>
<td>{ number:string}</td>
<td>热力图图例</td>
</tr>
<tr>
<td>blur</td>
<td>number</td>
<td>模糊度,默认值为 0.85</td>
</tr>
</tbody>
</table>
<hr />
<h2>BCore.Extension.HeatMap</h2>
<h3>构造</h3>
<pre><code class="language-javascript">new BCore.Extension.HeatMap(name: string, config: HeatMapConfig)</code></pre>
<h3>参数</h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>全局唯一的名称</td>
</tr>
<tr>
<td>config</td>
<td>BCore.Extension.HeatMapConfig</td>
<td>热力图配置参数</td>
</tr>
</tbody>
</table>
<h3>方法</h3>
<ul>
<li><code>getValueAt(x: number, y: number)</code>: 获取热力图坐标对应的插值。</li>
</ul>
<hr />
<h2>BCore.Extension.HeatMapManagerConfig</h2>
<p>热力图工具类的配置。</p>
<h3>构造</h3>
<pre><code class="language-javascript">new BCore.Extension.HeatMapManagerConfig(viewer3D)</code></pre>
<h3>成员变量</h3>
<table>
<thead>
<tr>
<th>成员变量</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>viewer3D</td>
<td>BCore.Viewer.Viewer3D</td>
<td>3D查看器</td>
</tr>
</tbody>
</table>
<h2>BCore.Extension.HeatMapManager</h2>
<h3>构造</h3>
<pre><code class="language-javascript">new BCore.Extension.HeatMapManager(config)</code></pre>
<h3>参数</h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>config</td>
<td>BCore.Extension.HeatMapManagerConfig</td>
<td>热力图工具类的配置类</td>
</tr>
</tbody>
</table>
<h3>方法</h3>
<ul>
<li><code>addHeatMap(heatMap: HeatMap)</code>: 添加热力图。</li>
<li><code>removeHeatMap(name: string)</code>: 移除热力图。</li>
</ul>
<hr />
<h2>示例代码</h2>
<h3>添加热力图</h3>
<pre><code class="language-javascript">let heatMapConfig = new BCore.Extension.HeatMapConfig();
// 配置你的采样数据等参数
let heatMap = new BCore.Extension.HeatMap(&quot;myHeatMap&quot;, heatMapConfig);
let heatMapManager = new B.Extension.HeatMapManager(new BCore.Extension.HeatMapManagerConfig(viewer3D));
heatMapManager.addHeatMap(heatMap);</code></pre>
<h3>移除热力图</h3>
<pre><code class="language-javascript">heatMapManager.removeHeatMap(&quot;myHeatMap&quot;);</code></pre>
<hr />
<p>以上信息提供了关于 <code>热力图</code> 及其配置的全面介绍,供你在使用时参考。如果你有特定的需求或其他问题,请联系我们~</p>