Package com.jhlabs.image
Class CausticsFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.WholeImageFilter
-
- com.jhlabs.image.CausticsFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp
,java.io.Serializable
,java.lang.Cloneable
public class CausticsFilter extends WholeImageFilter
A filter which simulates underwater caustics. This can be animated to get a bottom-of-the-swimming-pool effect.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description float
amount
int
brightness
float
dispersion
float
time
float
turbulence
-
Fields inherited from class com.jhlabs.image.WholeImageFilter
originalSpace, transformedSpace
-
-
Constructor Summary
Constructors Constructor Description CausticsFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected float
evaluate(float x, float y)
protected int[]
filterPixels(int width, int height, int[] inPixels, java.awt.Rectangle transformedSpace)
float
getAmount()
int
getBgColor()
int
getBrightness()
float
getDispersion()
int
getSamples()
float
getScale()
float
getTime()
float
getTurbulence()
void
setAmount(float amount)
void
setBgColor(int c)
void
setBrightness(int brightness)
void
setDispersion(float dispersion)
void
setSamples(int samples)
void
setScale(float scale)
void
setTime(float time)
void
setTurbulence(float turbulence)
java.lang.String
toString()
static float
turbulence2(float x, float y, float time, float octaves)
-
Methods inherited from class com.jhlabs.image.WholeImageFilter
filter, transformSpace
-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
Method Detail
-
setScale
public void setScale(float scale)
-
getScale
public float getScale()
-
setBrightness
public void setBrightness(int brightness)
-
getBrightness
public int getBrightness()
-
setTurbulence
public void setTurbulence(float turbulence)
-
getTurbulence
public float getTurbulence()
-
setAmount
public void setAmount(float amount)
-
getAmount
public float getAmount()
-
setDispersion
public void setDispersion(float dispersion)
-
getDispersion
public float getDispersion()
-
setTime
public void setTime(float time)
-
getTime
public float getTime()
-
setSamples
public void setSamples(int samples)
-
getSamples
public int getSamples()
-
setBgColor
public void setBgColor(int c)
-
getBgColor
public int getBgColor()
-
filterPixels
protected int[] filterPixels(int width, int height, int[] inPixels, java.awt.Rectangle transformedSpace)
- Specified by:
filterPixels
in classWholeImageFilter
-
turbulence2
public static float turbulence2(float x, float y, float time, float octaves)
-
evaluate
protected float evaluate(float x, float y)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-