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

📄 texture.html

📁 java 3d帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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:41 PDT 2002 --><TITLE>Texture (Java 3D API)</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="Texture (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>&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/Text3D.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/media/j3d/Texture2D.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>  &nbsp;&nbsp;<A HREF="Texture.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&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><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Class  Texture</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.Texture</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/media/j3d/Texture2D.html">Texture2D</A>, <A HREF="../../../javax/media/j3d/Texture3D.html">Texture3D</A>, <A HREF="../../../javax/media/j3d/TextureCubeMap.html">TextureCubeMap</A></DD></DL><HR><DL><DT>public abstract class <B>Texture</B><DT>extends <A HREF="../../../javax/media/j3d/NodeComponent.html">NodeComponent</A></DL><P>The Texture object is a component object of an Appearance object that defines the texture properties used when texture mapping is enabled. The Texture object is an abstract class and all texture  objects must be created as either a Texture2D object or a Texture3D object. <P> Each Texture object has the following properties:<P> <UL> <LI>Boundary color - the texture boundary color. The texture boundary color is used when the boundaryModeS and boundaryModeT parameters are set to CLAMP or CLAMP_TO_BOUNDARY and if the texture boundary is not specified. </LI><P> <LI>Boundary Width - the texture boundary width. If the texture boundary width is > 0, then all images for all mipmap levels will include boundary texels. The actual texture image for level 0, for example, will be of  dimension (width + 2*boundaryWidth) * (height + 2*boundaryWidth).  The boundary texels will be used when linear filtering is to be applied. </LI><p> <LI>Boundary ModeS and Boundary ModeT - the boundary mode for the S and T coordinates, respectively. The boundary modes are as follows:</LI><P> <UL> <LI>CLAMP - clamps texture coordinates to be in the range [0,1].  Texture boundary texels or the constant boundary color if boundary width is 0 will be used for U,V values that fall outside this range.</LI><P> <LI>WRAP - repeats the texture by wrapping texture coordinates that are outside the range [0,1]. Only the fractional portion of the texture coordinates is used. The integer portion is discarded</LI><P> <LI>CLAMP_TO_EDGE - clamps texture coordinates such that filtering will not sample a texture boundary texel. Texels at the edge of the  texture will be used instead.</LI><P> <LI>CLAMP_TO_BOUNDARY - clamps texture coordinates such that filtering will sample only texture boundary texels, that is, it will never get some samples from the boundary and some from the edge. This will ensure clean unfiltered boundaries. If the texture does not  have a boundary, that is the boundary width is equal to 0, then the  constant boundary color will be used.</LI></P> </UL> <LI>Image - an image or an array of images for all the mipmap levels. If only one image is provided, the MIPmap mode must be set to BASE_LEVEL.</LI><P> <LI>Magnification filter - the magnification filter function.  Used when the pixel being rendered maps to an area less than or equal to one texel. The magnification filter functions are as follows:</LI><P> <UL> <LI>FASTEST - uses the fastest available method for processing geometry.</LI><P> <LI>NICEST - uses the nicest available method for processing geometry.</LI><P> <LI>BASE_LEVEL_POINT - selects the nearest texel in the base level texture image.</LI><P> <LI>BASE_LEVEL_LINEAR - performs a bilinear interpolation on the four nearest texels in the base level texture image. The texture value T' is computed as follows:</LI><P> <UL> i<sub>0</sub> = trunc(u - 0.5)<P> j<sub>0</sub> = trunc(v - 0.5)<P> i<sub>1</sub> = i<sub>0</sub> + 1<P> j<sub>1</sub> = j<sub>0</sub> + 1<P> a = frac(u - 0.5)<P> b = frac(v - 0.5)<P> T' = (1-a)*(1-b)*T<sub>i<sub>0</sub>j<sub>0</sub></sub> +  a*(1-b)*T<sub>i<sub>1</sub>j<sub>0</sub></sub> + (1-a)*b*T<sub>i<sub>0</sub>j<sub>1</sub></sub> + a*b*T<sub>i<sub>1</sub>j<sub>1</sub></sub><P> </UL> <LI>LINEAR_SHARPEN - sharpens the resulting image by extrapolating from the base level plus one image to the base level image of this  texture object.</LI><P> <LI>LINEAR_SHARPEN_RGB - performs linear sharpen filter for the rgb components only. The alpha component is computed using BASE_LEVEL_LINEAR filter.</LI><P> <LI>LINEAR_SHARPEN_ALPHA - performs linear sharpen filter for the alpha component only. The rgb components are computed using BASE_LEVEL_LINEAR filter.</LI><P> <LI>FILTER4 - applies an application-supplied weight function on the nearest 4x4 texels in the base level texture image. The texture value T' is computed as follows:</LI><P> <UL> <table cellspacing=10> <td>i<sub>1</sub> = trunc(u - 0.5)</td> <td>i<sub>2</sub> = i<sub>1</sub> + 1</td> <td>i<sub>3</sub> = i<sub>2</sub> + 1</td> <td>i<sub>0</sub> = i<sub>1</sub> - 1</td> <tr> <td>j<sub>1</sub> = trunc(v - 0.5)</td> <td>j<sub>3</sub> = j<sub>2</sub> + 1</td> <td>j<sub>2</sub> = j<sub>1</sub> + 1</td> <td>j<sub>0</sub> = j<sub>1</sub> - 1</td> <tr> <td>a = frac(u - 0.5)</td> <tr> <td>b = frac(v - 0.5)</td> </table> f(x) : filter4 function where 0<=x<=2<P> T' = f(1+a) * f(1+b) * T<sub>i<sub>0</sub>j<sub>0</sub></sub> +  f(a) * f(1+b) * T<sub>i<sub>1</sub>j<sub>0</sub></sub> +  f(1-a) * f(1+b) * T<sub>i<sub>2</sub>j<sub>0</sub></sub> +  f(2-a) * f(1+b) * T<sub>i<sub>3</sub>j<sub>0</sub></sub> + <br> f(1+a) * f(b) * T<sub>i<sub>0</sub>j<sub>1</sub></sub> +  f(a) * f(b) * T<sub>i<sub>1</sub>j<sub>1</sub></sub> +  f(1-a) * f(b) * T<sub>i<sub>2</sub>j<sub>1</sub></sub> +  f(2-a) * f(b) * T<sub>i<sub>3</sub>j<sub>1</sub></sub> + <br> f(1+a) * f(1-b) * T<sub>i<sub>0</sub>j<sub>2</sub></sub> +  f(a) * f(1-b) * T<sub>i<sub>1</sub>j<sub>2</sub></sub> +  f(1-a) * f(1-b) * T<sub>i<sub>2</sub>j<sub>2</sub></sub> +  f(2-a) * f(1-b) * T<sub>i<sub>3</sub>j<sub>2</sub></sub> + <br> f(1+a) * f(2-b) * T<sub>i<sub>0</sub>j<sub>3</sub></sub> +  f(a) * f(2-b) * T<sub>i<sub>1</sub>j<sub>3</sub></sub> +  f(1-a) * f(2-b) * T<sub>i<sub>2</sub>j<sub>3</sub></sub> +  f(2-a) * f(2-b) * T<sub>i<sub>3</sub>j<sub>3</sub></sub> <P> </UL> </UL> <LI>Minification filter - the minification filter function. Used when the pixel being rendered maps to an area greater than one texel. The minifaction filter functions are as follows:</LI><P> <UL> <LI>FASTEST - uses the fastest available method for processing geometry.</LI><P> <LI>NICEST - uses the nicest available method for processing geometry.</LI><P> <LI>BASE_LEVEL_POINT - selects the nearest level in the base level texture map.</LI><P><LI>BASE_LEVEL_LINEAR - performs a bilinear interpolation on the four nearest texels in the base level texture map.</LI><P> <LI>MULTI_LEVEL_POINT - selects the nearest texel in the nearest mipmap.</LI><P> <LI>MULTI_LEVEL_LINEAR - performs trilinear interpolation of texels between four texels each from the two nearest mipmap levels.</LI><P> <LI>FILTER4 - applies an application-supplied weight function on the nearest 4x4 texels in the base level texture image.</LI><P> </UL> <LI>MIPmap mode - the mode used for texture mapping for this object. The mode is one of the following:</LI><P> <UL> <LI>BASE_LEVEL - indicates that this Texture object only has a base-level image. If multiple levels are needed, they will be implicitly computed.</LI><P> <LI>MULTI_LEVEL_MIPMAP - indicates that this Texture object has multiple images. If MIPmap mode is set to MULTI_LEVEL_MIPMAP, images for Base Level through Max Level must be set.</LI><P> </UL> <LI>Format - the data format. The format is one of the following:</LI><P> <UL> <LI>INTENSITY - the texture image contains only texture values.</LI><P> <LI>LUMINANCE - the texture image contains only luminance values.</LI><P> <LI>ALPHA - the texture image contains only alpha values.</LI><P> <LI>LUMINANCE_ALPHA - the texture image contains both luminance and alpha values.</LI><P> <LI>RGB - the texture image contains red, green, and blue values.</LI><P> <LI>RGBA - the texture image contains red, green, blue, and alpha values.</LI><P></UL> <LI>Base Level - specifies the mipmap level to be used when filter specifies BASE_LEVEL_POINT or BASE_LEVEL_LINEAR.</LI><P> <LI>Maximum Level - specifies the maximum level of image that needs to be defined for this texture to be valid. Note, for this texture to be valid, images for Base Level through Maximum Level have to be defined.</LI><P> <LI>Minimum LOD - specifies the minimum of the LOD range. LOD smaller than this value will be clamped to this value.</LI><P> <LI>Maximum LOD - specifies the maximum of the LOD range. LOD larger than this value will be clamped to this value.</LI><P> <LI>LOD offset - specifies the offset to be used in the LOD calculation to compensate for under or over sampled texture images.</LI></P> <LI>Anisotropic Mode - defines how anisotropic filter is applied for this texture object. The anisotropic modes are as follows:</LI><P> <UL> <LI>ANISOTROPIC_NONE - no anisotropic filtering.</LI><P> <LI>ANISOTROPIC_SINGLE_VALUE - applies the degree of anisotropic filter  in both the minification and magnification filters.</LI><P> </UL> <LI>Anisotropic Filter Degree - controls the degree of anisotropy. This property applies to both minification and magnification filtering.  If it is equal to 1.0, then an isotropic filtering as specified in the minification or magnification filter will be used. If it is greater  than 1.0, and the anisotropic mode is equal to ANISOTROPIC_SINGLE_VALUE,  then the degree of anisotropy will also be applied in the filtering.</LI><P> <LI>Sharpen Texture Function - specifies the function of level-of-detail used in combining the texture value computed from the base level image and the texture value computed from the base level plus one image. The final texture value is computed as follows: </LI><P> <UL> T' = ((1 + SharpenFunc(LOD)) * T<sub>BaseLevel</sub>) - (SharpenFunc(LOD) * T<sub>BaseLevel+1</sub>) <P> </UL> <LI>Filter4 Function - specifies the function to be applied to the nearest 4x4 texels.  This property includes samples of the filter function f(x), 0<=x<=2. The number of function values supplied has to be equal to 2<sup>m</sup> + 1 for some integer value of m greater than or equal to 4. </LI><P> </UL>

⌨️ 快捷键说明

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