类 LightFilter
- java.lang.Object
-
- org.meteoinfo.image.filter.AbstractBufferedImageOp
-
- org.meteoinfo.image.filter.WholeImageFilter
-
- org.meteoinfo.image.filter.LightFilter
-
- 所有已实现的接口:
BufferedImageOp,Cloneable
- 直接已知子类:
ChromeFilter
public class LightFilter extends WholeImageFilter
A filter which produces lighting and embossing effects.
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 classLightFilter.AmbientLightclassLightFilter.DistantLightstatic classLightFilter.LightA class representing a light.static classLightFilter.MaterialA class representing material properties.classLightFilter.PointLightclassLightFilter.SpotLight
-
字段概要
字段 修饰符和类型 字段 说明 static intAMBIENTstatic intBUMPS_FROM_BEVELUse a custom function as the bump map.static intBUMPS_FROM_IMAGEUse the input image brightness as the bump map.static intBUMPS_FROM_IMAGE_ALPHAUse the input image alpha as the bump map.static intBUMPS_FROM_MAPUse a separate image alpha channel as the bump map.static intCOLORS_CONSTANTUse constant material color.static intCOLORS_FROM_IMAGETake the output colors from the input image.static intDISTANTstatic intPOINTprotected static floatr255static intSPOT-
从类继承的字段 org.meteoinfo.image.filter.WholeImageFilter
originalSpace, transformedSpace
-
-
构造器概要
构造器 构造器 说明 LightFilter()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddLight(LightFilter.Light light)protected int[]filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)Actually filter the pixels.Function2DgetBumpFunction()floatgetBumpHeight()intgetBumpShape()floatgetBumpSoftness()intgetBumpSource()intgetColorSource()intgetDiffuseColor()ImagegetEnvironmentMap()VectorgetLights()LightFilter.MaterialgetMaterial()floatgetViewDistance()protected Color4fphongShade(Vector3f position, Vector3f viewpoint, Vector3f normal, Color4f diffuseColor, Color4f specularColor, LightFilter.Material material, LightFilter.Light[] lightsArray)voidremoveLight(LightFilter.Light light)voidsetBumpFunction(Function2D bumpFunction)voidsetBumpHeight(float bumpHeight)voidsetBumpShape(int bumpShape)voidsetBumpSoftness(float bumpSoftness)voidsetBumpSource(int bumpSource)voidsetColorSource(int colorSource)voidsetDiffuseColor(int diffuseColor)voidsetEnvironmentMap(BufferedImage environmentMap)protected voidsetFromRGB(Color4f c, int argb)voidsetMaterial(LightFilter.Material material)voidsetViewDistance(float viewDistance)StringtoString()-
从类继承的方法 org.meteoinfo.image.filter.WholeImageFilter
filter, transformSpace
-
从类继承的方法 org.meteoinfo.image.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
字段详细资料
-
COLORS_FROM_IMAGE
public static final int COLORS_FROM_IMAGE
Take the output colors from the input image.- 另请参阅:
- 常量字段值
-
COLORS_CONSTANT
public static final int COLORS_CONSTANT
Use constant material color.- 另请参阅:
- 常量字段值
-
BUMPS_FROM_IMAGE
public static final int BUMPS_FROM_IMAGE
Use the input image brightness as the bump map.- 另请参阅:
- 常量字段值
-
BUMPS_FROM_IMAGE_ALPHA
public static final int BUMPS_FROM_IMAGE_ALPHA
Use the input image alpha as the bump map.- 另请参阅:
- 常量字段值
-
BUMPS_FROM_MAP
public static final int BUMPS_FROM_MAP
Use a separate image alpha channel as the bump map.- 另请参阅:
- 常量字段值
-
BUMPS_FROM_BEVEL
public static final int BUMPS_FROM_BEVEL
Use a custom function as the bump map.- 另请参阅:
- 常量字段值
-
r255
protected static final float r255
- 另请参阅:
- 常量字段值
-
AMBIENT
public static final int AMBIENT
- 另请参阅:
- 常量字段值
-
DISTANT
public static final int DISTANT
- 另请参阅:
- 常量字段值
-
POINT
public static final int POINT
- 另请参阅:
- 常量字段值
-
SPOT
public static final int SPOT
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
setMaterial
public void setMaterial(LightFilter.Material material)
-
getMaterial
public LightFilter.Material getMaterial()
-
setBumpFunction
public void setBumpFunction(Function2D bumpFunction)
-
getBumpFunction
public Function2D getBumpFunction()
-
setBumpHeight
public void setBumpHeight(float bumpHeight)
-
getBumpHeight
public float getBumpHeight()
-
setBumpSoftness
public void setBumpSoftness(float bumpSoftness)
-
getBumpSoftness
public float getBumpSoftness()
-
setBumpShape
public void setBumpShape(int bumpShape)
-
getBumpShape
public int getBumpShape()
-
setViewDistance
public void setViewDistance(float viewDistance)
-
getViewDistance
public float getViewDistance()
-
setEnvironmentMap
public void setEnvironmentMap(BufferedImage environmentMap)
-
getEnvironmentMap
public Image getEnvironmentMap()
-
setColorSource
public void setColorSource(int colorSource)
-
getColorSource
public int getColorSource()
-
setBumpSource
public void setBumpSource(int bumpSource)
-
getBumpSource
public int getBumpSource()
-
setDiffuseColor
public void setDiffuseColor(int diffuseColor)
-
getDiffuseColor
public int getDiffuseColor()
-
addLight
public void addLight(LightFilter.Light light)
-
removeLight
public void removeLight(LightFilter.Light light)
-
getLights
public Vector getLights()
-
setFromRGB
protected void setFromRGB(Color4f c, int argb)
-
filterPixels
protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)从类复制的说明:WholeImageFilterActually filter the pixels.- 指定者:
filterPixels在类中WholeImageFilter- 参数:
width- the image widthheight- the image heightinPixels- the image pixelstransformedSpace- the output bounds- 返回:
- the output pixels
-
phongShade
protected Color4f phongShade(Vector3f position, Vector3f viewpoint, Vector3f normal, Color4f diffuseColor, Color4f specularColor, LightFilter.Material material, LightFilter.Light[] lightsArray)
-
-