Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.imp3d.spectral
Class SpectralCurve

    java.lang.Object
      de.grogra.persistence.ShareableBase
          de.grogra.imp3d.spectral.SpectralCurve

All Implemented Interfaces:
  Manageable, Shareable

Direct Known Subclasses:
  BlackbodySpectralCurve, ConstantSpectralCurve, IrregularSpectralCurve, RegularSpectralCurve, RGBSpectralCurve

    public abstract class SpectralCurve

extends ShareableBase

This class is an abstract interface to sampled or analytic spectral data.

Field Summary
`static Node.NType` | `$TYPE`

Constructor Summary
`SpectralCurve()`

Method Summary
`abstract float` | `sample(float lambda)` This function determines the actual spectral curve data.
`org.sunflow.image.XYZColor` | `toXYZ()` Convert this curve to a tristimulus CIE XYZ color by integrating against the CIE color matching functions.
`static org.sunflow.image.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 Detail

### $TYPE

    public static final Node.NType $TYPE

Constructor Detail

### SpectralCurve

    public SpectralCurve()

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 org.sunflow.image.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

### toXYZ

    public static final org.sunflow.image.XYZColor toXYZ(float lambda,
                                                         float amplitude)

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD