⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 material.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 2 页
字号:
 
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="AMBIENT"><!-- --></A><H3>
AMBIENT</H3>
<PRE>
public static final int <B>AMBIENT</B></PRE>
<DL>
<DD><p>A parameter to <code>setColor</code> and <code>getColor</code>, specifying that the ambient color component is to be set or retrieved.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Material.AMBIENT">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="DIFFUSE"><!-- --></A><H3>
DIFFUSE</H3>
<PRE>
public static final int <B>DIFFUSE</B></PRE>
<DL>
<DD><p>A parameter to <code>setColor</code> and <code>getColor</code>, specifying that the diffuse color component is to be set or retrieved.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Material.DIFFUSE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="EMISSIVE"><!-- --></A><H3>
EMISSIVE</H3>
<PRE>
public static final int <B>EMISSIVE</B></PRE>
<DL>
<DD><p>A parameter to <code>setColor</code> and <code>getColor</code>, specifying that the emissive color component is to be set or retrieved.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Material.EMISSIVE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="SPECULAR"><!-- --></A><H3>
SPECULAR</H3>
<PRE>
public static final int <B>SPECULAR</B></PRE>
<DL>
<DD><p>A parameter to <code>setColor</code> and <code>getColor</code>, specifying that the specular color component is to be set or retrieved.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.m3g.Material.SPECULAR">Constant Field Values</A></DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Material()"><!-- --></A><H3>
Material</H3>
<PRE>
public <B>Material</B>()</PRE>
<DL>
<DD><p>Creates a Material object with default values. The default values are:</p>  <ul> <li>vertex color tracking : <i>false</i> (disabled)</li> <li>ambient color : 0x00333333 (0.2, 0.2, 0.2, 0.0)</li> <li>diffuse color : 0xFFCCCCCC (0.8, 0.8, 0.8, 1.0)</li> <li>emissive color : 0x00000000 (0.0, 0.0, 0.0, 0.0)</li> <li>specular color : 0x00000000 (0.0, 0.0, 0.0, 0.0)</li> <li>shininess : 0.0</li> </ul> <p>Note that even though the alpha component can be set for all color components, it is ignored for all but the diffuse component.</p>
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="setColor(int, int)"><!-- --></A><H3>
setColor</H3>
<PRE>
public void <B>setColor</B>(int&nbsp;target,                     int&nbsp;ARGB)</PRE>
<DL>
<DD><p>Sets the given value to the specified color component(s) of this Material. The color components to set are specified as an inclusive OR of one or more of the symbolic constants listed above. The color is given in ARGB format, but the alpha component is ignored for all but the diffuse color.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - a bitmask of color component identifiers<DD><CODE>ARGB</CODE> - color for the target property (or properties)        in 0xAARRGGBB format<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>target</code> has a value         other than an inclusive OR of one or more of <code>AMBIENT,         DIFFUSE, EMISSIVE, SPECULAR</code><DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Material.html#getColor(int)"><CODE>getColor</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getColor(int)"><!-- --></A><H3>
getColor</H3>
<PRE>
public int <B>getColor</B>(int&nbsp;target)</PRE>
<DL>
<DD><p>Gets the value of the specified color component of this Material. The alpha component of the returned value is guaranteed to be zero for all but the diffuse color component.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - exactly one of <code>AMBIENT, DIFFUSE, EMISSIVE,        SPECULAR</code><DT><B>Returns:</B><DD>the current color of the target property in 0xAARRGGBB format<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>target</code> has a value         other than one of those listed above<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Material.html#setColor(int, int)"><CODE>setColor</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setShininess(float)"><!-- --></A><H3>
setShininess</H3>
<PRE>
public void <B>setShininess</B>(float&nbsp;shininess)</PRE>
<DL>
<DD><p>Sets the shininess of this Material. Shininess is the specular exponent term in the lighting equation, and it can take on values between [0, 128]. Large values of shininess make the specular highlights more concentrated, and small values make them more spread out.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>shininess</CODE> - the specular exponent value to set for this Material<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>shininess</code> is not         in [0, 128]<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Material.html#getShininess()"><CODE>getShininess</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getShininess()"><!-- --></A><H3>
getShininess</H3>
<PRE>
public float <B>getShininess</B>()</PRE>
<DL>
<DD><p>Gets the current shininess of this Material.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current specular exponent value of this Material<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Material.html#setShininess(float)"><CODE>setShininess</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setVertexColorTrackingEnable(boolean)"><!-- --></A><H3>
setVertexColorTrackingEnable</H3>
<PRE>
public void <B>setVertexColorTrackingEnable</B>(boolean&nbsp;enable)</PRE>
<DL>
<DD><p>Enables or disables vertex color tracking. When enabled, the <code>AMBIENT</code> and <code>DIFFUSE</code> material colors will take on color values from the associated VertexBuffer on a per-vertex basis. The ambient and diffuse color values of this Material are ignored in that case.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>enable</CODE> - <i>true</i> to turn vertex color tracking on;        <i>false</i> to turn it off</DL>
</DD>
</DL>
<HR>

<A NAME="isVertexColorTrackingEnabled()"><!-- --></A><H3>
isVertexColorTrackingEnabled</H3>
<PRE>
public boolean <B>isVertexColorTrackingEnabled</B>()</PRE>
<DL>
<DD><p>Queries whether vertex color tracking is enabled.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD><i>true</i> if vertex color tracking is enabled;         <i>false</i> if it's disabled</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Material.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<EM><B>Nov 19, 2003</B></EM></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/m3g/Loader.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/m3g/Mesh.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Material.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT>  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT><A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<EM>Copyright &copy 2003 Nokia Corporation. See the <a href="../../../overview-summary.html#Copyright">Copyright Notice</a> for details.</EM>
</BODY>
</HTML>

⌨️ 快捷键说明

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