classvtmeshfactory.html

来自「VC下实现图像处理。 VC下实现图像处理。 VC下实现图像处理。」· HTML 代码 · 共 246 行

HTML
246
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>vtlib library: vtMeshFactory Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.5 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="modules.html"><span>Modules</span></a></li>    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>    <li><a href="dirs.html"><span>Directories</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>  </ul></div><h1>vtMeshFactory Class Reference<br><small>[<a class="el" href="group__sg.html">Scene Graph</a>]</small></h1><!-- doxytag: class="vtMeshFactory" --><a href="classvtMeshFactory-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>The vtMeshFactory class makes it easy to create meshes with a lot of vertices. You simply provide vertices, and it will create as many meshes as necessary to contain them all.<p><dl compact><dt><b>Example:</b></dt><dd>This example produces a line strip with 10000 vertices. The factory is told to limit the number of vertices in a single primitive to 3000, so it will automatically produce four meshes with 3000, 3000, 3000, and 1000 vertices each. The meshes are automatically added to the indicated geometry node. <div class="fragment"><pre class="fragment">    {        <a class="code" href="classvtGeom.html">vtGeom</a> *pLineGeom = <span class="keyword">new</span> <a class="code" href="classvtGeom.html">vtGeom</a>;        <a class="code" href="classvtMeshFactory.html">vtMeshFactory</a> mf(pLineGeom, vtMesh::LINE_STRIP, 0, 3000, 1);        mf.PrimStart();        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 10000; i++)            mf.AddVertex(<a class="codeRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFPoint3.html">FPoint3</a>(i,i,i));        mf.PrimEnd();    }</pre></div> </dd></dl><p><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMeshFactory.html#ad29b7049512119a31cfd1f53ec5184e">vtMeshFactory</a> (<a class="el" href="classvtGeom.html">vtGeom</a> *pGeom, vtMeshBase::PrimType ePrimType, int iVertType, int iMaxVertsPerMesh, int iMatIndex, int iExpectedVerts=-1)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMeshFactory.html#37610f100693136e854b211c9d432537">vtMeshFactory</a> (<a class="el" href="classvtMesh.html">vtMesh</a> *pMesh)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMeshFactory.html#32e57b1f3b786fde173c9e1eb0f067cd">PrimStart</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMeshFactory.html#e0c31db5eecfd4f7c44245974a3dac32">AddVertex</a> (const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFPoint3.html">FPoint3</a> &amp;p)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMeshFactory.html#05e4d953a9e7250a45617bc7b3b8a77f">PrimEnd</a> ()</td></tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="ad29b7049512119a31cfd1f53ec5184e"></a><!-- doxytag: member="vtMeshFactory::vtMeshFactory" ref="ad29b7049512119a31cfd1f53ec5184e" args="(vtGeom *pGeom, vtMeshBase::PrimType ePrimType, int iVertType, int iMaxVertsPerMesh, int iMatIndex, int iExpectedVerts=-1)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">vtMeshFactory::vtMeshFactory           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classvtGeom.html">vtGeom</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>pGeom</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>vtMeshBase::PrimType&nbsp;</td>          <td class="mdname" nowrap> <em>ePrimType</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iVertType</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iMaxVertsPerMesh</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iMatIndex</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>iExpectedVerts</em> = <code>-1</code></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Constructor.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pGeom</em>&nbsp;</td><td>The geometry node which will receive the mesh object(s) that this factory will produce. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ePrimType</em>&nbsp;</td><td>The type of mesh to produce. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>iVertType</em>&nbsp;</td><td>The vertex attributes for the meshes to produce. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>iMaxVertsPerMesh</em>&nbsp;</td><td>The largest number of vertices to allow in a single mesh. When this number is exceeded, the current mesh will be finished and another mesh begun. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>iMatIndex</em>&nbsp;</td><td>The material index of the mesh when it is added to the geometry node. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>iExpectedVerts</em>&nbsp;</td><td>If you know how many vertices will be mesh ahead of time, you can save a little time and memory by passing the number. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="37610f100693136e854b211c9d432537"></a><!-- doxytag: member="vtMeshFactory::vtMeshFactory" ref="37610f100693136e854b211c9d432537" args="(vtMesh *pMesh)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">vtMeshFactory::vtMeshFactory           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classvtMesh.html">vtMesh</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>pMesh</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Alternate, simpler constructor.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pMesh</em>&nbsp;</td><td>The mesh which will receive all the vertices that this factory produces. </td></tr>  </table></dl>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="e0c31db5eecfd4f7c44245974a3dac32"></a><!-- doxytag: member="vtMeshFactory::AddVertex" ref="e0c31db5eecfd4f7c44245974a3dac32" args="(const FPoint3 &amp;p)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void vtMeshFactory::AddVertex           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFPoint3.html">FPoint3</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Tell the factory to add a vertex to the current primitive.     </td>  </tr></table><a class="anchor" name="05e4d953a9e7250a45617bc7b3b8a77f"></a><!-- doxytag: member="vtMeshFactory::PrimEnd" ref="05e4d953a9e7250a45617bc7b3b8a77f" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void vtMeshFactory::PrimEnd           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Tell the factory to end a primitive.     </td>  </tr></table><a class="anchor" name="32e57b1f3b786fde173c9e1eb0f067cd"></a><!-- doxytag: member="vtMeshFactory::PrimStart" ref="32e57b1f3b786fde173c9e1eb0f067cd" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void vtMeshFactory::PrimStart           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Tell the factory to start a primitive.     </td>  </tr></table><hr size="1"><address style="align: right;"><small>Generated on Mon Jan 14 14:41:01 2008 for vtlib library by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?