📄 polygonattributes.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:06 PST 2006 --><TITLE>PolygonAttributes (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.PolygonAttributes class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PolygonAttributes (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/PointSound.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/PositionInterpolator.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/PolygonAttributes.html" target="_top"><B>FRAMES</B></A> <A HREF="PolygonAttributes.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 PolygonAttributes</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.PolygonAttributes</B></PRE><HR><DL><DT><PRE>public class <B>PolygonAttributes</B><DT>extends <A HREF="../../../javax/media/j3d/NodeComponent.html" title="class in javax.media.j3d">NodeComponent</A></DL></PRE><P>The PolygonAttributes object defines attributes for rendering polygon primitives. Polygon primitives include triangles, triangle strips, triangle fans, and quads. The polygon attributes that can be defined are:</li> <p><ul> <li>Rasterization mode - defines how the polygon is drawn: as points, outlines, or filled.<p> <ul> <li>POLYGON_POINT - the polygon is rendered as points drawn at the vertices.</li><p> <li>POLYGON_LINE - the polygon is rendered as lines drawn between consecutive vertices.</li><p> <li>POLYGON_FILL - the polygon is rendered by filling the interior between the vertices. The default mode.</li> <p></ul> <li>Face culling - defines which polygons are culled (discarded) before they are converted to screen coordinates.<p> <ul> <li>CULL_NONE - disables face culling.</li> <li>CULL_BACK - culls all back-facing polygons. The default.</li> <li>CULL_FRONT - culls all front-facing polygons.</li> <p></ul> <li>Back-face normal flip - specifies whether vertex normals of back-facing polygons are flipped (negated) prior to lighting. The setting is either true, meaning to flip back-facing normals, or false. The default is false.</li> <p> <li>Offset - the depth values of all pixels generated by polygon rasterization can be offset by a value that is computed for that polygon. Two values are used to specify the offset:</li><p> <ul> <li>Offset bias - the constant polygon offset that is added to the final device coordinate Z value of polygon primitives.</li> <p> <li>Offset factor - the factor to be multiplied by the slope of the polygon and then added to the final, device coordinate Z value of the polygon primitives.</li><p> </ul> These values can be either positive or negative. The default for both of these values is 0.0.<p> </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></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/PolygonAttributes.html#ALLOW_CULL_FACE_READ">ALLOW_CULL_FACE_READ</A></B></CODE><BR> Specifies that this PolygonAttributes object allows reading its cull face 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/PolygonAttributes.html#ALLOW_CULL_FACE_WRITE">ALLOW_CULL_FACE_WRITE</A></B></CODE><BR> Specifies that this PolygonAttributes object allows writing its cull face 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/PolygonAttributes.html#ALLOW_MODE_READ">ALLOW_MODE_READ</A></B></CODE><BR> Specifies that this PolygonAttributes object allows reading its polygon 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/PolygonAttributes.html#ALLOW_MODE_WRITE">ALLOW_MODE_WRITE</A></B></CODE><BR> Specifies that this PolygonAttributes object allows writing its polygon 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/PolygonAttributes.html#ALLOW_NORMAL_FLIP_READ">ALLOW_NORMAL_FLIP_READ</A></B></CODE><BR> Specifies that this PolygonAttributes object allows reading its back face normal flip flag.</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/PolygonAttributes.html#ALLOW_NORMAL_FLIP_WRITE">ALLOW_NORMAL_FLIP_WRITE</A></B></CODE><BR> Specifies that this PolygonAttributes object allows writing its back face normal flip flag.</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/PolygonAttributes.html#ALLOW_OFFSET_READ">ALLOW_OFFSET_READ</A></B></CODE><BR> Specifies that this PolygonAttributes object allows reading its polygon offset 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/PolygonAttributes.html#ALLOW_OFFSET_WRITE">ALLOW_OFFSET_WRITE</A></B></CODE><BR> Specifies that this PolygonAttributes object allows writing its polygon offset 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/PolygonAttributes.html#CULL_BACK">CULL_BACK</A></B></CODE><BR> Cull all back-facing polygons.</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/PolygonAttributes.html#CULL_FRONT">CULL_FRONT</A></B></CODE><BR> Cull all front-facing polygons.</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/PolygonAttributes.html#CULL_NONE">CULL_NONE</A></B></CODE><BR> Don't perform any face culling.</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/PolygonAttributes.html#POLYGON_FILL">POLYGON_FILL</A></B></CODE><BR> Render polygonal primitives by filling the interior of the polygon.</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/PolygonAttributes.html#POLYGON_LINE">POLYGON_LINE</A></B></CODE><BR> Render polygonal primitives as lines drawn between consecutive vertices of the polygon.</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/PolygonAttributes.html#POLYGON_POINT">POLYGON_POINT</A></B></CODE><BR> Render polygonal primitives as points drawn at the vertices of the polygon.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_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>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/PolygonAttributes.html#PolygonAttributes()">PolygonAttributes</A></B>()</CODE><BR> Constructs a PolygonAttributes object with default parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/PolygonAttributes.html#PolygonAttributes(int, int, float)">PolygonAttributes</A></B>(int polygonMode, int cullFace, float polygonOffset)</CODE><BR> Constructs a PolygonAttributes object with specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/PolygonAttributes.html#PolygonAttributes(int, int, float, boolean)">PolygonAttributes</A></B>(int polygonMode, int cullFace, float polygonOffset, boolean backFaceNormalFlip)</CODE><BR> Constructs PolygonAttributes object with specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/PolygonAttributes.html#PolygonAttributes(int, int, float, boolean, float)">PolygonAttributes</A></B>(int polygonMode, int cullFace, float polygonOffset, boolean backFaceNormalFlip, float polygonOffsetFactor)</CODE><BR> Constructs PolygonAttributes object with specified values.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_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>Method Summary</B></FONT></TH>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -