BufferedImageOp, CloneableChromeFilterpublic class LightFilter extends WholeImageFilter
| 限定符和类型 | 类 | 说明 |
|---|---|---|
class |
LightFilter.AmbientLight |
|
class |
LightFilter.DistantLight |
|
static class |
LightFilter.Light |
A class representing a light.
|
static class |
LightFilter.Material |
A class representing material properties.
|
class |
LightFilter.PointLight |
|
class |
LightFilter.SpotLight |
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
AMBIENT |
|
static int |
BUMPS_FROM_BEVEL |
Use a custom function as the bump map.
|
static int |
BUMPS_FROM_IMAGE |
Use the input image brightness as the bump map.
|
static int |
BUMPS_FROM_IMAGE_ALPHA |
Use the input image alpha as the bump map.
|
static int |
BUMPS_FROM_MAP |
Use a separate image alpha channel as the bump map.
|
static int |
COLORS_CONSTANT |
Use constant material color.
|
static int |
COLORS_FROM_IMAGE |
Take the output colors from the input image.
|
static int |
DISTANT |
|
static int |
POINT |
|
protected static float |
r255 |
|
static int |
SPOT |
originalSpace, transformedSpace| 构造器 | 说明 |
|---|---|
LightFilter() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addLight(LightFilter.Light light) |
|
protected int[] |
filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace) |
Actually filter the pixels.
|
Function2D |
getBumpFunction() |
|
float |
getBumpHeight() |
|
int |
getBumpShape() |
|
float |
getBumpSoftness() |
|
int |
getBumpSource() |
|
int |
getColorSource() |
|
int |
getDiffuseColor() |
|
Image |
getEnvironmentMap() |
|
Vector |
getLights() |
|
LightFilter.Material |
getMaterial() |
|
float |
getViewDistance() |
|
protected Color4f |
phongShade(Vector3f position,
Vector3f viewpoint,
Vector3f normal,
Color4f diffuseColor,
Color4f specularColor,
LightFilter.Material material,
LightFilter.Light[] lightsArray) |
|
void |
removeLight(LightFilter.Light light) |
|
void |
setBumpFunction(Function2D bumpFunction) |
|
void |
setBumpHeight(float bumpHeight) |
|
void |
setBumpShape(int bumpShape) |
|
void |
setBumpSoftness(float bumpSoftness) |
|
void |
setBumpSource(int bumpSource) |
|
void |
setColorSource(int colorSource) |
|
void |
setDiffuseColor(int diffuseColor) |
|
void |
setEnvironmentMap(BufferedImage environmentMap) |
|
protected void |
setFromRGB(Color4f c,
int argb) |
|
void |
setMaterial(LightFilter.Material material) |
|
void |
setViewDistance(float viewDistance) |
|
String |
toString() |
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGBfilter, transformSpacepublic 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
protected static final float r255
public static final int AMBIENT
public static final int DISTANT
public static final int POINT
public static final int SPOT
public void setMaterial(LightFilter.Material material)
public LightFilter.Material getMaterial()
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 setBumpShape(int bumpShape)
public int getBumpShape()
public void setViewDistance(float viewDistance)
public float getViewDistance()
public void setEnvironmentMap(BufferedImage environmentMap)
public Image getEnvironmentMap()
public void setColorSource(int colorSource)
public int getColorSource()
public void setBumpSource(int bumpSource)
public int getBumpSource()
public void setDiffuseColor(int diffuseColor)
public int getDiffuseColor()
public void addLight(LightFilter.Light light)
public void removeLight(LightFilter.Light light)
public Vector getLights()
protected void setFromRGB(Color4f c, int argb)
protected int[] filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace)
WholeImageFilterfilterPixels 在类中 WholeImageFilterwidth - the image widthheight - the image heightinPixels - the image pixelstransformedSpace - the output boundsprotected Color4f phongShade(Vector3f position, Vector3f viewpoint, Vector3f normal, Color4f diffuseColor, Color4f specularColor, LightFilter.Material material, LightFilter.Light[] lightsArray)
Copyright © 2019. All rights reserved.