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

📄 material.html

📁 java 3d帮助文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<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>Constructs and initializes a Material object using default parameters. The default values are as follows: <ul> lighting enable : true<br> ambient color : (0.2, 0.2, 0.2)<br> emmisive color : (0.0, 0.0, 0.0)<br> diffuse color : (1.0, 1.0, 1.0)<br> specular color : (1.0, 1.0, 1.0)<br> shininess : 64<br> color target : DIFFUSE </ul><P></DL><HR><A NAME="Material(javax.vecmath.Color3f, javax.vecmath.Color3f, javax.vecmath.Color3f, javax.vecmath.Color3f, float)"><!-- --></A><H3>Material</H3><PRE>public <B>Material</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;ambientColor,                <A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;emissiveColor,                <A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;diffuseColor,                <A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;specularColor,                float&nbsp;shininess)</PRE><DL><DD>Constructs and initializes a new material object using the specified parameters. Lighting is enabled by default.<P><DT><B>Parameters:</B><DD><CODE>ambientColor</CODE> - the material's ambient color<DD><CODE>emissiveColor</CODE> - the material's emissive color<DD><CODE>diffuseColor</CODE> - the material's diffuse color when illuminated by a light<DD><CODE>specularColor</CODE> - the material's specular color when illuminated to generate a highlight<DD><CODE>shininess</CODE> - the material's shininess 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.</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="setAmbientColor(javax.vecmath.Color3f)"><!-- --></A><H3>setAmbientColor</H3><PRE>public void <B>setAmbientColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;color)</PRE><DL><DD>Sets this material's ambient color. This specifies how much ambient light is reflected by the surface. The ambient 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 either AMBIENT or AMBIENT_AND_DIFFUSE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's ambient color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the material's ambient 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="setAmbientColor(float, float, float)"><!-- --></A><H3>setAmbientColor</H3><PRE>public void <B>setAmbientColor</B>(float&nbsp;r,                            float&nbsp;g,                            float&nbsp;b)</PRE><DL><DD>Sets this material's ambient color. This specifies how much ambient light is reflected by the surface.   The ambient 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 either AMBIENT or AMBIENT_AND_DIFFUSE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's ambient color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the new ambient color's red component<DD><CODE>g</CODE> - the new ambient color's green component<DD><CODE>b</CODE> - the new ambient 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="getAmbientColor(javax.vecmath.Color3f)"><!-- --></A><H3>getAmbientColor</H3><PRE>public void <B>getAmbientColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;color)</PRE><DL><DD>Retrieves this material's ambient color.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - that will contain the material's ambient 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="setEmissiveColor(javax.vecmath.Color3f)"><!-- --></A><H3>setEmissiveColor</H3><PRE>public void <B>setEmissiveColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;color)</PRE><DL><DD>Sets this material's emissive color. This is the color of light, if any, that the material emits. The emissive 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 EMISSIVE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's emissive color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the new emissive 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="setEmissiveColor(float, float, float)"><!-- --></A><H3>setEmissiveColor</H3><PRE>public void <B>setEmissiveColor</B>(float&nbsp;r,                             float&nbsp;g,                             float&nbsp;b)</PRE><DL><DD>Sets this material's emissive color. This is the color of light, if any, that the material emits. The emissive 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 EMISSIVE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's emissive color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the new emissive color's red component<DD><CODE>g</CODE> - the new emissive color's green component<DD><CODE>b</CODE> - the new emissive 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="getEmissiveColor(javax.vecmath.Color3f)"><!-- --></A><H3>getEmissiveColor</H3><PRE>public void <B>getEmissiveColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;color)</PRE><DL><DD>Retrieves this material's emissive color and stores it in the argument provided.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the vector that will receive this material's emissive 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="setDiffuseColor(javax.vecmath.Color3f)"><!-- --></A><H3>setDiffuseColor</H3><PRE>public void <B>setDiffuseColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;color)</PRE><DL><DD>Sets this material's diffuse color. This is the color of the material when illuminated by a light source. The diffuse 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 either DIFFUSE or AMBIENT_AND_DIFFUSE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's diffuse color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the new diffuse 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="setDiffuseColor(float, float, float)"><!-- --></A><H3>setDiffuseColor</H3><PRE>public void <B>setDiffuseColor</B>(float&nbsp;r,                            float&nbsp;g,                            float&nbsp;b)</PRE><DL><DD>Sets this material's diffuse color. This is the color of the material when illuminated by a light source. The diffuse 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 either DIFFUSE or AMBIENT_AND_DIFFUSE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's diffuse color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the new diffuse color's red component<DD><CODE>g</CODE> - the new diffuse color's green component<DD><CODE>b</CODE> - the new diffuse 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="setDiffuseColor(float, float, float, float)"><!-- --></A><H3>setDiffuseColor</H3><PRE>public void <B>setDiffuseColor</B>(float&nbsp;r,                            float&nbsp;g,                            float&nbsp;b,                            float&nbsp;a)</PRE><DL><DD>Sets this material's diffuse color plus alpha. This is the color of the material when illuminated by a light source. The diffuse 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 either DIFFUSE or AMBIENT_AND_DIFFUSE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's diffuse color in the lighting equation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the new diffuse color's red component<DD><CODE>g</CODE> - the new diffuse color's green component<DD><CODE>b</CODE> - the new diffuse color's blue component<DD><CODE>a</CODE> - the alpha component used to set transparency<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="getDiffuseColor(javax.vecmath.Color3f)"><!-- --></A><H3>getDiffuseColor</H3><PRE>public void <B>getDiffuseColor</B>(<A HREF="../../../javax/vecmath/Color3f.html">Color3f</A>&nbsp;color)</PRE><DL><DD>Retrieves this material's diffuse color.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the vector that will receive this material's diffuse 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>

⌨️ 快捷键说明

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