com.jhlabs.image
Class CausticsFilter
- BufferedImageOp, Cloneable
public class CausticsFilter
A filter which simulates underwater caustics. This can be animated to get a bottom-of-the-swimming-pool effect.
protected int[] | filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace) - Actually filter the pixels.
|
float | getAmount() - Get the amount of effect.
|
int | getBgColor() - Get the background color.
|
int | getBrightness() - Get the brightness.
|
float | getDispersion() - Get the dispersion.
|
int | getSamples() - Get the number of samples per pixel.
|
float | getScale() - Returns the scale of the texture.
|
float | getTime() - Set the time.
|
float | getTurbulence() - Returns the turbulence of the effect.
|
void | setAmount(float amount) - Set the amount of effect.
|
void | setBgColor(int c) - Set the background color.
|
void | setBrightness(int brightness) - Set the brightness.
|
void | setDispersion(float dispersion) - Set the dispersion.
|
void | setSamples(int samples) - Set the number of samples per pixel.
|
void | setScale(float scale) - Specifies the scale of the texture.
|
void | setTime(float time) - Set the time.
|
void | setTurbulence(float turbulence) - Specifies the turbulence of the texture.
|
String | toString()
|
CausticsFilter
public CausticsFilter()
Construct a WholeImageFilter.
filterPixels
protected int[] filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace)
Actually filter the pixels.
- filterPixels in interface WholeImageFilter
width
- the image widthheight
- the image heightinPixels
- the image pixelstransformedSpace
- the output bounds
getAmount
public float getAmount()
Get the amount of effect.
getBgColor
public int getBgColor()
Get the background color.
getBrightness
public int getBrightness()
Get the brightness.
getDispersion
public float getDispersion()
Get the dispersion.
getSamples
public int getSamples()
Get the number of samples per pixel.
getScale
public float getScale()
Returns the scale of the texture.
- the scale of the texture.
getTime
public float getTime()
Set the time.
getTurbulence
public float getTurbulence()
Returns the turbulence of the effect.
- the turbulence of the effect.
setAmount
public void setAmount(float amount)
Set the amount of effect.
setBgColor
public void setBgColor(int c)
Set the background color.
setBrightness
public void setBrightness(int brightness)
Set the brightness.
brightness
- the brightness.
setDispersion
public void setDispersion(float dispersion)
Set the dispersion.
dispersion
- the dispersion
setSamples
public void setSamples(int samples)
Set the number of samples per pixel. More samples means better quality, but slower rendering.
samples
- the number of samples
setScale
public void setScale(float scale)
Specifies the scale of the texture.
scale
- the scale of the texture.
setTime
public void setTime(float time)
Set the time. Use this to animate the effect.
setTurbulence
public void setTurbulence(float turbulence)
Specifies the turbulence of the texture.
turbulence
- the turbulence of the texture.
toString
public String toString()