OCCTProxy

occtProxy内核文件接口文档


ViewReflection

<p><strong>接口名称</strong>:ViewReflection</p> <p><strong>接口形式</strong>:Dll</p> <p><strong>请求方式</strong>:调用<code>OCCTProxy</code>的<code>ViewReflection</code>方法</p> <p><strong>接口描述</strong>: 该接口用于开启或关闭光线追踪功能,以在渲染视图中展示反射效果。</p> <p><strong>返回数据格式</strong>:</p> <pre><code class="language-json"> { &amp;quot;ResultFlag&amp;quot;: int, // 操作结果标志,1表示成功,非1表示出错 &amp;quot;ResultMsg&amp;quot;: String, // 操作结果信息或错误消息 &amp;quot;Data&amp;quot;: NULL // 表示选择模式是否成功切换 }</code></pre> <p><strong>请求参数</strong>:</p> <ul> <li><code>bool isReflection</code>:一个布尔值,用于指示是否开启光线追踪。 <ul> <li><code>True</code>:开启光线追踪,视图将展示反射效果。</li> <li><code>False</code>:关闭光线追踪,视图将不展示反射效果。</li> </ul></li> </ul> <p><strong>参数说明</strong>:</p> <ul> <li><code>isReflection</code>:必传参数,用于控制光线追踪的开启与关闭。</li> </ul> <p><strong>使用示例</strong>: ```c# // 假设你已经有了OCCTProxy的实例,这里命名为ActiveViewer.View bool isEnableReflection = true; // 设置为true以开启光线追踪,或false以关闭 Dictionary&lt;String, Object&gt; result = ActiveViewer.View.ViewReflection(isEnableReflection); // 检查返回结果,处理可能的错误或状态信息 if (result.ContainsKey(&quot;Error&quot;)) { // 处理错误情况 string errorMessage = result[&quot;Error&quot;] as string; // ... } else { // 光线追踪设置成功 // ... }</p> <pre><code> **注意事项**: * 在调用`ViewReflection`方法之前,请确保`OCCTProxy`实例已经正确初始化,并且DLL已经加载。 * 光线追踪功能可能会对渲染性能产生影响,特别是在复杂的场景或高分辨率下。因此,在不需要反射效果时,建议关闭该功能以优化性能。</code></pre>

页面列表

ITEM_HTML