org.jscience.media.pictures.filters
Class LightFilter

java.lang.Object
  extended by java.awt.image.ImageFilter
      extended by org.jscience.media.pictures.filters.WholeImageFilter
          extended by org.jscience.media.pictures.filters.LightFilter
All Implemented Interfaces:
java.awt.image.ImageConsumer, java.io.Serializable, java.lang.Cloneable

public class LightFilter
extends WholeImageFilter
implements java.io.Serializable

DOCUMENT ME!

See Also:
Serialized Form

Nested Class Summary
 class LightFilter.AmbientLight
          DOCUMENT ME!
 class LightFilter.DistantLight
          DOCUMENT ME!
static class LightFilter.Light
          DOCUMENT ME!
static class LightFilter.Material
          DOCUMENT ME!
 class LightFilter.NormalEvaluator
          DOCUMENT ME!
 class LightFilter.PointLight
          DOCUMENT ME!
 class LightFilter.SpotLight
          DOCUMENT ME!
 
Field Summary
static int AMBIENT
          DOCUMENT ME!
static int BUMPS_FROM_BEVEL
          DOCUMENT ME!
static int BUMPS_FROM_IMAGE
          DOCUMENT ME!
static int BUMPS_FROM_MAP
          DOCUMENT ME!
static int COLORS_CONSTANT
          DOCUMENT ME!
static int COLORS_FROM_ENVIRONMENT
          DOCUMENT ME!
static int COLORS_FROM_IMAGE
          DOCUMENT ME!
static int DISTANT
          DOCUMENT ME!
 LightFilter.NormalEvaluator normalEvaluator
          DOCUMENT ME!
static int POINT
          DOCUMENT ME!
static int SPOT
          DOCUMENT ME!
 
Fields inherited from class org.jscience.media.pictures.filters.WholeImageFilter
canFilterIndexColorModel, defaultRGBModel, inBytePixels, inPixels, originalSpace, transformedSpace
 
Fields inherited from class java.awt.image.ImageFilter
consumer
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
LightFilter()
          Creates a new LightFilter object.
 
Method Summary
 void addLight(LightFilter.Light light)
          DOCUMENT ME!
 Function2D getBumpFunction()
          DOCUMENT ME!
 float getBumpHeight()
          DOCUMENT ME!
 int getBumpSource()
          DOCUMENT ME!
 int getColorSource()
          DOCUMENT ME!
 int getDiffuseColor()
          DOCUMENT ME!
 java.awt.Image getEnvironmentMap()
          DOCUMENT ME!
 java.util.Vector getLights()
          DOCUMENT ME!
 float getViewDistance()
          DOCUMENT ME!
 void imageComplete(int status)
          DOCUMENT ME!
 org.jscience.media.pictures.filters.LightFilter.ARGB phongShade(org.jscience.media.pictures.filters.LightFilter.Vector3D position, org.jscience.media.pictures.filters.LightFilter.Vector3D viewpoint, org.jscience.media.pictures.filters.LightFilter.Vector3D normal, org.jscience.media.pictures.filters.LightFilter.ARGB diffuseColor, org.jscience.media.pictures.filters.LightFilter.ARGB specularColor, LightFilter.Material material, LightFilter.Light[] lightsArray)
          DOCUMENT ME!
 void removeLight(LightFilter.Light light)
          DOCUMENT ME!
 void setBumpFunction(Function2D bumpFunction)
          DOCUMENT ME!
 void setBumpHeight(float bumpHeight)
          DOCUMENT ME!
 void setBumpSource(int bumpSource)
          DOCUMENT ME!
 void setColorSource(int colorSource)
          DOCUMENT ME!
 void setDiffuseColor(int diffuseColor)
          DOCUMENT ME!
 void setEnvironmentMap(java.awt.Image environmentMap)
          DOCUMENT ME!
 void setViewDistance(float viewDistance)
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.media.pictures.filters.WholeImageFilter
setColorModel, setDimensions, setPixels, setPixels, transformSpace
 
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, resendTopDownLeftRight, setHints, setProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COLORS_FROM_IMAGE

public static final int COLORS_FROM_IMAGE
DOCUMENT ME!

See Also:
Constant Field Values

COLORS_CONSTANT

public static final int COLORS_CONSTANT
DOCUMENT ME!

See Also:
Constant Field Values

