java.lang.Object
org.apache.batik.ext.awt.image.rendered.BumpMap

public final class BumpMap extends Object
Default BumpMap implementation.
Version:
$Id: BumpMap.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private double
    User space to device space scale factors
    private double
    User space to device space scale factors
    private double
    Surface scale used in the normal computation
    private double
    Surface scale used in the normal computation
    private double
    Surface scale used in the normal computation
    Image whose alpha channel is used for the normal calculation
  • Constructor Summary

    Constructors
    Constructor
    Description
    BumpMap(RenderedImage texture, double surfaceScale, double scaleX, double scaleY)
    Stores the normals for this bumpMap.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[][][]
    getNormalArray(int x, int y, int w, int h)
     
    double
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • texture

      private RenderedImage texture
      Image whose alpha channel is used for the normal calculation
    • surfaceScale

      private double surfaceScale
      Surface scale used in the normal computation
    • surfaceScaleX

      private double surfaceScaleX
      Surface scale used in the normal computation
    • surfaceScaleY

      private double surfaceScaleY
      Surface scale used in the normal computation
    • scaleX

      private double scaleX
      User space to device space scale factors
    • scaleY

      private double scaleY
      User space to device space scale factors
  • Constructor Details

    • BumpMap

      public BumpMap(RenderedImage texture, double surfaceScale, double scaleX, double scaleY)
      Stores the normals for this bumpMap. scaleX and scaleY are the user space to device space scales.
  • Method Details

    • getSurfaceScale

      public double getSurfaceScale()
      Returns:
      surface scale used by this bump map.
    • getNormalArray

      public double[][][] getNormalArray(int x, int y, int w, int h)
      Parameters:
      x - x-axis coordinate for which the normal is computed
      y - y-axis coordinate for which the normal is computed