📄 appearance.html
字号:
<A NAME="Appearance()"><!-- --></A><H3>
Appearance</H3>
<PRE>
public <B>Appearance</B>()</PRE>
<DL>
<DD><p>Constructs an Appearance object with default values. The default values are:</p> <ul> <li>rendering layer : 0</li> <li>polygon mode : null (use defaults)</li> <li>compositing mode : null (use defaults)</li> <li>all textures : null (all texturing units disabled)</li> <li>material : null (lighting disabled)</li> <li>fog : null (fogging disabled)</li> </ul>
<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="setLayer(int)"><!-- --></A><H3>
setLayer</H3>
<PRE>
public void <B>setLayer</B>(int layer)</PRE>
<DL>
<DD><p>Sets the rendering layer for this Appearance. When rendering a World, Group or Mesh, submeshes and sprites are guaranteed to be rendered in the order of ascending layers. That is, <i>all</i> submeshes and sprites with an appearance at a lower layer are rendered prior to <i>any</i> submeshes or sprites at the higher layers. Furthermore, <i>all</i> opaque submeshes and sprites at a specific layer are rendered prior to <i>any</i> blended submeshes or sprites at the same layer. A submesh or a sprite is defined to be opaque if it uses the <code>REPLACE</code> blending mode (see CompositingMode), and blended otherwise.</p> <p>Implementations are free to do any additional state sorting as long as the aforementioned constraints are met. To allow implementations to operate as efficiently as possible, applications should only use layering constraints when required. As a result of the rules above, the default layer of zero should be sufficient for most uses. Cases where non-zero layers may be useful include background geometry, sky boxes, lens flares, halos, and other special effects.</p> <p>Note that the rendering layer has no effect on picking.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>layer</CODE> - the rendering layer for submeshes and sprites having this Appearance<DT><B>Throws:</B><DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - if <code>layer</code> is not in [-63, 63]<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#getLayer()"><CODE>getLayer</CODE></A>, <A HREF="../../../javax/microedition/m3g/Mesh.html"><CODE>Mesh</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getLayer()"><!-- --></A><H3>
getLayer</H3>
<PRE>
public int <B>getLayer</B>()</PRE>
<DL>
<DD><p>Gets the current rendering layer for this Appearance.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current rendering layer; this is always in the range [-63, 63]<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#setLayer(int)"><CODE>setLayer</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setFog(javax.microedition.m3g.Fog)"><!-- --></A><H3>
setFog</H3>
<PRE>
public void <B>setFog</B>(<A HREF="../../../javax/microedition/m3g/Fog.html">Fog</A> fog)</PRE>
<DL>
<DD><p>Sets the fogging attributes to use for this Appearance. If the Fog object is set to null, fogging is disabled.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fog</CODE> - a Fog object, or null to disable fogging<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#getFog()"><CODE>getFog</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFog()"><!-- --></A><H3>
getFog</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/Fog.html">Fog</A> <B>getFog</B>()</PRE>
<DL>
<DD><p>Returns the current fogging attributes for this Appearance.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current Fog object, or null if fogging is disabled<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#setFog(javax.microedition.m3g.Fog)"><CODE>setFog</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setPolygonMode(javax.microedition.m3g.PolygonMode)"><!-- --></A><H3>
setPolygonMode</H3>
<PRE>
public void <B>setPolygonMode</B>(<A HREF="../../../javax/microedition/m3g/PolygonMode.html">PolygonMode</A> polygonMode)</PRE>
<DL>
<DD><p>Sets the PolygonMode to use for this Appearance. If the PolygonMode is set to null, the default values are used.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>polygonMode</CODE> - a PolygonMode object, or null to use the defaults<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#getPolygonMode()"><CODE>getPolygonMode</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getPolygonMode()"><!-- --></A><H3>
getPolygonMode</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/PolygonMode.html">PolygonMode</A> <B>getPolygonMode</B>()</PRE>
<DL>
<DD><p>Returns the current PolygonMode for this Appearance.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current PolygonMode object, or null if no PolygonMode is set<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#setPolygonMode(javax.microedition.m3g.PolygonMode)"><CODE>setPolygonMode</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setCompositingMode(javax.microedition.m3g.CompositingMode)"><!-- --></A><H3>
setCompositingMode</H3>
<PRE>
public void <B>setCompositingMode</B>(<A HREF="../../../javax/microedition/m3g/CompositingMode.html">CompositingMode</A> compositingMode)</PRE>
<DL>
<DD><p>Sets the CompositingMode to use for this Appearance. If the CompositingMode is set to null, the default values are used.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>compositingMode</CODE> - a CompositingMode object, or null to use the defaults<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#getCompositingMode()"><CODE>getCompositingMode</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getCompositingMode()"><!-- --></A><H3>
getCompositingMode</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/CompositingMode.html">CompositingMode</A> <B>getCompositingMode</B>()</PRE>
<DL>
<DD><p>Returns the current CompositingMode for this Appearance.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current CompositingMode object, or null if no CompositingMode is set<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#setCompositingMode(javax.microedition.m3g.CompositingMode)"><CODE>setCompositingMode</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setTexture(int, javax.microedition.m3g.Texture2D)"><!-- --></A><H3>
setTexture</H3>
<PRE>
public void <B>setTexture</B>(int index, <A HREF="../../../javax/microedition/m3g/Texture2D.html">Texture2D</A> texture)</PRE>
<DL>
<DD><p>Sets the texture image and its attributes for the given texturing unit. If the texture object is set to null, the specified texturing unit is disabled.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - texturing unit index<DD><CODE>texture</CODE> - a texture object for the specified texturing unit, or null to disable the unit<DT><B>Throws:</B><DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - if <code>index</code> is not a valid texturing unit index<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#getTexture(int)"><CODE>getTexture</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getTexture(int)"><!-- --></A><H3>
getTexture</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/Texture2D.html">Texture2D</A> <B>getTexture</B>(int index)</PRE>
<DL>
<DD><p>Retrieves the current texture image and its attributes for the given texturing unit.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - texturing unit index<DT><B>Returns:</B><DD>the current texture object of the specified texturing unit, or null if the unit is disabled<DT><B>Throws:</B><DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - if <code>index</code> is not a valid texturing unit index<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#setTexture(int, javax.microedition.m3g.Texture2D)"><CODE>setTexture</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setMaterial(javax.microedition.m3g.Material)"><!-- --></A><H3>
setMaterial</H3>
<PRE>
public void <B>setMaterial</B>(<A HREF="../../../javax/microedition/m3g/Material.html">Material</A> material)</PRE>
<DL>
<DD><p>Sets the Material to use when lighting this Appearance. If the Material is set to null, lighting is disabled. See the Material class description for more information.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>material</CODE> - a Material object, or null to disable lighting<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#getMaterial()"><CODE>getMaterial</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getMaterial()"><!-- --></A><H3>
getMaterial</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/Material.html">Material</A> <B>getMaterial</B>()</PRE>
<DL>
<DD><p>Returns the current Material for this Appearance.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current Material object, or null if lighting is disabled<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Appearance.html#setMaterial(javax.microedition.m3g.Material)"><CODE>setMaterial</CODE></A></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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Appearance.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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">
<A HREF="../../../javax/microedition/m3g/AnimationTrack.html"><B>PREV CLASS</B></A>
<A HREF="../../../javax/microedition/m3g/Background.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>
<A HREF="Appearance.html" TARGET="_top"><B>NO FRAMES</B></A>
<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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<EM>Copyright © 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 + -