java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.gpuflux.imp3d.spectral.SpectralCurve
- All Implemented Interfaces:
Manageable
,Shareable
- Direct Known Subclasses:
BlackbodySpectralCurve
,ConstantSpectralCurve
,IrregularSpectralCurve
,RegularSpectralCurve
,RGBSpectralCurve
This class is an abstract interface to sampled or analytic spectral data.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract float
sample
(float lambda) This function determines the actual spectral curve data.final XYZColor
toXYZ()
Convert this curve to a tristimulus CIE XYZ color by integrating against the CIE color matching functions.static final XYZColor
toXYZ
(float lambda, float amplitude) Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.grogra.persistence.Manageable
getManageableType
-
Field Details
-
$TYPE
-
-
Constructor Details
-
SpectralCurve
public SpectralCurve()
-
-
Method Details
-
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
Convert this curve to a tristimulus CIE XYZ color by integrating against the CIE color matching functions.- Returns:
- XYZColor that represents this spectra
-
toXYZ
-