Class SpecularLightingRable8Bit

    • Field Detail

      • surfaceScale

        private double surfaceScale
        Surface Scale
      • ks

        private double ks
        Specular constant
      • specularExponent

        private double specularExponent
        Specular exponent
      • light

        private Light light
        Light used for the specular lighting computations
      • litRegion

        private java.awt.geom.Rectangle2D litRegion
        Lit Area
      • kernelUnitLength

        private float[] kernelUnitLength
        The dx/dy to use in user space for the sobel gradient.
    • Constructor Detail

      • SpecularLightingRable8Bit

        public SpecularLightingRable8Bit​(Filter src,
                                         java.awt.geom.Rectangle2D litRegion,
                                         Light light,
                                         double ks,
                                         double specularExponent,
                                         double surfaceScale,
                                         double[] kernelUnitLength)
    • Method Detail

      • getLitRegion

        public java.awt.geom.Rectangle2D getLitRegion()
        Returns this filter's litRegion
        Specified by:
        getLitRegion in interface SpecularLightingRable
        Returns:
        the litRegion for this filter
      • setLitRegion

        public void setLitRegion​(java.awt.geom.Rectangle2D litRegion)
        Set this filter's litRegion
        Specified by:
        setLitRegion in interface SpecularLightingRable
      • setKs

        public void setKs​(double ks)
        Sets the specular constant, or ks
        Specified by:
        setKs in interface SpecularLightingRable
      • getKernelUnitLength

        public double[] getKernelUnitLength()
        Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient.
        Specified by:
        getKernelUnitLength in interface SpecularLightingRable
      • setKernelUnitLength

        public 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.
        Specified by:
        setKernelUnitLength in interface SpecularLightingRable
      • createRendering

        public java.awt.image.RenderedImage createRendering​(java.awt.image.renderable.RenderContext rc)
        Specified by:
        createRendering in interface java.awt.image.renderable.RenderableImage