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

📄 texture.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        if (isLive()) {            ((TextureRetained)this.retained).setMaximumLOD(maximumLod);        } else {            ((TextureRetained)this.retained).initMaximumLOD(maximumLod);        }    }    /**     * Retrieves the maximum level-of-detail for this texture object.     * @return the maximum level-of-detail     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public float getMaximumLOD() {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_LOD_RANGE_READ)) {                throw new CapabilityNotSetException(                                J3dI18N.getString("Texture41"));            }        }        return ((TextureRetained)this.retained).getMaximumLOD();    }    /**     * Specifies the LOD offset for this texture object.     * @param s the s component of the LOD offset     * @param t the t component of the LOD offset     * @param r the r component of the LOD offset     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     * @see Canvas3D#queryProperties     */    public void setLodOffset(float s, float t, float r) {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_LOD_RANGE_WRITE)) {                throw new CapabilityNotSetException(                                J3dI18N.getString("Texture44"));            }        }        if (isLive()) {            ((TextureRetained)this.retained).setLodOffset(s, t, r);        } else {            ((TextureRetained)this.retained).initLodOffset(s, t, r);        }    }    /**     * Specifies the LOD offset for this texture object.     * @param offset the LOD offset     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     * @see Canvas3D#queryProperties     */    public void setLodOffset(Tuple3f offset) {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_LOD_RANGE_WRITE)) {                throw new CapabilityNotSetException(                                J3dI18N.getString("Texture44"));            }        }        if (isLive()) {            ((TextureRetained)this.retained).setLodOffset(					offset.x, offset.y, offset.z);        } else {            ((TextureRetained)this.retained).initLodOffset(					offset.x, offset.y, offset.z);        }    }    /**     * Retrieves the LOD offset for this texture object.     * @param offset the vector that will receive the     * current LOD offset.     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public void getLodOffset(Tuple3f offset) {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_LOD_RANGE_READ)) {                throw new CapabilityNotSetException(                                J3dI18N.getString("Texture45"));            }        }        ((TextureRetained)this.retained).getLodOffset(offset);    }    /**     * Specifies the anisotropic filter mode for this texture object.     * @param mode the anisotropic filter mode. One of     * ANISOTROPIC_NONE or ANISOTROPIC_SINGLE_VALUE.     * @exception RestrictedAccessException if the method is called     * when this object is part of live or compiled scene graph.     * @exception IllegalArgumentException if     * <code>mode</code> is a value other than     * <code>ANISOTROPIC_NONE</code> or <code>ANISOTROPIC_SINGLE_VALUE</code>     *     * @since Java 3D 1.3     * @see Canvas3D#queryProperties     */    public void setAnisotropicFilterMode(int mode) {	checkForLiveOrCompiled();        if ((mode != ANISOTROPIC_NONE) && 		(mode != ANISOTROPIC_SINGLE_VALUE)) {	     throw new IllegalArgumentException(                        J3dI18N.getString("Texture25"));	}        ((TextureRetained)this.retained).initAnisotropicFilterMode(mode);    }    /**     * Retrieves the anisotropic filter mode for this texture object.     * @return the currrent anisotropic filter mode of this texture object.     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public int getAnisotropicFilterMode() {	if (isLiveOrCompiled()) {	    if (!this.getCapability(ALLOW_ANISOTROPIC_FILTER_READ)) {		throw new CapabilityNotSetException(				J3dI18N.getString("Texture26"));	    }	}	return ((TextureRetained)this.retained).getAnisotropicFilterMode();    }    /**     * Specifies the degree of anisotropy to be     * used when the anisotropic filter mode specifies      * ANISOTROPIC_SINGLE_VALUE.     * @param degree degree of anisotropy     * @exception RestrictedAccessException if the method is called     * when this object is part of live or compiled scene graph.     * @exception IllegalArgumentException if     * <code>degree</code> < 1.0 or     * <code>degree</code> > the maximum degree of anisotropy.     *     * @since Java 3D 1.3     * @see Canvas3D#queryProperties     */    public void setAnisotropicFilterDegree(float degree) {	checkForLiveOrCompiled();        if (degree < 1.0) {	    throw new IllegalArgumentException(                        J3dI18N.getString("Texture27"));	}        ((TextureRetained)this.retained).initAnisotropicFilterDegree(degree);    }    /**     * Retrieves the anisotropic filter degree for this texture object.     * @return the current degree of anisotropy of this texture object     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public float getAnisotropicFilterDegree() {	if (isLiveOrCompiled()) {	    if (!this.getCapability(ALLOW_ANISOTROPIC_FILTER_READ)) {		throw new CapabilityNotSetException(				J3dI18N.getString("Texture26"));	    }	}	return ((TextureRetained)this.retained).getAnisotropicFilterDegree();    }      /**     * sets the sharpen texture LOD function for this texture object.     * @param lod array containing the level-of-detail values.     * @param pts array containing the function values for the corresponding     * level-of-detail values.     *     * @exception IllegalStateException if the length of <code>lod</code>      * does not match the length of <code>pts</code>     * @exception RestrictedAccessException if the method is called     * when this object is part of live or compiled scene graph.     *     * @since Java 3D 1.3     * @see Canvas3D#queryProperties     */    public void setSharpenTextureFunc(float[] lod, float[] pts) {        checkForLiveOrCompiled();	if (((lod != null) && (pts != null) && (lod.length == pts.length)) ||	     ((lod == null) && (pts == null))) {            ((TextureRetained)this.retained).initSharpenTextureFunc(lod, pts);	} else {	    throw new IllegalStateException(			J3dI18N.getString("Texture22"));	}    }    /**     * sets the sharpen texture LOD function for this texture object.     * The Point2f x,y values are defined as follows: x is the lod value,     * y is the corresponding function value.     *     * @param pts array of Point2f containing the lod as well as the      * corresponding function value.     *     * @exception RestrictedAccessException if the method is called     * when this object is part of live or compiled scene graph.     *     * @since Java 3D 1.3     * @see Canvas3D#queryProperties     */    public void setSharpenTextureFunc(Point2f[] pts) {        checkForLiveOrCompiled();        ((TextureRetained)this.retained).initSharpenTextureFunc(pts);    }    /**     * Gets the number of points in the sharpen texture LOD function for this     * texture object.     *     * @return the number of points in the sharpen texture LOD function.     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public int getSharpenTextureFuncPointsCount() {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_SHARPEN_TEXTURE_READ)) {                throw new CapabilityNotSetException(				J3dI18N.getString("Texture21"));	    }        }        return ((TextureRetained)this.retained).getSharpenTextureFuncPointsCount();    }       /**     * Copies the array of sharpen texture LOD function points into the     * specified arrays. The arrays must be large enough to hold all the     * points.     *     * @param lod the array to receive the level-of-detail values.     * @param pts the array to receive the function values for the      * corresponding level-of-detail values.     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public void getSharpenTextureFunc(float[] lod, float[] pts) {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_SHARPEN_TEXTURE_READ)) {                throw new CapabilityNotSetException(				J3dI18N.getString("Texture21"));	    }        }        ((TextureRetained)this.retained).getSharpenTextureFunc(							lod, pts);    }    /**     * Copies the array of sharpen texture LOD function points including     * the lod values and the corresponding function values into the     * specified array. The array must be large enough to hold all the points.     * The individual array elements must be allocated by the caller as well.     *     * @param pts the array to receive the sharpen texture LOD function points     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public void getSharpenTextureFunc(Point2f[] pts) {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_SHARPEN_TEXTURE_READ)) {                throw new CapabilityNotSetException(				J3dI18N.getString("Texture21"));	    }        }        ((TextureRetained)this.retained).getSharpenTextureFunc(pts);    }         /**     * sets the filter4 function for this texture object.     * @param weights array containing samples of the filter4 function.     *     * @exception IllegalArgumentException if the length of      * <code>weight</code> < 4     * @exception RestrictedAccessException if the method is called     * when this object is part of live or compiled scene graph.     *     * @since Java 3D 1.3     * @see Canvas3D#queryProperties     */    public void setFilter4Func(float[] weights) {        checkForLiveOrCompiled();	if ((weights == null) || (weights.length < 4)) {	    throw new IllegalArgumentException(			J3dI18N.getString("Texture24"));	} else {            ((TextureRetained)this.retained).initFilter4Func(weights);	}    }    /**     * Retrieves the number of filter4 function values for this     * texture object.     *     * @return the number of filter4 function values     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public int getFilter4FuncPointsCount() {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_FILTER4_READ)) {                throw new CapabilityNotSetException(				J3dI18N.getString("Texture23"));	    }        }        return (((TextureRetained)this.retained).getFilter4FuncPointsCount());    }    /**     * Copies the array of filter4 function values into the specified     * array. The array must be large enough to hold all the values.     *     * @param weights the array to receive the function values.     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @since Java 3D 1.3     */    public void getFilter4Func(float[] weights) {        if (isLiveOrCompiled()) {            if (!this.getCapability(ALLOW_FILTER4_READ)) {                throw new CapabilityNotSetException(	

⌨️ 快捷键说明

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