Class TurbulenceRable8Bit

All Implemented Interfaces:
RenderableImage, Filter, FilterColorInterpolation, TurbulenceRable

public class TurbulenceRable8Bit extends AbstractColorInterpolationRable implements TurbulenceRable
Creates a sourceless image from a turbulence function.
  • Constructor Details

    • TurbulenceRable8Bit

      public TurbulenceRable8Bit(Rectangle2D region)
    • TurbulenceRable8Bit

      public TurbulenceRable8Bit(Rectangle2D region, int seed, int numOctaves, double baseFreqX, double baseFreqY, boolean stitched, boolean fractalNoise)
  • Method Details

    • getTurbulenceRegion

      public Rectangle2D getTurbulenceRegion()
      Get the turbulence region
      Specified by:
      getTurbulenceRegion in interface TurbulenceRable
    • getBounds2D

      public Rectangle2D getBounds2D()
      Get the turbulence region
      Specified by:
      getBounds2D in interface Filter
      Overrides:
      getBounds2D in class AbstractRable
    • getSeed

      public int getSeed()
      Get the current seed value for the pseudo random number generator.
      Specified by:
      getSeed in interface TurbulenceRable
      Returns:
      The current seed value for the pseudo random number generator.
    • getNumOctaves

      public int getNumOctaves()
      Get the current number of octaves for the noise function .
      Specified by:
      getNumOctaves in interface TurbulenceRable
      Returns:
      The current number of octaves for the noise function .
    • getBaseFrequencyX

      public double getBaseFrequencyX()
      Get the current base fequency in x direction.
      Specified by:
      getBaseFrequencyX in interface TurbulenceRable
      Returns:
      The current base fequency in x direction.
    • getBaseFrequencyY

      public double getBaseFrequencyY()
      Get the current base fequency in y direction.
      Specified by:
      getBaseFrequencyY in interface TurbulenceRable
      Returns:
      The current base fequency in y direction.
    • isStitched

      public boolean isStitched()
      Returns true if the turbulence function is currently stitching tiles.
      Specified by:
      isStitched in interface TurbulenceRable
      Returns:
      true if the turbulence function is currently stitching tiles.
    • isFractalNoise

      public boolean isFractalNoise()
      Returns true if the turbulence function is using fractal noise, instead of turbulence noise.
      Specified by:
      isFractalNoise in interface TurbulenceRable
      Returns:
      true if the turbulence function is using fractal noise, instead of turbulence noise.
    • setTurbulenceRegion

      public void setTurbulenceRegion(Rectangle2D turbulenceRegion)
      Sets the turbulence region
      Specified by:
      setTurbulenceRegion in interface TurbulenceRable
      Parameters:
      turbulenceRegion - region to fill with turbulence function.
    • setSeed

      public void setSeed(int seed)
      Set the seed value for the pseudo random number generator.
      Specified by:
      setSeed in interface TurbulenceRable
      Parameters:
      seed - The new seed value for the pseudo random number generator.
    • setNumOctaves

      public void setNumOctaves(int numOctaves)
      Set the number of octaves for the noise function .
      Specified by:
      setNumOctaves in interface TurbulenceRable
      Parameters:
      numOctaves - The new number of octaves for the noise function .
    • setBaseFrequencyX

      public void setBaseFrequencyX(double baseFreqX)
      Set the base fequency in x direction.
      Specified by:
      setBaseFrequencyX in interface TurbulenceRable
      Parameters:
      baseFreqX - The new base fequency in x direction.
    • setBaseFrequencyY

      public void setBaseFrequencyY(double baseFreqY)
      Set the base fequency in y direction.
      Specified by:
      setBaseFrequencyY in interface TurbulenceRable
      Parameters:
      baseFreqY - The new base fequency in y direction.
    • setStitched

      public void setStitched(boolean stitched)
      Set stitching state for tiles.
      Specified by:
      setStitched in interface TurbulenceRable
      Parameters:
      stitched - true if the turbulence operator should stitch tiles.
    • setFractalNoise

      public void setFractalNoise(boolean fractalNoise)
      Turns on/off fractal noise.
      Specified by:
      setFractalNoise in interface TurbulenceRable
      Parameters:
      fractalNoise - true if fractal noise should be used.
    • createRendering

      public RenderedImage createRendering(RenderContext rc)
      Specified by:
      createRendering in interface RenderableImage