Package org.sunflow.image
Class SpectralCurve
- java.lang.Object
-
- org.sunflow.image.SpectralCurve
-
- Direct Known Subclasses:
BlackbodySpectrum,ChromaticitySpectrum,ConstantSpectralCurve,IrregularSpectralCurve,RegularSpectralCurve
public abstract class SpectralCurve extends java.lang.ObjectThis class is an abstract interface to sampled or analytic spectral data.
-
-
Constructor Summary
Constructors Constructor Description SpectralCurve()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract floatsample(float lambda)This function determines the actual spectral curve data.XYZColortoXYZ()Convert this curve to a tristimulus CIE XYZ color by integrating against the CIE color matching functions.
-
-
-
Method Detail
-
sample
public abstract float sample(float lambda)
This function determines the actual spectral curve data. Note that the lambda parameter is assumed to be in nanometers.- Parameters:
lambda- wavelength to sample in nanometers- Returns:
- the value of the spectral curve at this point
-
toXYZ
public final XYZColor toXYZ()
Convert this curve to a tristimulus CIE XYZ color by integrating against the CIE color matching functions.- Returns:
- XYZColor that represents this spectra
-
-