Class Texture.ColorAccumulator

java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.texture.Texture.ColorAccumulator
Enclosing class:
Texture

public static class Texture.ColorAccumulator extends Object
A helper class that accumulates color values for a given area of a bitmap
  • Field Details

    • r

      public int r
    • g

      public int g
    • b

      public int b
    • a

      public int a
    • pixelCount

      public int pixelCount
  • Constructor Details

    • ColorAccumulator

      public ColorAccumulator()
  • Method Details

    • accumulate

      public void accumulate(TextureBitmap bitmap, int x, int y)
      Accumulates the color values of the given pixel
      Parameters:
      bitmap - The bitmap
      x - The x coordinate of the pixel
      y - The y coordinate of the pixel
    • reset

      public void reset()
      Resets the accumulator
    • storeResult

      public void storeResult(TextureBitmap bitmap, int x, int y)
      Stores the accumulated color values in the given bitmap
      Parameters:
      bitmap - The bitmap
      x - The x coordinate of the pixel
      y - The y coordinate of the pixel