java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.gpuflux.imp3d.shading.ChannelSPD
- All Implemented Interfaces:
Icon,IconSource,ChannelMap,ColorMap,Manageable,Shareable,RenderedIcon
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChannelSPD.Typestatic final ChannelSPDSpectrally black — zero radiance at all wavelengths.static final ChannelSPDSpectrally blue (Smits RGB→SPD basis, R=0 G=0 B=1).static final ChannelSPDSpectrally cyan (R=0 G=1 B=1).static final ChannelSPDDark grey — 25 % reflectance across 380–720 nm.static final ChannelSPDMid grey — 50 % reflectance across 380–720 nm.static final ChannelSPDSpectrally green (Smits RGB→SPD basis, R=0 G=1 B=0).static final ChannelSPDLight grey — 75 % reflectance across 380–720 nm.static final ChannelSPDSpectrally magenta (R=1 G=0 B=1).static final ChannelSPDSpectrally orange (R=1 G=0.647 B=0).static final Phongstatic final Phongstatic final Phongstatic final Phongstatic final Phongstatic final Phongstatic final Phongstatic final Phongstatic final Phongstatic final Phongstatic final Phongstatic final Phongstatic final ChannelSPDSpectrally red (Smits RGB→SPD basis, R=1 G=0 B=0).static final SCOType.Fieldstatic final ChannelSPDSpectrally white — uniform unit reflectance across 380–720 nm.static final ChannelSPDSpectrally yellow (R=1 G=1 B=0). -
Constructor Summary
ConstructorsConstructorDescriptionConstructor, creates a spectral channelChannelSPD(SpectralCurve curve) Constructor, creates a spectral channel with specified spectral curve -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ChannelMapVisitor visitor) intfloatgetFloatValue(ChannelData data, int channel) getImage()getImage(int w, int h) getObjectValue(ChannelData data, int channel) getPreferredIconSize(boolean small) floatbooleanvoidpaintIcon(Component c, Graphics2D g, int x, int y, int w, int h, int state) voidintrenderImage(JobManager jm, BufferedImage img, int y) voidSet spectral curvevoidSet spectral curveMethods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.grogra.math.ChannelMap
getStampMethods inherited from interface de.grogra.pf.ui.RenderedIcon
getStamp
-
Field Details
-
$TYPE
-
spectraldistribution$FIELD
-
BLACK
Spectrally black — zero radiance at all wavelengths. -
WHITE
Spectrally white — uniform unit reflectance across 380–720 nm. -
GRAY
Mid grey — 50 % reflectance across 380–720 nm. -
DARK_GRAY
Dark grey — 25 % reflectance across 380–720 nm. -
LIGHT_GRAY
Light grey — 75 % reflectance across 380–720 nm. -
RED
Spectrally red (Smits RGB→SPD basis, R=1 G=0 B=0). -
GREEN
Spectrally green (Smits RGB→SPD basis, R=0 G=1 B=0). -
BLUE
Spectrally blue (Smits RGB→SPD basis, R=0 G=0 B=1). -
CYAN
Spectrally cyan (R=0 G=1 B=1). -
MAGENTA
Spectrally magenta (R=1 G=0 B=1). -
YELLOW
Spectrally yellow (R=1 G=1 B=0). -
ORANGE
Spectrally orange (R=1 G=0.647 B=0). -
PLAIN_BLACK
-
PLAIN_WHITE
-
PLAIN_GRAY
-
PLAIN_DARK_GRAY
-
PLAIN_LIGHT_GRAY
-
PLAIN_RED
-
PLAIN_GREEN
-
PLAIN_BLUE
-
PLAIN_CYAN
-
PLAIN_MAGENTA
-
PLAIN_YELLOW
-
PLAIN_ORANGE
-
-
Constructor Details
-
ChannelSPD
Constructor, creates a spectral channel with specified spectral curve- Parameters:
curve- spectral curve
-
ChannelSPD
public ChannelSPD()Constructor, creates a spectral channel
-
-
Method Details
-
getManageableType
- Specified by:
getManageableTypein interfaceManageable
-
getSpectraldistribution
-
setSpectraldistribution
Set spectral curve- Parameters:
curve- spectral curve
-
setSpectraldistribution
Set spectral curve- Parameters:
spd- spectral curve
-
getAverageColor
public int getAverageColor()- Specified by:
getAverageColorin interfaceColorMap
-
getFloatValue
- Specified by:
getFloatValuein interfaceChannelMap
-
getObjectValue
- Specified by:
getObjectValuein interfaceChannelMap
-
getIcon
- Specified by:
getIconin interfaceIconSource
-
getPreferredIconSize
- Specified by:
getPreferredIconSizein interfaceIconSource
-
paintIcon
-
getIconSource
- Specified by:
getIconSourcein interfaceIcon
-
prepareIcon
public void prepareIcon()- Specified by:
prepareIconin interfaceIcon
-
isMutable
public boolean isMutable() -
getImage
-
getImage
-
getImageSource
- Specified by:
getImageSourcein interfaceIcon
-
getIconBounds
- Specified by:
getIconBoundsin interfaceIcon
-
accept
- Specified by:
acceptin interfaceChannelMap
-
getSizeRatio
public float getSizeRatio()- Specified by:
getSizeRatioin interfaceRenderedIcon
-
renderImage
- Specified by:
renderImagein interfaceRenderedIcon
-