public class ShadeFilter extends WholeImageFilter
Modifier and Type | Field and Description |
---|---|
private Function2D |
bumpFunction |
private float |
bumpHeight |
static int |
BUMPS_FROM_BEVEL |
static int |
BUMPS_FROM_IMAGE |
static int |
BUMPS_FROM_IMAGE_ALPHA |
static int |
BUMPS_FROM_MAP |
private float |
bumpSoftness |
private int |
bumpSource |
static int |
COLORS_CONSTANT |
static int |
COLORS_FROM_IMAGE |
private int |
colorSource |
private Color4f |
diffuse_color |
private int |
envHeight |
private BufferedImage |
environmentMap |
private int[] |
envPixels |
private int |
envWidth |
private Vector3f |
l |
private Vector3f |
n |
protected static float |
r255 |
private Color4f |
shadedColor |
private Color4f |
specular_color |
private Vector3f |
tmpv |
private Vector3f |
tmpv2 |
private Vector3f |
v |
private float |
viewDistance |
originalSpace, transformedSpace
Constructor and Description |
---|
ShadeFilter() |
Modifier and Type | Method and Description |
---|---|
protected int[] |
filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace)
Actually filter the pixels.
|
Function2D |
getBumpFunction() |
float |
getBumpHeight() |
float |
getBumpSoftness() |
int |
getBumpSource() |
BufferedImage |
getEnvironmentMap() |
private int |
getEnvironmentMapP(Vector3f normal,
int[] inPixels,
int width,
int height) |
void |
setBumpFunction(Function2D bumpFunction) |
void |
setBumpHeight(float bumpHeight) |
void |
setBumpSoftness(float bumpSoftness) |
void |
setBumpSource(int bumpSource) |
void |
setEnvironmentMap(BufferedImage environmentMap) |
protected void |
setFromRGB(Color4f c,
int argb) |
String |
toString() |
filter, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
public static final int COLORS_FROM_IMAGE
public static final int COLORS_CONSTANT
public static final int BUMPS_FROM_IMAGE
public static final int BUMPS_FROM_IMAGE_ALPHA
public static final int BUMPS_FROM_MAP
public static final int BUMPS_FROM_BEVEL
private float bumpHeight
private float bumpSoftness
private float viewDistance
private int colorSource
private int bumpSource
private Function2D bumpFunction
private BufferedImage environmentMap
private int[] envPixels
private int envWidth
private int envHeight
private Color4f shadedColor
private Color4f diffuse_color
private Color4f specular_color
protected static final float r255
public ShadeFilter()
public void setBumpFunction(Function2D bumpFunction)
public Function2D getBumpFunction()
public void setBumpHeight(float bumpHeight)
public float getBumpHeight()
public void setBumpSoftness(float bumpSoftness)
public float getBumpSoftness()
public void setEnvironmentMap(BufferedImage environmentMap)
public BufferedImage getEnvironmentMap()
public void setBumpSource(int bumpSource)
public int getBumpSource()
protected void setFromRGB(Color4f c, int argb)
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 int getEnvironmentMapP(Vector3f normal, int[] inPixels, int width, int height)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses