Metahuman_DNA_Calibration/docs/doxygen/build/html/SingleCommand_8cpp.html

250 lines
17 KiB
HTML
Raw Normal View History

2022-11-28 19:21:26 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DNA Calib: SingleCommand.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">DNA Calib<span id="projectnumber">&#160;1.1</span>
</div>
<div id="projectbrief">Project brief</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_152a494004de7bf5f5699139fd63e08c.html">dnacalib</a></li><li class="navelem"><a class="el" href="dir_e342cf579e4a20e61ca12fdabd8b8b30.html">DNACalib</a></li><li class="navelem"><a class="el" href="dir_a6d245eb7f09d8f451e2ed8eaeee2a04.html">examples</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">SingleCommand.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="DNACalib_8h_source.html">dnacalib/DNACalib.h</a>&quot;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for SingleCommand.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="SingleCommand_8cpp__incl.png" border="0" usemap="#aSingleCommand_8cpp" alt=""/></div>
<map name="aSingleCommand_8cpp" id="aSingleCommand_8cpp">
<area shape="rect" title=" " alt="" coords="2241,5,2384,32"/>
<area shape="rect" href="DNACalib_8h.html" title=" " alt="" coords="2111,80,2252,107"/>
<area shape="rect" title=" " alt="" coords="2276,80,2348,107"/>
<area shape="rect" title=" " alt="" coords="2372,80,2428,107"/>
<area shape="rect" href="CalculateMeshLowerLODsCommand_8h.html" title=" " alt="" coords="1861,155,2057,196"/>
<area shape="rect" href="dnacalib_2types_2Aliases_8h.html" title=" " alt="" coords="2066,333,2230,360"/>
<area shape="rect" href="ClearBlendShapesCommand_8h.html" title=" " alt="" coords="499,155,704,196"/>
<area shape="rect" href="CommandSequence_8h.html" title=" " alt="" coords="2081,155,2282,196"/>
<area shape="rect" href="ConditionalCommand_8h.html" title=" " alt="" coords="2306,155,2513,196"/>
<area shape="rect" href="PruneBlendShapeTargetsCommand_8h.html" title=" " alt="" coords="729,155,938,196"/>
<area shape="rect" href="RemoveJointAnimationCommand_8h.html" title=" " alt="" coords="962,155,1150,196"/>
<area shape="rect" href="RemoveJointCommand_8h.html" title=" " alt="" coords="1174,155,1362,196"/>
<area shape="rect" href="RemoveMeshCommand_8h.html" title=" " alt="" coords="286,155,474,196"/>
<area shape="rect" href="RenameAnimatedMapCommand_8h.html" title=" " alt="" coords="3422,155,3613,196"/>
<area shape="rect" href="RenameBlendShapeCommand_8h.html" title=" " alt="" coords="4522,155,4713,196"/>
<area shape="rect" href="RenameJointCommand_8h.html" title=" " alt="" coords="72,155,262,196"/>
<area shape="rect" href="RenameMeshCommand_8h.html" title=" " alt="" coords="3637,155,3828,196"/>
<area shape="rect" href="RotateCommand_8h.html" title=" " alt="" coords="1386,155,1566,196"/>
<area shape="rect" href="ScaleCommand_8h.html" title=" " alt="" coords="1591,162,1836,189"/>
<area shape="rect" href="SetBlendShapeTargetDeltasCommand_8h.html" title=" " alt="" coords="4071,155,4274,196"/>
<area shape="rect" href="SetLODsCommand_8h.html" title=" " alt="" coords="3852,155,4047,196"/>
<area shape="rect" href="SetNeutralJointTranslationsCommand_8h.html" title=" " alt="" coords="2756,155,2959,196"/>
<area shape="rect" href="SetNeutralJointRotationsCommand_8h.html" title=" " alt="" coords="2983,155,3186,196"/>
<area shape="rect" href="SetSkinWeightsCommand_8h.html" title=" " alt="" coords="3210,155,3398,196"/>
<area shape="rect" href="SetVertexPositionsCommand_8h.html" title=" " alt="" coords="4298,155,4498,196"/>
<area shape="rect" href="TranslateCommand_8h.html" title=" " alt="" coords="2538,155,2732,196"/>
<area shape="rect" href="DNACalibDNAReader_8h.html" title=" " alt="" coords="875,251,1110,278"/>
<area shape="rect" href="Command_8h.html" title=" " alt="" coords="2338,251,2482,278"/>
<area shape="rect" href="dnacalib_2Defs_8h.html" title=" " alt="" coords="2304,333,2414,360"/>
<area shape="rect" href="DataLayer_8h.html" title=" " alt="" coords="1134,714,1251,741"/>
<area shape="rect" href="BinaryStreamReader_8h.html" title=" " alt="" coords="2059,408,2238,435"/>
<area shape="rect" href="StreamReader_8h.html" title=" " alt="" coords="1974,483,2115,509"/>
<area shape="rect" href="dna_2types_2Aliases_8h.html" title=" " alt="" coords="2202,714,2340,741"/>
<area shape="rect" href="MemoryResource_8h.html" title=" " alt="" coords="2822,803,2986,830"/>
<area shape="rect" href="ScopedPtr_8h.html" title=" " alt="" coords="2523,803,2646,830"/>
<area shape="rect" href="Status_8h.html" title=" " alt="" coords="2388,803,2498,830"/>
<area shape="rect" href="Stream_8h.html" title=" " alt="" coords="1702,885,1800,912"/>
<area shape="rect" href="FileStream_8h.html" title=" " alt="" coords="1641,803,1810,830"/>
<area shape="rect" href="MemoryMappedFileStream_8h.html" title=" " alt="" coords="1377,796,1565,837"/>
<area shape="rect" href="MemoryStream_8h.html" title=" " alt="" coords="1835,803,2030,830"/>
<area shape="rect" href="BinaryStreamWriter_8h.html" title=" " alt="" coords="1777,483,1949,509"/>
<area shape="rect" href="StreamWriter_8h.html" title=" " alt="" coords="1808,557,1942,584"/>
<area shape="rect" href="JSONStreamReader_8h.html" title=" " alt="" coords="2325,408,2500,435"/>
<area shape="rect" href="JSONStreamWriter_8h.html" title=" " alt="" coords="2190,483,2360,509"/>
<area shape="rect" href="Vector3_8h.html" title=" " alt="" coords="1371,408,1510,435"/>
<area shape="rect" href="AlignedMemoryResource_8h.html" title=" " alt="" coords="2750,707,2952,748"/>
<area shape="rect" href="ArenaMemoryResource_8h.html" title=" " alt="" coords="2532,707,2725,748"/>
<area shape="rect" href="DefaultMemoryResource_8h.html" title=" " alt="" coords="3028,707,3226,748"/>
<area shape="rect" href="dna_2Defs_8h.html" title=" " alt="" coords="1925,714,2009,741"/>
<area shape="rect" href="Reader_8h.html" title=" " alt="" coords="1360,557,1459,584"/>
<area shape="rect" href="BehaviorReader_8h.html" title=" " alt="" coords="1382,632,1568,659"/>
<area shape="rect" href="GeometryReader_8h.html" title=" " alt="" coords="1592,632,1787,659"/>
<area shape="rect" title=" " alt="" coords="1747,960,1808,987"/>
<area shape="rect" href="ArrayView_8h.html" title=" " alt="" coords="2208,885,2361,912"/>
<area shape="rect" href="StringView_8h.html" title=" " alt="" coords="2105,803,2261,830"/>
<area shape="rect" href="StatusCode_8h.html" title=" " alt="" coords="2386,885,2527,912"/>
<area shape="rect" title=" " alt="" coords="2752,960,2816,987"/>
<area shape="rect" href="pma_2Defs_8h.html" title=" " alt="" coords="2750,885,2838,912"/>
<area shape="rect" href="Writer_8h.html" title=" " alt="" coords="1811,632,1904,659"/>
<area shape="rect" href="VectorOperations_8h.html" title=" " alt="" coords="3860,244,4040,285"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SingleCommand_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:aef1bd6ad890a110b466cb0e8088507a2"><td class="memItemLeft" align="right" valign="top">static const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="SingleCommand_8cpp.html#aef1bd6ad890a110b466cb0e8088507a2">usage</a> = &quot;Usage: singlecommand.exe &lt;path-to-dna-file-to-edit&gt;\n&quot;</td></tr>
<tr class="separator:aef1bd6ad890a110b466cb0e8088507a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a3c04138a5bfe5d72780bb7e82a18e627" name="a3c04138a5bfe5d72780bb7e82a18e627"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><span class="lineno"> 10</span> {</div>
<div class="line"><span class="lineno"> 11</span> <span class="keywordflow">if</span> (argc &lt; 2) {</div>
<div class="line"><span class="lineno"> 12</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Provide input dna file!&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 13</span> std::cout &lt;&lt; <a class="code hl_variable" href="SingleCommand_8cpp.html#aef1bd6ad890a110b466cb0e8088507a2">usage</a> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 14</span> <span class="keywordflow">return</span> -1;</div>
<div class="line"><span class="lineno"> 15</span> }</div>
<div class="line"><span class="lineno"> 16</span> </div>
<div class="line"><span class="lineno"> 17</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* inputDNA = argv[1];</div>
<div class="line"><span class="lineno"> 18</span> <span class="keyword">auto</span> inStream = dnac::makeScoped&lt;dnac::FileStream&gt;(inputDNA,</div>
<div class="line"><span class="lineno"> 19</span> dnac::FileStream::AccessMode::Read,</div>
<div class="line"><span class="lineno"> 20</span> dnac::FileStream::OpenMode::Binary);</div>
<div class="line"><span class="lineno"> 21</span> <span class="keyword">auto</span> reader = dnac::makeScoped&lt;dnac::BinaryStreamReader&gt;(inStream.get());</div>
<div class="line"><span class="lineno"> 22</span> reader-&gt;read();</div>
<div class="line"><span class="lineno"> 23</span> </div>
<div class="line"><span class="lineno"> 24</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="classsc_1_1Status.html#a4569e3c01410719eaa1a95d39d59763f">dnac::Status::isOk</a>()) {</div>
<div class="line"><span class="lineno"> 25</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Could not read input DNA file!\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 26</span> <span class="keywordflow">return</span> -1;</div>
<div class="line"><span class="lineno"> 27</span> }</div>
<div class="line"><span class="lineno"> 28</span> </div>
<div class="line"><span class="lineno"> 29</span> <span class="keyword">auto</span> dnaReader = dnac::makeScoped&lt;dnac::DNACalibDNAReader&gt;(reader.get());</div>
<div class="line"><span class="lineno"> 30</span> </div>
<div class="line"><span class="lineno"> 31</span> <span class="comment">// Execute a one-off single command</span></div>
<div class="line"><span class="lineno"> 32</span> <a class="code hl_class" href="classdnac_1_1RenameBlendShapeCommand.html">dnac::RenameBlendShapeCommand</a> renameBlendShapeA(<span class="stringliteral">&quot;brow_lateral_L&quot;</span>, <span class="stringliteral">&quot;wow&quot;</span>);</div>
<div class="line"><span class="lineno"> 33</span> renameBlendShapeA.run(dnaReader.get());</div>
<div class="line"><span class="lineno"> 34</span> </div>
<div class="line"><span class="lineno"> 35</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 36</span>}</div>
<div class="ttc" id="aSingleCommand_8cpp_html_aef1bd6ad890a110b466cb0e8088507a2"><div class="ttname"><a href="SingleCommand_8cpp.html#aef1bd6ad890a110b466cb0e8088507a2">usage</a></div><div class="ttdeci">static const char * usage</div><div class="ttdef"><b>Definition:</b> SingleCommand.cpp:8</div></div>
<div class="ttc" id="aclassdnac_1_1RenameBlendShapeCommand_html"><div class="ttname"><a href="classdnac_1_1RenameBlendShapeCommand.html">dnac::RenameBlendShapeCommand</a></div><div class="ttdoc">RenameBlendShapeCommand is used to rename a blend shape channel.</div><div class="ttdef"><b>Definition:</b> RenameBlendShapeCommand.h:18</div></div>
<div class="ttc" id="aclasssc_1_1Status_html_a4569e3c01410719eaa1a95d39d59763f"><div class="ttname"><a href="classsc_1_1Status.html#a4569e3c01410719eaa1a95d39d59763f">sc::Status::isOk</a></div><div class="ttdeci">static bool isOk()</div><div class="ttdef"><b>Definition:</b> Status.cpp:13</div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="classsc_1_1Status.html#a4569e3c01410719eaa1a95d39d59763f">sc::Status::isOk()</a>, <a class="el" href="classdnac_1_1RenameBlendShapeCommand.html#a50c4e55e655fc3cb4dcffef9da5a18ef">dnac::RenameBlendShapeCommand::run()</a>, and <a class="el" href="SingleCommand_8cpp.html#aef1bd6ad890a110b466cb0e8088507a2">usage</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="aef1bd6ad890a110b466cb0e8088507a2" name="aef1bd6ad890a110b466cb0e8088507a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef1bd6ad890a110b466cb0e8088507a2">&#9670;&nbsp;</a></span>usage</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const char* usage = &quot;Usage: singlecommand.exe &lt;path-to-dna-file-to-edit&gt;\n&quot;</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="reference">Referenced by <a class="el" href="SingleCommand_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>