public class CausticsFilter extends WholeImageFilter
Modifier and Type | Field and Description |
---|---|
private float |
amount |
private float |
angle |
private int |
bgColor |
private int |
brightness |
private float |
c |
private float |
dispersion |
private float |
s |
private int |
samples |
private float |
scale |
private float |
time |
private float |
turbulence |
originalSpace, transformedSpace
Constructor and Description |
---|
CausticsFilter() |
Modifier and Type | Method and Description |
---|---|
private static int |
add(int rgb,
float brightness) |
private static int |
add(int rgb,
float brightness,
int c) |
private float |
evaluate(float x,
float y) |
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() |
private static float |
turbulence2(float x,
float y,
float time,
float octaves) |
filter, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
private float scale
private float angle
private int brightness
private float amount
private float turbulence
private float dispersion
private float time
private int samples
private int bgColor
private float s
private float c
public CausticsFilter()
public void setScale(float scale)
scale
- the scale of the texture.getScale()
public float getScale()
setScale(float)
public void setBrightness(int brightness)
brightness
- the brightness.getBrightness()
public int getBrightness()
setBrightness(int)
public void setTurbulence(float turbulence)
turbulence
- the turbulence of the texture.getTurbulence()
public float getTurbulence()
setTurbulence(float)
public void setAmount(float amount)
amount
- the amountgetAmount()
public float getAmount()
setAmount(float)
public void setDispersion(float dispersion)
dispersion
- the dispersiongetDispersion()
public float getDispersion()
setDispersion(float)
public void setTime(float time)
time
- the timegetTime()
public float getTime()
setTime(float)
public void setSamples(int samples)
samples
- the number of samplesgetSamples()
public int getSamples()
setSamples(int)
public void setBgColor(int c)
c
- the colorgetBgColor()
public int getBgColor()
setBgColor(int)
protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)
WholeImageFilter
filterPixels
in class WholeImageFilter
width
- the image widthheight
- the image heightinPixels
- the image pixelstransformedSpace
- the output boundsprivate static int add(int rgb, float brightness)
private static int add(int rgb, float brightness, int c)
private static float turbulence2(float x, float y, float time, float octaves)
private float evaluate(float x, float y)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses