public final class ChromaticSpectralCurve extends SpectralCurve
ChromaticSpectralCurve is an implementation of SpectralCurve that contains chromaticity pairs.
This class is immutable and therefore suitable for concurrent use without external synchronization.
| Constructor and Description |
|---|
ChromaticSpectralCurve(float x,
float y)
Constructs a new
ChromaticSpectralCurve instance given the chromaticity pair of x and y. |
| Modifier and Type | Method and Description |
|---|---|
static float[] |
getS0XYZ()
Returns a
float array with the RGB-values of S0XYZ. |
static float[] |
getS1XYZ()
Returns a
float array with the RGB-values of S1XYZ. |
static float[] |
getS2XYZ()
Returns a
float array with the RGB-values of S2XYZ. |
static Color |
getXYZ(float x,
float y)
|
float |
sample(float lambda)
Returns a sample based on the wavelength
lambda in nanometers. |
toXYZpublic ChromaticSpectralCurve(float x,
float y)
ChromaticSpectralCurve instance given the chromaticity pair of x and y.x - the X of the chromaticity pairy - the Y of the chromaticity pairpublic float sample(float lambda)
lambda in nanometers.sample in class SpectralCurvelambda - the wavelength in nanometerslambda in nanometerspublic static Color getXYZ(float x, float y)
x - the X of the chromaticity pairy - the Y of the chromaticity pairColor given x and ypublic static float[] getS0XYZ()
float array with the RGB-values of S0XYZ.float array with the RGB-values of S0XYZpublic static float[] getS1XYZ()
float array with the RGB-values of S1XYZ.float array with the RGB-values of S1XYZpublic static float[] getS2XYZ()
float array with the RGB-values of S2XYZ.float array with the RGB-values of S2XYZ