Package org.sunflow.image
Class ConstantSpectralCurve
- java.lang.Object
-
- org.sunflow.image.SpectralCurve
-
- org.sunflow.image.ConstantSpectralCurve
-
public class ConstantSpectralCurve extends SpectralCurve
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.
-
-
Field Summary
Fields Modifier and Type Field Description private float
amp
-
Constructor Summary
Constructors Constructor Description ConstantSpectralCurve(float amp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
sample(float lambda)
This function determines the actual spectral curve data.-
Methods inherited from class org.sunflow.image.SpectralCurve
toXYZ
-
-
-
-
Method Detail
-
sample
public float sample(float lambda)
Description copied from class:SpectralCurve
This function determines the actual spectral curve data. Note that the lambda parameter is assumed to be in nanometers.- Specified by:
sample
in classSpectralCurve
- Parameters:
lambda
- wavelength to sample in nanometers- Returns:
- the value of the spectral curve at this point
-
-