Interface DiffuseLightingRable
- All Superinterfaces:
Filter, FilterColorInterpolation, RenderableImage
- All Known Implementing Classes:
DiffuseLightingRable8Bit
This filter primitive lights an image using the alpha channel as a bump map.
The resulting image is an RGBA opaque image based on the light color
with alpha = 1.0 everywhere. The lighting calculation follows the standard diffuse
component of the Phong lighting model. The resulting image depends on the light color,
light position and surface geometry of the input bump map.
This filter follows the specification of the feDiffuseLighting filter in
the SVG 1.0 specification.
-
Field Summary
Fields inherited from interface RenderableImage
HINTS_OBSERVED -
Method Summary
Modifier and TypeMethodDescriptiondoublegetKd()double[]Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient.getLight()Returns the source to be filtereddoublevoidsetKd(double kd) Sets the diffuse constant, or kdvoidsetKernelUnitLength(double[] kernelUnitLength) Sets the min [dx,dy] distance in user space for evaluation of the sobel gradient.voidvoidsetLitRegion(Rectangle2D litRegion) Sets the litRegion for this filtervoidSets the source to be filteredvoidsetSurfaceScale(double surfaceScale) Sets the surface scaleMethods inherited from interface Filter
getBounds2D, getDependencyRegion, getDirtyRegion, getTimeStampMethods inherited from interface FilterColorInterpolation
getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinearMethods inherited from interface RenderableImage
createDefaultRendering, createRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic
-
Method Details
-
getSource
Filter getSource()Returns the source to be filtered -
setSource
Sets the source to be filtered -
getLight
Light getLight()- Returns:
- Light object used for the diffuse lighting
-
setLight
- Parameters:
light- New Light object
-
getSurfaceScale
double getSurfaceScale()- Returns:
- surfaceScale
-
setSurfaceScale
void setSurfaceScale(double surfaceScale) Sets the surface scale -
getKd
double getKd()- Returns:
- diffuse constant, or kd.
-
setKd
void setKd(double kd) Sets the diffuse constant, or kd -
getLitRegion
Rectangle2D getLitRegion()- Returns:
- the litRegion for this filter
-
setLitRegion
Sets the litRegion for this filter -
getKernelUnitLength
double[] getKernelUnitLength()Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient. -
setKernelUnitLength
void setKernelUnitLength(double[] kernelUnitLength) Sets the min [dx,dy] distance in user space for evaluation of the sobel gradient. If set to zero or null then device space will be used.
-