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

📄 texcoordgeneration.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!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>TexCoordGeneration (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.TexCoordGeneration class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="TexCoordGeneration (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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/media/j3d/SwitchValueInterpolator.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/media/j3d/Text3D.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/TexCoordGeneration.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TexCoordGeneration.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 TexCoordGeneration</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.TexCoordGeneration</B></PRE><HR><DL><DT><PRE>public class <B>TexCoordGeneration</B><DT>extends <A HREF="../../../javax/media/j3d/NodeComponent.html" title="class in javax.media.j3d">NodeComponent</A></DL></PRE><P>The TexCoordGeneration object contains all parameters needed for  automatic texture coordinate generation.  It is included as part  of an Appearance component object. <p> Texture coordinates determine which texel in the texture map is assigned to a given vertex. Texture coordinates are interpolated between vertices, similarly to how colors are interpolated between two vertices of lines and polygons. <p> Texture coordinates consist of two, three or four coordinates. These coordinates are referred to as the <i>S</i>, <i>T</i>, <i>R</i>, and <i>Q</i> coordinates. 2D textures use the <i>S</i> and <i>T</i> coordinates. 3D textures use the <i>S</i>, <i>T</i> and <i>R</i> coordinates. The <i>Q</i> coordinate, similar to the <i>w</i> coordinate of the <i>(x, y, z, w)</i> object coordinates, is used to create homogeneous coordinates. <p> Rather than the programmer having to explicitly assign texture  coordinates, Java 3D can automatically generate the texture coordinates to achieve texture mapping onto contours. The TexCoordGeneration attributes specify the functions for automatically generating texture coordinates. The texture attributes that can be  defined are: <p><ul> <li>Texture format - defines whether the generated texture  coordinates are 2D, 3D, or 4D:<p> <ul> <li>TEXTURE_COORDINATE_2 - generates 2D texture coordinates  (S and T).<p> <li>TEXTURE_COORDINATE_3 - generates 3D texture coordinates (S, T, and R).<p> <li>TEXTURE_COORDINATE_4 - generates 4D texture coordinates (S, T, R, and Q).<p> </ul> <li>Texture generation mode - defines how the texture coordinates are generated:<p> <ul> <li>OBJECT_LINEAR - texture coordinates are generated as a linear function in object coordinates. The function used is:<p> <ul> <code>g = p<sub>1</sub>x<sub>o</sub> + p<sub>2</sub>y<sub>o</sub> + p<sub>3</sub>z<sub>o</sub> + p<sub>4</sub>w<sub>o</sub></code> <p> where<br> <ul><code>g</code> is the value computed for the coordinate.<br> <code>p<sub>1</sub></code>, <code>p<sub>2</sub></code>, <code>p<sub>3</sub></code>, and <code>p<sub>4</sub></code> are the plane equation coefficients (described below).<br> x<sub>o</sub>, y<sub>o</sub>, z<sub>o</sub>, and w<sub>o</sub> are the object coordinates of the vertex.<p> </ul></ul> <li>EYE_LINEAR - texture coordinates are generated as a linear function in eye coordinates. The function used is:<p> <ul> <code>g = p<sub>1</sub>'x<sub>e</sub> + p<sub>2</sub>'y<sub>e</sub> + p<sub>3</sub>'z<sub>e</sub> + p<sub>4</sub>'w<sub>e</sub></code> <p> where<br> <ul><code>x<sub>e</sub></code>, <code>y<sub>e</sub></code>, <code>z<sub>e</sub></code>, and w<sub>e</sub></code> are the eye coordinates of the vertex.<br> <code>p<sub>1</sub>'</code>, <code>p<sub>2</sub>'</code>, <code>p<sub>3</sub>'</code>, and <code>p<sub>4</sub>'</code> are the plane equation coefficients transformed into eye coordinates.<p> </ul></ul>  <li>SPHERE_MAP - texture coordinates are generated using  spherical reflection mapping in eye coordinates. Used to simulate the reflected image of a spherical environment onto a polygon.<p> <li>NORMAL_MAP - texture coordinates are generated to match  vertices' normals in eye coordinates. This is only available if TextureCubeMap is available. </li><p> <li>REFLECTION_MAP - texture coordinates are generated to match vertices' reflection vectors in eye coordinates. This is only available if TextureCubeMap is available. </li><p> </ul> <li>Plane equation coefficients - defines the coefficients for the  plane equations used to generate the coordinates in the  OBJECT_LINEAR and EYE_LINEAR texture generation modes. The coefficients define a reference plane in either object coordinates or in eye coordinates, depending on the texture generation mode. <p> The equation coefficients are set by the <code>setPlaneS</code>, <code>setPlaneT</code>, <code>setPlaneR</code>, and <code>setPlaneQ</code> methods for each of the S, T, R, and Q coordinate functions, respectively. By default the equation coefficients are set as follows:<p> <ul> plane S = (1.0, 0.0, 0.0, 0.0)<br> plane T = (0.0, 1.0, 0.0, 0.0)<br> plane R = (0.0, 0.0, 0.0, 0.0)<br> plane Q = (0.0, 0.0, 0.0, 0.0)<p> </ul></ul> Texture coordinate generation is enabled or disabled by the <code>setEnable</code> method. When enabled, the specified texture coordinate is computed according to the generating function associated with the coordinate. When disabled, subsequent vertices take the specified texture coordinate from the current set of texture coordinates.<p><P><P><DL><DT><B>See Also:</B><DD><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&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#ALLOW_ENABLE_READ">ALLOW_ENABLE_READ</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this TexCoordGeneration object allows reading its enable flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#ALLOW_ENABLE_WRITE">ALLOW_ENABLE_WRITE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this TexCoordGeneration object allows writing its enable flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#ALLOW_FORMAT_READ">ALLOW_FORMAT_READ</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this TexCoordGeneration object allows reading its format information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#ALLOW_MODE_READ">ALLOW_MODE_READ</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this TexCoordGeneration object allows reading its mode information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#ALLOW_PLANE_READ">ALLOW_PLANE_READ</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this TexCoordGeneration object allows reading its planeS, planeR, and planeT component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#ALLOW_PLANE_WRITE">ALLOW_PLANE_WRITE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this TexCoordGeneration object allows writing its planeS, planeR, and planeT component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#EYE_LINEAR">EYE_LINEAR</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates texture coordinates as a linear function in eye coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#NORMAL_MAP">NORMAL_MAP</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates texture coordinates that match vertices' normals in eye coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#OBJECT_LINEAR">OBJECT_LINEAR</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates texture coordinates as a linear function in object coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/TexCoordGeneration.html#REFLECTION_MAP">REFLECTION_MAP</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates texture coordinates that match vertices' reflection vectors in eye coordinates.</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 + -