📄 textureattributes.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_06) on Wed Dec 13 16:20:07 PST 2006 --><TITLE>TextureAttributes (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.TextureAttributes class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="TextureAttributes (Java 3D 1.5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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/Texture3D.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/TextureCubeMap.html" title="class in javax.media.j3d"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/media/j3d/TextureAttributes.html" target="_top"><B>FRAMES</B></A> <A HREF="TextureAttributes.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><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><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Class TextureAttributes</H2><PRE>java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/media/j3d/SceneGraphObject.html" title="class in javax.media.j3d">javax.media.j3d.SceneGraphObject</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/media/j3d/NodeComponent.html" title="class in javax.media.j3d">javax.media.j3d.NodeComponent</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.media.j3d.TextureAttributes</B></PRE><HR><DL><DT><PRE>public class <B>TextureAttributes</B><DT>extends <A HREF="../../../javax/media/j3d/NodeComponent.html" title="class in javax.media.j3d">NodeComponent</A></DL></PRE><P>The TextureAttributes object defines attributes that apply to texture mapping. The texture attributes include the following:<P> <UL> <LI>Texture mode - defines how the object and texture colors are blended. The mode may be one of the following:</LI><P> <UL> <LI>MODULATE - modulates the incoming color with the texture color.<P> <UL> C' = C Ct </UL></LI><P> <LI>DECAL - applies the texture color to the incoming color as a decal.<P> <UL> C'<sub>rgb</sub> = C<sub>rgb</sub> (1 - Ct<sub>a</sub>) + Ct<sub>rgb</sub> Ct<sub>a</sub><P> C'<sub>a</sub> = C<sub>a</sub> </UL></LI><P> <LI>BLEND - blends the texture blend color with the incoming color.<P> <UL> C'<sub>rgb</sub> = C<sub>rgb</sub> (1 - Ct<sub>rgb</sub>) + Cb<sub>rgb</sub> Ct<sub>rgb</sub><P> C'<sub>a</sub> = C<sub>a</sub> Ct<sub>a</sub><P> </UL> Note that if the texture format is INTENSITY, alpha is computed identically to red, green, and blue: <P> <UL> C'<sub>a</sub> = C<sub>a</sub> (1 - Ct<sub>a</sub>) + Cb<sub>a</sub> Ct<sub>a</sub> </UL></LI><P> <LI>REPLACE - replaces the incoming color with the texture color.<P> <UL> C' = Ct <P> </UL></LI><P> <LI>COMBINE - combines the object color with the texture color or texture blend color according to the combine operation as specified in the texture combine mode. </LI><P> <p> </UL> C = Incoming color to the texture unit state. For texture unit state 0, C is the object color Ct = Texture color<br> Cb = Texture blend color<br> <p> <LI>Combine Mode - defines the combine operation when texture mode specifies COMBINE. The combine mode includes the following:<p> <UL> <LI>COMBINE_REPLACE<P> <UL> C' = C<sub>0</sub> <P> </UL></LI><P> <LI>COMBINE_MODULATE<P> <UL> C' = C<sub>0</sub> C<sub>1</sub> </UL></LI><P> <LI>COMBINE_ADD<P> <UL> C' = C<sub>0</sub> + C<sub>1</sub> <P> </UL></LI><P> <LI>COMBINE_ADD_SIGNED <P> <UL> C' = C<sub>0</sub> + C<sub>1</sub> - 0.5 <P> </UL></LI><P> <LI>COMBINE_SUBTRACT <P> <UL> C' = C<sub>0</sub> - C<sub>1</sub> <P> </UL></LI><P> <LI>COMBINE_INTERPOLATE<P> <UL> C' = C<sub>0</sub> C<sub>2</sub> + C<sub>1</sub> (1 - C<sub>2</sub>) <P> </UL></LI><P> <LI>COMBINE_DOT3<P> <UL> C' = 4 * ( (C<sub>0<sub>r</sub></sub> - 0.5) * (C<sub>1<sub>r</sub></sub> - 0.5) + (C<sub>0<sub>g</sub></sub> - 0.5) * (C<sub>1<sub>g</sub></sub> - 0.5) + (C<sub>0<sub>b</sub></sub> - 0.5) * (C<sub>1<sub>b</sub></sub> - 0.5))<P> where C<sub>N<sub>x</sub></sub> is the x component of the Nth color operand in the combine operation.<P> The value C' will be placed to the all three r,g,b components or the a component of the output. </UL></LI><P> </UL></LI><P> where C<sub>0</sub>, C<sub>1</sub> and C<sub>2</sub> are determined by the color source, and the color operand. </UL></LI><P> <UL> <LI>Combine Color Source - defines the source for a color operand in the combine operation. The color source includes the following:<p> <UL> <LI> COMBINE_OBJECT_COLOR - object color<P> <LI> COMBINE_TEXTURE_COLOR - texture color<P> <LI> COMBINE_CONSTANT_COLOR - texture blend color<P> <LI> COMBINE_PREVIOUS_TEXTURE_UNIT_STATE - color from the previous texture unit state. For texture unit state 0, this is equivalent to COMBINE_OBJECT_COLOR.<P> </UL></LI><P> <LI>Combine Color Function - specifies the function for a color operand in the combine operation. The valid values are:<P> <UL> <LI>COMBINE_SRC_COLOR - the color function is f = C<sub>rgb</sub><P> <LI>COMBINE_ONE_MINUS_SRC_COLOR - the color function is f = (1 - C<sub>rgb</sub>)<P> <LI>COMBINE_SRC_ALPHA - the color function is f = C<sub>a</sub><P> <LI>COMBINE_ONE_MINUS_SRC_ALPHA - the color function is f = (1 - C<sub>a</sub>)<P> </UL></LI><P> <LI>Combine scale factor - specifies the scale factor to be applied to the output color of the combine operation. The valid values include: 1, 2, or 4.</LI><P> <LI>Transform - the texture transform object used to transform texture coordinates. The texture transform can translate, scale, or rotate the texture coordinates before the texture is applied to the object.</LI><P> <LI>Blend color - the constant texture blend color</LI><P> <LI>Perspective correction - the perspective correction mode used for color and texture coordinate interpolation. One of the following:</LI><P> <UL> <LI>NICEST - uses the nicest (highest quality) available method for texture mapping perspective correction.</LI><P> <LI>FASTEST - uses the fastest available method for texture mapping perspective correction.</LI><P> </UL> <LI>Texture color table - defines a table that is used to look up texture colors before applying the texture mode.</LI> </UL><P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/Appearance.html" title="class in javax.media.j3d"><CODE>Appearance</CODE></A>, <A HREF="../../../javax/media/j3d/Canvas3D.html#queryProperties()"><CODE>Canvas3D.queryProperties()</CODE></A></DL><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TextureAttributes.html#ALLOW_BLEND_COLOR_READ">ALLOW_BLEND_COLOR_READ</A></B></CODE><BR> Specifies that this TextureAttributes object allows reading its texture blend color component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TextureAttributes.html#ALLOW_BLEND_COLOR_WRITE">ALLOW_BLEND_COLOR_WRITE</A></B></CODE><BR> Specifies that this TextureAttributes object allows writing its texture blend color component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TextureAttributes.html#ALLOW_COLOR_TABLE_READ">ALLOW_COLOR_TABLE_READ</A></B></CODE><BR> Specifies that this TextureAttributes object allows reading its texture color table component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TextureAttributes.html#ALLOW_COLOR_TABLE_WRITE">ALLOW_COLOR_TABLE_WRITE</A></B></CODE><BR> Specifies that this TextureAttributes object allows writing its texture color table component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TextureAttributes.html#ALLOW_COMBINE_READ">ALLOW_COMBINE_READ</A></B></CODE><BR> Specifies that this TextureAttributes object allows reading its texture combine mode information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TextureAttributes.html#ALLOW_COMBINE_WRITE">ALLOW_COMBINE_WRITE</A></B></CODE><BR> Specifies that this TextureAttributes object allows writing its texture combine mode information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -