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

📄 light.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
         listed above<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#setMode(int)"><CODE>setMode</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setIntensity(float)"><!-- --></A><H3>
setIntensity</H3>
<PRE>
public void <B>setIntensity</B>(float&nbsp;intensity)</PRE>
<DL>
<DD><p>Sets the intensity of this Light. The RGB color of this Light is multiplied component-wise with the intensity before computing the lighting equation. See the class description for more information. </p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>intensity</CODE> - the intensity to set; may be negative or zero<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#getIntensity()"><CODE>getIntensity</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getIntensity()"><!-- --></A><H3>
getIntensity</H3>
<PRE>
public float <B>getIntensity</B>()</PRE>
<DL>
<DD><p>Retrieves the current intensity of this Light.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current intensity of this Light<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#setIntensity(float)"><CODE>setIntensity</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setColor(int)"><!-- --></A><H3>
setColor</H3>
<PRE>
public void <B>setColor</B>(int&nbsp;RGB)</PRE>
<DL>
<DD><p>Sets the color of this Light. Depending on the type of light, this represents either the ambient color or both the diffuse and specular colors. See the class description for more information. The high order byte of the color value (that is, the alpha component) is ignored.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>RGB</CODE> - the color to set for this Light in 0x00RRGGBB format<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#getColor()"><CODE>getColor</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getColor()"><!-- --></A><H3>
getColor</H3>
<PRE>
public int <B>getColor</B>()</PRE>
<DL>
<DD><p>Retrieves the current color of this Light. The high order byte of the color value (that is, the alpha component) is guaranteed to be zero.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current color of this Light in 0x00RRGGBB format<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#setColor(int)"><CODE>setColor</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setSpotAngle(float)"><!-- --></A><H3>
setSpotAngle</H3>
<PRE>
public void <B>setSpotAngle</B>(float&nbsp;angle)</PRE>
<DL>
<DD><p>Sets the spot cone angle for this Light. The effect of this Light is restricted to a cone of <code>angle</code> degrees around the negative Z axis of the Light.</p> <p>Note that this setting has no effect unless the type of this Light is (or is later set to) <code>SPOT</code>.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>angle</CODE> - the spot angle to set, in degrees<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>angle</code> is not in [0, 90]<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#getSpotAngle()"><CODE>getSpotAngle</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getSpotAngle()"><!-- --></A><H3>
getSpotAngle</H3>
<PRE>
public float <B>getSpotAngle</B>()</PRE>
<DL>
<DD><p>Retrieves the current spot angle of this Light.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current spot angle of this Light<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#setSpotAngle(float)"><CODE>setSpotAngle</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setSpotExponent(float)"><!-- --></A><H3>
setSpotExponent</H3>
<PRE>
public void <B>setSpotExponent</B>(float&nbsp;exponent)</PRE>
<DL>
<DD><p>Sets the spot exponent for this Light. The spot exponent controls the distribution of the intensity of this Light within the spot cone, such that larger values yield a more concentrated cone. The default spot exponent is 0.0, resulting in a uniform light distribution.</p> <p>Note that this setting has no effect unless the type of this Light is (or is later set to) <code>SPOT</code>.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>exponent</CODE> - the spot light exponent to set<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>exponent</code> is not         in [0, 128]<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#getSpotExponent()"><CODE>getSpotExponent</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getSpotExponent()"><!-- --></A><H3>
getSpotExponent</H3>
<PRE>
public float <B>getSpotExponent</B>()</PRE>
<DL>
<DD><p>Retrieves the current spot exponent for this Light.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current spot exponent of this Light<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#setSpotExponent(float)"><CODE>setSpotExponent</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setAttenuation(float, float, float)"><!-- --></A><H3>
setAttenuation</H3>
<PRE>
public void <B>setAttenuation</B>(float&nbsp;constant,                           float&nbsp;linear,                           float&nbsp;quadratic)</PRE>
<DL>
<DD><p>Sets the attenuation coefficients for this Light. The attenuation factor is <blockquote> 1 / (c + l d + q d<sup>2</sup>) </blockquote>  where d is the distance between the light and the vertex being lighted, and c, l, q are the constant, linear, and quadratic coefficients. The default attenuation coefficients are (1, 0, 0), resulting in no attenuation.</p> <p>Note that this setting has no effect unless the type of this Light is (or is later set to) <code>OMNI</code> or <code>SPOT</code>.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>constant</CODE> - the constant attenuation coefficient to set<DD><CODE>linear</CODE> - the linear attenuation coefficient to set<DD><CODE>quadratic</CODE> - the quadratic attenuation coefficient to set<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if any of the parameter values are         negative<DD><CODE>java.lang.IllegalArgumentException</CODE> - if all of the parameter values are         zero</DL>
</DD>
</DL>
<HR>

<A NAME="getConstantAttenuation()"><!-- --></A><H3>
getConstantAttenuation</H3>
<PRE>
public float <B>getConstantAttenuation</B>()</PRE>
<DL>
<DD><p>Retrieves the current constant attenuation coefficient for this Light.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current constant attenuation coefficient<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#setAttenuation(float, float, float)"><CODE>setAttenuation</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getLinearAttenuation()"><!-- --></A><H3>
getLinearAttenuation</H3>
<PRE>
public float <B>getLinearAttenuation</B>()</PRE>
<DL>
<DD><p>Retrieves the current linear attenuation coefficient for this Light.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current linear attenuation coefficient<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#setAttenuation(float, float, float)"><CODE>setAttenuation</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getQuadraticAttenuation()"><!-- --></A><H3>
getQuadraticAttenuation</H3>
<PRE>
public float <B>getQuadraticAttenuation</B>()</PRE>
<DL>
<DD><p>Retrieves the current quadratic attenuation coefficient for this Light.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current quadratic attenuation coefficient<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Light.html#setAttenuation(float, float, float)"><CODE>setAttenuation</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>&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/Light.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/KeyframeSequence.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/m3g/Loader.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="Light.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 + -