classvtmaterialarraybase.html

来自「VC下实现图像处理。 VC下实现图像处理。 VC下实现图像处理。」· HTML 代码 · 共 549 行 · 第 1/3 页

HTML
549
字号
<!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: vtMaterialArrayBase 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>vtMaterialArrayBase Class Reference<br><small>[<a class="el" href="group__sg.html">Scene Graph</a>]</small></h1><!-- doxytag: class="vtMaterialArrayBase" --><!-- doxytag: inherits="vtArray&lt; vtMaterial * &gt;" -->Inheritance diagram for vtMaterialArrayBase:<p><center><img src="classvtMaterialArrayBase__inherit__graph.png" border="0" usemap="#vtMaterialArrayBase__inherit__map" alt="Inheritance graph"></center><map name="vtMaterialArrayBase__inherit__map"><area href="classvtMaterialArray.html" shape="rect" coords="30,156,142,183" alt=""><area doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtArray.html" shape="rect" coords="7,7,164,33" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classvtMaterialArrayBase-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>Contains an array of materials. Provides useful methods for creating material easily. This is the base class for <a class="el" href="classvtMaterialArray.html">vtMaterialArray</a>, and provides most of the functionality for that class. <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">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMaterialArrayBase.html#f2b01fcd911a7b074b67a3844024ba27">AddTextureMaterial</a> (class <a class="el" href="classvtImage.html">vtImage</a> *pImage, bool bCulling, bool bLighting, bool bTransp=false, bool bAdditive=false, float fAmbient=0.0f, float fDiffuse=1.0f, float fAlpha=1.0f, float fEmissive=0.0f, bool bTexGen=false, bool bClamp=false, bool bMipMap=false)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMaterialArrayBase.html#9823ae4863fc9c4a5bac1813cc77796b">AddTextureMaterial2</a> (const char *fname, bool bCulling, bool bLighting, bool bTransp=false, bool bAdditive=false, float fAmbient=0.0f, float fDiffuse=1.0f, float fAlpha=1.0f, float fEmissive=0.0f, bool bTexGen=false, bool bClamp=false, bool bMipMap=false)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMaterialArrayBase.html#b4432f21e6905ce5c4809ef4079fe443">AddRGBMaterial</a> (const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classRGBf.html">RGBf</a> &amp;diffuse, const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classRGBf.html">RGBf</a> &amp;ambient, bool bCulling=true, bool bLighting=true, bool bWireframe=false, float fAlpha=1.0f, float fEmissive=0.0f)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMaterialArrayBase.html#2167451f2b5572d27ef145e552996c69">AddRGBMaterial1</a> (const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classRGBf.html">RGBf</a> &amp;diffuse, bool bCulling=true, bool bLighting=true, bool bWireframe=false, float fAlpha=1.0f, float fEmissive=0.0f)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMaterialArrayBase.html#83457388f265b8bfe4b6c2d6a2ff668b">AddShadowMaterial</a> (float fOpacity)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMaterialArrayBase.html#37dbbdf51042b843b240c1e9b2f1e39e">FindByDiffuse</a> (const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classRGBAf.html">RGBAf</a> &amp;rgba) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMaterialArrayBase.html#5f9400f909771062e8d4bedceb42956d">FindByImage</a> (const <a class="el" href="classvtImage.html">vtImage</a> *image) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvtMaterialArrayBase.html#4522320650d8b727abe1e44e8dcd4ec8">CopyFrom</a> (<a class="el" href="classvtMaterialArrayBase.html">vtMaterialArrayBase</a> *pFromMats)</td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="b4432f21e6905ce5c4809ef4079fe443"></a><!-- doxytag: member="vtMaterialArrayBase::AddRGBMaterial" ref="b4432f21e6905ce5c4809ef4079fe443" args="(const RGBf &amp;diffuse, const RGBf &amp;ambient, bool bCulling=true, bool bLighting=true, bool bWireframe=false, float fAlpha=1.0f, float fEmissive=0.0f)" --><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">int vtMaterialArrayBase::AddRGBMaterial           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classRGBf.html">RGBf</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>diffuse</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classRGBf.html">RGBf</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>ambient</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>bCulling</em> = <code>true</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>bLighting</em> = <code>true</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>bWireframe</em> = <code>false</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>float&nbsp;</td>          <td class="mdname" nowrap> <em>fAlpha</em> = <code>1.0f</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>float&nbsp;</td>          <td class="mdname" nowrap> <em>fEmissive</em> = <code>0.0f</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>Create and add a simple colored material. This method takes diffuse and ambient color and let you control several other aspects of the material.<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>diffuse</em>&nbsp;</td><td>The Diffuse color component of the material.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>ambient</em>&nbsp;</td><td>The Ambient color component of the material.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>bCulling</em>&nbsp;</td><td>true to cull backfaces (only the front side of each polygon is rendered.)</td></tr>    <tr><td valign="top"></td><td valign="top"><em>bLighting</em>&nbsp;</td><td>true to "light" the material. This means it will use the material's color values, and any active lights to determine the color of the drawn geometry. If false, then only the material's diffuse color is used, and it is not affected by any lights.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>bWireframe</em>&nbsp;</td><td>True for a material which will render only the edges of polygons.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>fAlpha</em>&nbsp;</td><td>Alpha value (opacity), ranges from 0 (completely transparent) to 1 (opaque). Default is 1. If transparency is not enabled, this value is ignored.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>fEmissive</em>&nbsp;</td><td>Emmisive material value, ranges from 0 to 1 (default 0). If lighting is enabled, this value is added to the combined effect of each existing light. This is useful for geometry which is brighter than the existing light level, such as illuminated objects at night.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The index of the added material. </dd></dl>    </td>  </tr></table><a class="anchor" name="2167451f2b5572d27ef145e552996c69"></a><!-- doxytag: member="vtMaterialArrayBase::AddRGBMaterial1" ref="2167451f2b5572d27ef145e552996c69" args="(const RGBf &amp;diffuse, bool bCulling=true, bool bLighting=true, bool bWireframe=false, float fAlpha=1.0f, float fEmissive=0.0f)" --><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">int vtMaterialArrayBase::AddRGBMaterial1           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classRGBf.html">RGBf</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>diffuse</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>bCulling</em> = <code>true</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>bLighting</em> = <code>true</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>bWireframe</em> = <code>false</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>float&nbsp;</td>          <td class="mdname" nowrap> <em>fAlpha</em> = <code>1.0f</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>float&nbsp;</td>          <td class="mdname" nowrap> <em>fEmissive</em> = <code>0.0f</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">

⌨️ 快捷键说明

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