COLORS_FROM_ENVIRONMENT

public static final int COLORS_FROM_ENVIRONMENT
DOCUMENT ME!

See Also:
Constant Field Values

BUMPS_FROM_IMAGE

public static final int BUMPS_FROM_IMAGE
DOCUMENT ME!

See Also:
Constant Field Values

BUMPS_FROM_MAP

public static final int BUMPS_FROM_MAP
DOCUMENT ME!

See Also:
Constant Field Values

BUMPS_FROM_BEVEL

public static final int BUMPS_FROM_BEVEL
DOCUMENT ME!

See Also:
Constant Field Values

AMBIENT

public static final int AMBIENT
DOCUMENT ME!

See Also:
Constant Field Values

DISTANT

public static final int DISTANT
DOCUMENT ME!

See Also:
Constant Field Values

POINT

public static final int POINT
DOCUMENT ME!

See Also:
Constant Field Values

SPOT

public static final int SPOT
DOCUMENT ME!

See Also:
Constant Field Values

normalEvaluator

public LightFilter.NormalEvaluator normalEvaluator
DOCUMENT ME!

Constructor Detail

LightFilter

public LightFilter()
Creates a new LightFilter object.

Method Detail

setBumpFunction

public void setBumpFunction(Function2D bumpFunction)
DOCUMENT ME!

Parameters:
bumpFunction - DOCUMENT ME!

getBumpFunction

public Function2D getBumpFunction()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setBumpHeight

public void setBumpHeight(float bumpHeight)
DOCUMENT ME!

Parameters:
bumpHeight - DOCUMENT ME!

getBumpHeight

public float getBumpHeight()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setViewDistance

public void setViewDistance(float viewDistance)
DOCUMENT ME!

Parameters:
viewDistance - DOCUMENT ME!

getViewDistance

public float getViewDistance()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setDiffuseColor

public void setDiffuseColor(int diffuseColor)
DOCUMENT ME!

Parameters:
diffuseColor - DOCUMENT ME!

getDiffuseColor

public int getDiffuseColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setEnvironmentMap

public void setEnvironmentMap(java.awt.Image environmentMap)
DOCUMENT ME!

Parameters:
environmentMap - DOCUMENT ME!
Throws:
java.lang.RuntimeException - DOCUMENT ME!

getEnvironmentMap

public java.awt.Image getEnvironmentMap()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setColorSource

public void setColorSource(int colorSource)
DOCUMENT ME!

Parameters:
colorSource - DOCUMENT ME!

getColorSource

public int getColorSource()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setBumpSource

public void setBumpSource(int bumpSource)
DOCUMENT ME!

Parameters:
bumpSource - DOCUMENT ME!

getBumpSource

public int getBumpSource()
DOCUMENT ME!

Returns:
DOCUMENT ME!

addLight

public void addLight(LightFilter.Light light)
DOCUMENT ME!

Parameters:
light - DOCUMENT ME!

removeLight

public void removeLight(LightFilter.Light light)
DOCUMENT ME!

Parameters:
light - DOCUMENT ME!

getLights

public java.util.Vector getLights()
DOCUMENT ME!

Returns:
DOCUMENT ME!

imageComplete

public void imageComplete(int status)
DOCUMENT ME!

Specified by:
imageComplete in interface java.awt.image.ImageConsumer
Overrides:
imageComplete in class java.awt.image.ImageFilter
Parameters:
status - DOCUMENT ME!

phongShade

public org.jscience.media.pictures.filters.LightFilter.ARGB phongShade(org.jscience.media.pictures.filters.LightFilter.Vector3D position,
                                                                       org.jscience.media.pictures.filters.LightFilter.Vector3D viewpoint,
                                                                       org.jscience.media.pictures.filters.LightFilter.Vector3D normal,
                                                                       org.jscience.media.pictures.filters.LightFilter.ARGB diffuseColor,
                                                                       org.jscience.media.pictures.filters.LightFilter.ARGB specularColor,
                                                                       LightFilter.Material material,
                                                                       LightFilter.Light[] lightsArray)
DOCUMENT ME!

Parameters:
position - DOCUMENT ME!
viewpoint - DOCUMENT ME!
normal - DOCUMENT ME!
diffuseColor - DOCUMENT ME!
specularColor - DOCUMENT ME!
material - DOCUMENT ME!
lightsArray - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!