虚拟实验室-Unreal 版本

虚拟实验室的Unreal 版本,第一个版本主要是以《探究通电螺线管外部的磁场分布》颗粒为例,设计和开发一个正式版本。


运动轨迹绘制-VLabMotionTrajectoryPlotting

<table> <thead> <tr> <th>作者</th> <th>QFord(350107)</th> </tr> </thead> <tbody> <tr> <td>创建日期</td> <td>2024-12-21</td> </tr> <tr> <td>更新日期</td> <td>2024-12-23</td> </tr> <tr> <td>版本</td> <td>V1.0.0</td> </tr> </tbody> </table> <p>[TOC]</p> <p><strong>注意:</strong>此组件将交接<strong>刘备</strong>同学。</p> <h1>需求来源</h1> <p>[组件规划排期表-通用组件-运动轨迹绘制(Line 181)](<a href="https://www.kdocs.cn/l/cqmSxViG0bqQ">https://www.kdocs.cn/l/cqmSxViG0bqQ</a> &quot;组件规划排期表-通用组件-运动轨迹绘制(Line 181)&quot;) <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=6a475e6e018411049e0832f7bf087061&amp;amp;file=file.png" alt="" /></p> <h1>能力拆解</h1> <ul> <li>3D空间绘线(线条样式可定制,支持虚线,支持颜色变更和粗细变化等)</li> <li>显示角度(本质也是绘线+显示角度文本) <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=48dbfba2fb6b21024d87090152efbb5d&amp;amp;file=file.png" alt="" /> &gt;说明: 1:上述的<strong>能力拆解内容</strong>已和器材开发、QA讨论并确认。 2:固定时间间隔打点、最高位置打点等具体业务功能可由器材自行实现。 其实,根据能力拆解和<strong>PathTracer</strong>(详见附录),表现的组装可以由器材来实现,但是一些相对复杂的算法,用C++比较合适,下面<strong>组件说明</strong>中会有相关的信息。</li> </ul> <h1>组件说明</h1> <h2>测试关卡</h2> <p>为了便于演示和说明,因为器材资源还没有,就直接新建了一个类似的来模拟,如下图所示: <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=0258ca04b08c95b7b768500f3f449161&amp;amp;file=file.png" alt="" /> &gt;测试关卡可能被更改,实际中可以自行建立任意关卡用于测试。</p> <h2>使用案例-蓝图类</h2> <p><strong>BP_Test</strong>,主要用于演示上述拆解的能力的实现 <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=6252eac4498b0b5df1729c0ff7463763&amp;amp;file=file.png" alt="" /></p> <h3>1:绘制和删除线段-用例</h3> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=ed2a85ab400e313a83ef77a2f72edfa6&amp;amp;file=file.png" alt="" /></p> <h3>2: 计算和显示角度-用例</h3> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=5bf20a48a4a7ea226a3740dd013b964b&amp;amp;file=file.png" alt="" /></p> <h3>3: 绘制示意角度的弧线-用例</h3> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=17e323178ed50919ebb6939b57c1ab39&amp;amp;file=file.png" alt="" /> &gt; 本用例是使用UE调试用的<strong>DrawDebugSphere</strong>,实际中使用<strong>PathTracer</strong>绘制即可。</p> <h3>用例运行效果</h3> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=d369695d673de3344cb7c13df9066291&amp;amp;file=file.png" alt="" /></p> <h2>绘线模板-蓝图类</h2> <p>用于控制绘线的样式,用法请参考<strong>附录1</strong>。 <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=739f342249489313db225538e09ea998&amp;amp;file=file.png" alt="" /></p> <h2>辅助函数-C++方法</h2> <p>供蓝图中调用(注:使用Rider可以直接点击 <strong>1 blueprint usage</strong>快速跳转到蓝图调用的地方,非常方便!!!)。 上述提到的辅助函数是通用的,并非此组件独享,故未放置到此组件模块中。 <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=8fb528ec75cfbf18121df17a06146f26&amp;amp;file=file.png" alt="" /><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=0debee3cc4dc49c5aa7c539677e7ddc5&amp;amp;file=file.png" alt="" /></p> <h2>组件模块</h2> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=9df5f49c449b38f13fd26591427e8934&amp;amp;file=file.png" alt="" /></p> <h1>关于测试</h1> <p>这个组件适合在开发环境中编写测试用例,比如绘线的样式修改,更多测试用例由QA负责设计和测试。</p> <h1>附录</h1> <ol> <li>绘线主要基于PathTracer插件,用法请参考:[Google官方文档](<a href="https://docs.google.com/document/d/1RdWwY334-SiEOGe0mGU6JbN5n6bHApXAjXsQTEHHnCE/edit?tab=t.0">https://docs.google.com/document/d/1RdWwY334-SiEOGe0mGU6JbN5n6bHApXAjXsQTEHHnCE/edit?tab=t.0</a> &quot;Google官方文档&quot;)</li> <li>PathTracer最早是我引入,刘备同学用来绘制导线的(现在的导线是永弟基于UE自带的CableComponent)。后来也用于磁感线(VLabMagnetFieldLine)的绘制,由陈铭同学进行了封装。</li> </ol>

页面列表

ITEM_HTML