虚拟实验室-Unreal 版本

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


基础能力--统一日志打印

<p>[TOC]</p> <table> <thead> <tr> <th>作者</th> <th>范丽民(969618)</th> </tr> </thead> <tbody> <tr> <td>更新日期</td> <td>2024-7-23</td> </tr> <tr> <td>版本</td> <td>V1.0.0</td> </tr> </tbody> </table> <h1>组件说明</h1> <p>将内置的Log进行封装,方便统一日志处理 屏幕显示关闭日志可以在控制台输入以下命令: Lab ShowDebugScreen 1 开启,Lab ShowDebugScreen 0 关闭 <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=439185c89b5022cd7074213e5b037897&amp;amp;file=file.png" alt="" /> 也可以代码中调用SetShowScreen 控制</p> <h1>组件用法</h1> <p>```C++ FDebugger::Debug(TEXT(字符串),参数...); FDebugger::Log(TEXT(字符串),参数...); FDebugger::Warning(TEXT(字符串),参数...); FDebugger::Error(TEXT(字符串),参数...);</p> <pre><code># 组件接口 ```C++ //输出Debug日志 template &amp;lt;typename FmtType, typename... Types&amp;gt; static void Debug(const FmtType&amp;amp; DebugMessage, Types... Args) //输出Log日志 template &amp;lt;typename FmtType, typename... Types&amp;gt; static void Log(const FmtType&amp;amp; DebugMessage, Types... Args) //输出Warning日志 template &amp;lt;typename FmtType, typename... Types&amp;gt; static void Warning(const FmtType&amp;amp; DebugMessage, Types... Args) //输出Error日志 template &amp;lt;typename FmtType, typename... Types&amp;gt; static void Error(const FmtType&amp;amp; DebugMessage, Types... Args) //设置是否显示屏幕日志 static void SetShowScreen(bool bShow) //设置日志显示级别 static void SetDebugLevel(EDebugLevel eLevel) </code></pre> <h1>组件示例</h1> <p>```c++</p> <h1>include &quot;Debuger/FDebugger.h&quot;</h1> <p>//输出日志信息 FDebugger::Log(TEXT(&quot;Hello %s! You have %d new messages.&quot;),TEXT(&quot;Log&quot;), 2); FDebugger::Warning(TEXT(&quot;Hello %s!&quot;),TEXT(&quot;Warning&quot;)); FDebugger::Error(TEXT(&quot;Hello Error&quot;)); //设置屏幕显示日志 FDebugger::SetShowScreen(true); //设置日志输出级别 FDebugger::SetDebugLevel(EDebugLevel::Warning);</p> <pre><code>```shell #命令行开启屏幕日志显示 Lab ShowDebugScreen 1 #命令行关闭屏幕日志显示 Lab ShowDebugScreen 0 </code></pre>

页面列表

ITEM_HTML