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

📄 auralattributes.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
                      reverbDelay);        ((AuralAttributesRetained)this.retained).setDecayTime(decayTime);        ((AuralAttributesRetained)this.retained).setDecayFilter(decayFilter);        ((AuralAttributesRetained)this.retained).setDiffusion(diffusion);        ((AuralAttributesRetained)this.retained).setDensity(density);        ((AuralAttributesRetained)this.retained).setDistanceFilter(distance,                      frequencyCutoff);        ((AuralAttributesRetained)this.retained).setFrequencyScaleFactor(                      frequencyScaleFactor);        ((AuralAttributesRetained)this.retained).setVelocityScaleFactor(                      velocityScaleFactor);    }    /**     * Creates the retained mode AuralAttributesRetained object that this     * component object will point to.     */      void createRetained() {        this.retained = new AuralAttributesRetained();        this.retained.setSource(this);    }    /** ****************************************     *        *  Attribute Gain     *     * ****************************************/    /**     * Set Attribute Gain (amplitude) scale factor.     * @param gain scale factor applied to amplitude of direct and reflected sound     * @exception CapabilityNotSetException if appropriate capability is      * not set and this object is part of live or compiled scene graph     */    public void setAttributeGain(float gain) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_ATTRIBUTE_GAIN_WRITE))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes0"));         ((AuralAttributesRetained)this.retained).setAttributeGain(gain);    }    /**     * Retrieve Attribute Gain (amplitude).     * @return gain amplitude scale factor     * @exception CapabilityNotSetException if appropriate capability is      * not set and this object is part of live or compiled scene graph     */    public float getAttributeGain() {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_ATTRIBUTE_GAIN_READ))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes1"));         return ((AuralAttributesRetained)this.retained).getAttributeGain();    }    /**     * Set Attribute Gain Rolloff.     * @param rolloff atmospheric gain scale factor (changing speed of sound)     * @exception CapabilityNotSetException if appropriate capability is      * not set and this object is part of live or compiled scene graph     */    public void setRolloff(float rolloff) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_ROLLOFF_WRITE))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes2"));         ((AuralAttributesRetained)this.retained).setRolloff(rolloff);    }    /**     * Retrieve Attribute Gain Rolloff.     * @return rolloff atmospheric gain scale factor (changing speed of sound)     * @exception CapabilityNotSetException if appropriate capability is      * not set and this object is part of live or compiled scene graph     */    public float getRolloff() {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_ROLLOFF_READ))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes3"));         return ((AuralAttributesRetained)this.retained).getRolloff();    }    /**     * Set Reflective Coefficient.       * Scales the amplitude of the early reflections of reverberated sounds     * @param coefficient reflection/absorption factor applied to reflections     * @exception CapabilityNotSetException if appropriate capability is      * not set and this object is part of live or compiled scene graph     */    public void setReflectionCoefficient(float coefficient) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_REFLECTION_COEFFICIENT_WRITE))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes4"));        ((AuralAttributesRetained)this.retained).setReflectionCoefficient(coefficient);    }    /**     * Retrieve Reflective Coefficient.     * @return reflection coeff reflection/absorption factor     * @exception CapabilityNotSetException if appropriate capability is      * not set and this object is part of live or compiled scene graph     */    public float getReflectionCoefficient() {        if (isLiveOrCompiled())             if (!this.getCapability(ALLOW_REFLECTION_COEFFICIENT_READ))                  throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes21"));         return ((AuralAttributesRetained)this.retained).getReflectionCoefficient();    }    /*********************     *     * Early Reflection Delay      *     ********************/    /**     * Set early Refection Delay Time.     * In this form, the parameter specifies the time between the start of the     * direct, unreflected sound and the start of first order early reflections.     * In this method, this time is explicitly given in milliseconds.     * @param reflectionDelay delay time before start of reverberation     * @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 setReflectionDelay(float reflectionDelay) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_REFLECTION_DELAY_WRITE))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes22"));        ((AuralAttributesRetained)this.retained).setReflectionDelay(reflectionDelay);    }    /**     * Retrieve Reflection Delay Time.     * @return reflection delay time      * @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 getReflectionDelay() {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_REFLECTION_DELAY_READ))                throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes23"));        return ((AuralAttributesRetained)this.retained).getReflectionDelay();    }    /** ******************     *     *  Reverb Coefficient     *     ********************/    /**     * Set Reverb Coefficient.       * Scale the amplitude of the late reflections including the decaying tail     * of reverberated sound.     * @param coefficient reflective/absorptive factor applied to late reflections     * @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 setReverbCoefficient(float coefficient) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_REVERB_COEFFICIENT_WRITE))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes24"));        ((AuralAttributesRetained)this.retained).setReverbCoefficient(coefficient);    }    /**     * Retrieve Reverb Coefficient.     * @return late reflection coeff. reflection/absorption factor     * @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 getReverbCoefficient() {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_REVERB_COEFFICIENT_READ))                throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes25"));        return ((AuralAttributesRetained)this.retained).getReverbCoefficient();    }    /*********************     *     * Reverberation Delay      *     ********************/    /**     * Set Reverberation Delay Time.     * In this form, the parameter specifies the time between the start of the     * direct, unreflected sound and the start of reverberation. In this     * method, this time is explicitly given in milliseconds.     * @param reverbDelay delay time before start of reverberation     * @exception CapabilityNotSetException if appropriate capability is      * not set and this object is part of live or compiled scene graph     */    public void setReverbDelay(float reverbDelay) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_REVERB_DELAY_WRITE))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes5"));        ((AuralAttributesRetained)this.retained).setReverbDelay(reverbDelay);    }    /**     * Retrieve Reverberation Delay Time.     * @return reverb delay time      * @exception CapabilityNotSetException if appropriate capability is      * not set and this object is part of live or compiled scene graph     */    public float getReverbDelay() {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_REVERB_DELAY_READ))                 throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes7"));        return ((AuralAttributesRetained)this.retained).getReverbDelay();    }    /** ******************     *     *  Decay Time     *     ********************/    /**     * Set Decay Time       * Length of time from the start of late reflections reverberation volume     * takes to decay to effective zero (-60 dB of initial signal amplitude).     * @param decayTime of late reflections (reverb) in milliseconds     * @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 setDecayTime(float decayTime) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_DECAY_TIME_WRITE))                throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes28"));        ((AuralAttributesRetained)this.retained).setDecayTime(decayTime);    }    /**     * Retrieve Decay Time.     * @return reverb decay time     * @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 getDecayTime() {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_DECAY_TIME_READ))                throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes29"));        return ((AuralAttributesRetained)this.retained).getDecayTime();    }    /** ******************     *     *  Decay Filter     *     ********************/    /**     * Set Decay Filter      * In this form, reverberation decay filtering is defined as a low-pass     * filter, starting at the given reference frequency.  This allows for     * higher frequencies to be attenuated at a different (typically faster)     * rate than lower frequencies.     * @param frequencyCutoff of reverberation decay low-pass filter     * @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 setDecayFilter(float frequencyCutoff) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_DECAY_FILTER_WRITE))                throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes30"));        ((AuralAttributesRetained)this.retained).setDecayFilter(frequencyCutoff);    }    /**     * Retrieve Decay Filter.     * @return reverb decay filter cutoff frequency     * @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 getDecayFilter() {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_DECAY_FILTER_READ))                throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes31"));        return ((AuralAttributesRetained)this.retained).getDecayFilter();    }    /** ******************     *     *  Diffusion     *     ********************/    /**     * Set Diffusion.      * Sets the echo dispersement of reverberation to an amount between     * the minimum (0.0) to the maximum (1.0) available.  Changing this     * increases/decreases the 'smoothness' of reverb decay.     * @param ratio reverberation echo dispersement factor     * @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 setDiffusion(float ratio) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_DIFFUSION_WRITE))                throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes32"));        ((AuralAttributesRetained)this.retained).setDiffusion(ratio);    }    /**     * Retrieve Diffusion.     * @return reverb diffusion ratio     * @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 getDiffusion() {        if (isLiveOrCompiled())            if(!this.getCapability(ALLOW_DIFFUSION_READ))                throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes33"));        return ((AuralAttributesRetained)this.retained).getDiffusion();    }    /** ******************     *     *  Density     *

⌨️ 快捷键说明

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