Class Texture.ColorAccumulator
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.texture.Texture.ColorAccumulator
- Enclosing class:
- Texture
A helper class that accumulates color values for a given area of a bitmap
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accumulate
(TextureBitmap bitmap, int x, int y) Accumulates the color values of the given pixelvoid
reset()
Resets the accumulatorvoid
storeResult
(TextureBitmap bitmap, int x, int y) Stores the accumulated color values in the given 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
Accumulates the color values of the given pixel- Parameters:
bitmap
- The bitmapx
- The x coordinate of the pixely
- The y coordinate of the pixel
-
reset
public void reset()Resets the accumulator -
storeResult
Stores the accumulated color values in the given bitmap- Parameters:
bitmap
- The bitmapx
- The x coordinate of the pixely
- The y coordinate of the pixel
-