📄 material.html
字号:
<HR><A NAME="setSpecularColor(javax.vecmath.Color3f)"><!-- --></A><H3>setSpecularColor</H3><PRE>public void <B>setSpecularColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A> color)</PRE><DL><DD>Sets this material's specular color. This is the specular highlight color of the material. The specular color in this Material object may be overridden by per-vertex colors in some cases. If vertex colors are present in the geometry, and lighting is enabled, and the colorTarget is SPECULAR, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's specular color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the new specular color<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/RenderingAttributes.html#setIgnoreVertexColors(boolean)"><CODE>RenderingAttributes.setIgnoreVertexColors(boolean)</CODE></A>, <A HREF="../../../javax/media/j3d/Material.html#setColorTarget(int)"><CODE>setColorTarget(int)</CODE></A></DL></DD></DL><HR><A NAME="setSpecularColor(float, float, float)"><!-- --></A><H3>setSpecularColor</H3><PRE>public void <B>setSpecularColor</B>(float r, float g, float b)</PRE><DL><DD>Sets this material's specular color. This is the specular highlight color of the material. The specular color in this Material object may be overridden by per-vertex colors in some cases. If vertex colors are present in the geometry, and lighting is enabled, and the colorTarget is SPECULAR, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's specular color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the new specular color's red component<DD><CODE>g</CODE> - the new specular color's green component<DD><CODE>b</CODE> - the new specular color's blue component<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/RenderingAttributes.html#setIgnoreVertexColors(boolean)"><CODE>RenderingAttributes.setIgnoreVertexColors(boolean)</CODE></A>, <A HREF="../../../javax/media/j3d/Material.html#setColorTarget(int)"><CODE>setColorTarget(int)</CODE></A></DL></DD></DL><HR><A NAME="getSpecularColor(javax.vecmath.Color3f)"><!-- --></A><H3>getSpecularColor</H3><PRE>public void <B>getSpecularColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A> color)</PRE><DL><DD>Retrieves this material's specular color.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the vector that will receive this material's specular color<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setShininess(float)"><!-- --></A><H3>setShininess</H3><PRE>public void <B>setShininess</B>(float shininess)</PRE><DL><DD>Sets this material's shininess. This specifies a material specular scattering exponent, or shininess. It takes a floating point number in the range [1.0, 128.0] with 1.0 being not shiny and 128.0 being very shiny. Values outside this range are clamped.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>shininess</CODE> - the material's shininess<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="getShininess()"><!-- --></A><H3>getShininess</H3><PRE>public float <B>getShininess</B>()</PRE><DL><DD>Retrieves this material's shininess.<P><DD><DL><DT><B>Returns:</B><DD>the material's shininess<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setLightingEnable(boolean)"><!-- --></A><H3>setLightingEnable</H3><PRE>public void <B>setLightingEnable</B>(boolean state)</PRE><DL><DD>Enables or disables lighting for this appearance component object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>state</CODE> - true or false to enable or disable lighting<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="getLightingEnable()"><!-- --></A><H3>getLightingEnable</H3><PRE>public boolean <B>getLightingEnable</B>()</PRE><DL><DD>Retrieves the state of the lighting enable flag.<P><DD><DL><DT><B>Returns:</B><DD>true if lighting is enabled, false if lighting is disabled<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setColorTarget(int)"><!-- --></A><H3>setColorTarget</H3><PRE>public void <B>setColorTarget</B>(int colorTarget)</PRE><DL><DD>Sets the color target for per-vertex colors. When lighting is enabled and per-vertex colors are present (and not ignored) in the geometry for a given Shape3D node, those per-vertex colors are used in place of the specified material color(s) for this Material object. The color target is ignored when lighting is disabled or when per-vertex colors are not used. The ColorInterpolator behavior also uses the color target to determine which color in the associated Material is modified. The default target is DIFFUSE.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>colorTarget</CODE> - one of: AMBIENT, EMISSIVE, DIFFUSE, SPECULAR, or AMBIENT_AND_DIFFUSE.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.3</DD></DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/RenderingAttributes.html#setIgnoreVertexColors(boolean)"><CODE>RenderingAttributes.setIgnoreVertexColors(boolean)</CODE></A>, <A HREF="../../../javax/media/j3d/ColorInterpolator.html"><CODE>ColorInterpolator</CODE></A></DL></DD></DL><HR><A NAME="getColorTarget()"><!-- --></A><H3>getColorTarget</H3><PRE>public int <B>getColorTarget</B>()</PRE><DL><DD>Retrieves the current color target for this material.<P><DD><DL><DT><B>Returns:</B><DD>one of: AMBIENT, EMISSIVE, DIFFUSE, SPECULAR, or AMBIENT_AND_DIFFUSE.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.3</DD></DD></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Returns a String representation of this Materials values. If the scene graph is live only those values with their Capability read bit set will be displayed.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="cloneNodeComponent()"><!-- --></A><H3>cloneNodeComponent</H3><PRE>public <A HREF="../../../javax/media/j3d/NodeComponent.html">NodeComponent</A> <B>cloneNodeComponent</B>()</PRE><DL><DD><B>Deprecated.</B> <I>replaced with cloneNodeComponent(boolean forceDuplicate)</I><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/media/j3d/NodeComponent.html#cloneNodeComponent()">cloneNodeComponent</A></CODE> in class <CODE><A HREF="../../../javax/media/j3d/NodeComponent.html">NodeComponent</A></CODE></DL></DD><DD><DL></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="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-all.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></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/media/j3d/LOD.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/MediaContainer.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="Material.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -