constantspectralcurve.java

来自「Sunflow是一个照片级的渲染系统」· Java 代码 · 共 19 行

JAVA
19
字号
package org.sunflow.image;

/**
 * Very simple class equivalent to a constant spectral curve. Note that this is
 * most likely physically impossible for amplitudes > 0, however this class can
 * be handy since in practice spectral curves end up being integrated against
 * the finite width color matching functions.
 */
public class ConstantSpectralCurve extends SpectralCurve {
    private final float amp;

    public ConstantSpectralCurve(float amp) {
        this.amp = amp;
    }

    public float sample(float lambda) {
        return amp;
    }
}

⌨️ 快捷键说明

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