classvtmaterialarraybase.html

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

HTML
549
字号
  <tr>    <td>      &nbsp;    </td>    <td><p>Create and add a simple colored material. This method takes diffuse color and let you control several other aspects of the material. Ambient color will be assumed to a be a dimmer shade of the supplied diffuse color (diffuse / 4).<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>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="83457388f265b8bfe4b6c2d6a2ff668b"></a><!-- doxytag: member="vtMaterialArrayBase::AddShadowMaterial" ref="83457388f265b8bfe4b6c2d6a2ff668b" args="(float fOpacity)" --><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 vtMaterialArrayBase::AddShadowMaterial           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">float&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>fOpacity</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>Create and add a "shadow" material, which is a black material with transparency, suitable for drawing a shadow under an object.<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>fOpacity</em>&nbsp;</td><td>Ranges from 0 (fully transparent) to 1 (fully opaque). </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="f2b01fcd911a7b074b67a3844024ba27"></a><!-- doxytag: member="vtMaterialArrayBase::AddTextureMaterial" ref="f2b01fcd911a7b074b67a3844024ba27" args="(class vtImage *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)" --><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::AddTextureMaterial           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">class <a class="el" href="classvtImage.html">vtImage</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>pImage</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>, </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>, </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>bTransp</em> = <code>false</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>bAdditive</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>fAmbient</em> = <code>0.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>fDiffuse</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>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" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>bTexGen</em> = <code>false</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>bClamp</em> = <code>false</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>bMipMap</em> = <code>false</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 textured material. This method takes a <a class="el" href="classvtImage.html">vtImage</a> and let you control many other aspects of the material. Only the first three parameters are required, the rest will be assumed with default values if desired.<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>pImage</em>&nbsp;</td><td>A valid image (bitmap) which you have created.</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>bTransp</em>&nbsp;</td><td>true for a material with some transparency (default is false).</td></tr>    <tr><td valign="top"></td><td valign="top"><em>bAdditive</em>&nbsp;</td><td>true for an additive material (default is false). This means that the rendered color will be added to, rather than replace, the rendering surface. This is useful for some effects such as drawing stars against a twilight sky, in which the light of a dim star should be added to the background sky.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>fAmbient</em>&nbsp;</td><td>Ambient material value, ranges from 0 to 1 (default 0). If lighting is enabled, this determines how this material is affected by the Ambient component of each existing light.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>fDiffuse</em>&nbsp;</td><td>Diffuse material value, ranges from 0 to 1 (default 1). If lighting is enabled, this determines how this material is affected by the Diffuse component of each existing light. If lighting is not enabled, this indicates the exact lighting value to use for the material.</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>    <tr><td valign="top"></td><td valign="top"><em>bTexGen</em>&nbsp;</td><td>true for materials whose texture mapping will be generated automatically. false if you will provide explicit UV values to drape your texture. Default is false.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>bClamp</em>&nbsp;</td><td>true for Texture Clamping, which prevents sub-texel interpolation at the edge of the texture. Default is false.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>bMipMap</em>&nbsp;</td><td>true for Mip-mapping, which provided smoother interpolation of the textured geometry when it is under-sampled (generally when it is in the distance.) Useful for avoiding unpleasant aliasing artifacts, but costs 1/3 more texture memory.</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="9823ae4863fc9c4a5bac1813cc77796b"></a><!-- doxytag: member="vtMaterialArrayBase::AddTextureMaterial2" ref="9823ae4863fc9c4a5bac1813cc77796b" args="(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)" --><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::AddTextureMaterial2           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname" nowrap> <em>fname</em>, </td>        </tr>        <tr>

⌨️ 快捷键说明

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