📄 transparencyattributes.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sun Jun 23 01:50:45 PDT 2002 --><TITLE>TransparencyAttributes (Java 3D API)</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="TransparencyAttributes (Java 3D API)";}</SCRIPT><BODY BGCOLOR="white" onload="asd();"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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/TransformInterpolator.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/TransparencyInterpolator.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="TransparencyAttributes.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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Class TransparencyAttributes</H2><PRE>java.lang.Object | +--<A HREF="../../../javax/media/j3d/SceneGraphObject.html">javax.media.j3d.SceneGraphObject</A> | +--<A HREF="../../../javax/media/j3d/NodeComponent.html">javax.media.j3d.NodeComponent</A> | +--<B>javax.media.j3d.TransparencyAttributes</B></PRE><HR><DL><DT>public class <B>TransparencyAttributes</B><DT>extends <A HREF="../../../javax/media/j3d/NodeComponent.html">NodeComponent</A></DL><P>The TransparencyAttributes object defines all attributes affecting transparency of the object. The transparency attributes are:<P> <UL> <LI>Transparency mode - defines how transparency is applied to this Appearance component object:</LI><P> <UL> <LI>FASTEST - uses the fastest available method for transparency.</LI><P> <LI>NICEST - uses the nicest available method for transparency.</LI><P> <LI>SCREEN_DOOR - uses screen-door transparency. This is done using an on/off stipple pattern in which the percentage of transparent pixels is approximately equal to the value specified by the transparency parameter.</LI><P> <LI>BLENDED - uses alpha blended transparency. The blend equation is specified by the srcBlendFunction and dstBlendFunction attributes. The default equation is: <ul> <code>alpha<sub><font size=-1>src</font></sub>*src + (1-alpha<sub><font size=-1>src</font></sub>)*dst</code> </ul> where <code>alpha<sub><font size=-1>src</font></sub></code> is <code>1-transparency</code>. When this mode is used with a Raster object or with a Geometry that contains per-vertex colors with alpha, the alpha values in the Raster's image or in the Geometry's per-vertex colors are combined with the transparency value in this TransparencyAttributes object to perform blending. In this case, the alpha value used for blending at each pixel is: <ul> <code>alpha<sub><font size=-1>src</font></sub> = alpha<sub><font size=-1>pix</font></sub> * (1-transparency)</code>. </ul> </LI><P> <LI>NONE - no transparency; opaque object.</LI><P> </UL> <LI>Blend function - used in blended transparency and antialiasing operations. The source function specifies the factor that is multiplied by the source color. This value is added to the product of the destination factor and the destination color. The default source blend function is BLEND_SRC_ALPHA. The source blend function is one of the following:</LI><P> <UL> <LI>BLEND_ZERO - the blend function is <code>f = 0</code>.</LI> <LI>BLEND_ONE - the blend function is <code>f = 1</code>.</LI> <LI>BLEND_SRC_ALPHA - the blend function is <code>f = alpha<sub><font size=-1>src</font></sub></code>.</LI> <LI>BLEND_ONE_MINUS_SRC_ALPHA - the blend function is <code>f = 1 - alpha<sub><font size=-1>src</font></sub></code>.</LI></UL><P> <LI>Blend value - the amount of transparency to be applied to this Appearance component object. The transparency values are in the range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being fully transparent.</LI><P> </UL><P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></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/TransparencyAttributes.html#ALLOW_BLEND_FUNCTION_READ">ALLOW_BLEND_FUNCTION_READ</A></B></CODE><BR> Specifies that this TransparencyAttributes object allows reading its blend function.</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/TransparencyAttributes.html#ALLOW_BLEND_FUNCTION_WRITE">ALLOW_BLEND_FUNCTION_WRITE</A></B></CODE><BR> Specifies that this TransparencyAttributes object allows writing its blend function.</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/TransparencyAttributes.html#ALLOW_MODE_READ">ALLOW_MODE_READ</A></B></CODE><BR> Specifies that this TransparencyAttributes object allows reading its transparency mode 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/TransparencyAttributes.html#ALLOW_MODE_WRITE">ALLOW_MODE_WRITE</A></B></CODE><BR> Specifies that this TransparencyAttributes object allows writing its transparency mode 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/TransparencyAttributes.html#ALLOW_VALUE_READ">ALLOW_VALUE_READ</A></B></CODE><BR> Specifies that this TransparencyAttributes object allows reading its transparency value.</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/TransparencyAttributes.html#ALLOW_VALUE_WRITE">ALLOW_VALUE_WRITE</A></B></CODE><BR> Specifies that this TransparencyAttributes object allows writing its transparency value.</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/TransparencyAttributes.html#BLEND_ONE">BLEND_ONE</A></B></CODE><BR> Blend function: <code>f = 1</code>.</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/TransparencyAttributes.html#BLEND_ONE_MINUS_SRC_ALPHA">BLEND_ONE_MINUS_SRC_ALPHA</A></B></CODE><BR> Blend function: <code>f = 1-alpha<sub><font size=-1>src</font></sub></code>.</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/TransparencyAttributes.html#BLEND_SRC_ALPHA">BLEND_SRC_ALPHA</A></B></CODE><BR> Blend function: <code>f = alpha<sub><font size=-1>src</font></sub></code>.</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/TransparencyAttributes.html#BLEND_ZERO">BLEND_ZERO</A></B></CODE><BR> Blend function: <code>f = 0</code>.</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/TransparencyAttributes.html#BLENDED">BLENDED</A></B></CODE><BR> Use alpha blended transparency.</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/TransparencyAttributes.html#FASTEST">FASTEST</A></B></CODE><BR> Use the fastest available method for transparency.</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/TransparencyAttributes.html#NICEST">NICEST</A></B></CODE><BR> Use the nicest available method for transparency.</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/TransparencyAttributes.html#NONE">NONE</A></B></CODE><BR> No transparency, opaque object.</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/TransparencyAttributes.html#SCREEN_DOOR">SCREEN_DOOR</A></B></CODE><BR> Use screen-door transparency.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#TransparencyAttributes()">TransparencyAttributes</A></B>()</CODE><BR> Constructs a TransparencyAttributes object with default parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#TransparencyAttributes(int, float)">TransparencyAttributes</A></B>(int tMode, float tVal)</CODE><BR> Construct TransparencyAttributes object with specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#TransparencyAttributes(int, float, int, int)">TransparencyAttributes</A></B>(int tMode, float tVal, int srcBlendFunction, int dstBlendFunction)</CODE><BR> Construct TransparencyAttributes object with specified values.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/media/j3d/NodeComponent.html">NodeComponent</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#cloneNodeComponent()">cloneNodeComponent</A></B>()</CODE><BR> <B>Deprecated.</B> <I>replaced with cloneNodeComponent(boolean forceDuplicate)</I></TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -