com.jhlabs.image

Class LightFilter.Light

Enclosing Class:
LightFilter
Implemented Interfaces:
Cloneable
Known Direct Subclasses:
LightFilter.AmbientLight, LightFilter.DistantLight, LightFilter.PointLight, LightFilter.SpotLight

public static class LightFilter.Light
extends java.lang.Object
implements Cloneable

A class representing a light.

Constructor Summary

Light()
Light(float azimuth, float elevation, float intensity)

Method Summary

Object
clone()
float
getAzimuth()
float
getCentreX()
Get the centre of the light in the X direction as a proportion of the image size.
float
getCentreY()
Get the centre of the light in the Y direction as a proportion of the image size.
int
getColor()
float
getConeAngle()
float
getDistance()
float
getElevation()
float
getFocus()
float
getIntensity()
void
prepare(int width, int height)
Prepare the light for rendering.
void
setAzimuth(float azimuth)
void
setCentreX(float x)
Set the centre of the light in the X direction as a proportion of the image size.
void
setCentreY(float y)
Set the centre of the light in the Y direction as a proportion of the image size.
void
setColor(int color)
void
setConeAngle(float coneAngle)
void
setDistance(float distance)
void
setElevation(float elevation)
void
setFocus(float focus)
void
setIntensity(float intensity)
String
toString()

Constructor Details

Light

public Light()

Light

public Light(float azimuth,
             float elevation,
             float intensity)

Method Details

clone

public Object clone()

getAzimuth

public float getAzimuth()

getCentreX

public float getCentreX()
Get the centre of the light in the X direction as a proportion of the image size.
Returns:
the center

getCentreY

public float getCentreY()
Get the centre of the light in the Y direction as a proportion of the image size.
Returns:
the center

getColor

public int getColor()

getConeAngle

public float getConeAngle()

getDistance

public float getDistance()

getElevation

public float getElevation()

getFocus

public float getFocus()

getIntensity

public float getIntensity()

prepare

public void prepare(int width,
                    int height)
Prepare the light for rendering.
Parameters:
width - the output image width
height - the output image height

setAzimuth

public void setAzimuth(float azimuth)

setCentreX

public void setCentreX(float x)
Set the centre of the light in the X direction as a proportion of the image size.
Parameters:

setCentreY

public void setCentreY(float y)
Set the centre of the light in the Y direction as a proportion of the image size.
Parameters:

setColor

public void setColor(int color)

setConeAngle

public void setConeAngle(float coneAngle)

setDistance

public void setDistance(float distance)

setElevation

public void setElevation(float elevation)

setFocus

public void setFocus(float focus)

setIntensity

public void setIntensity(float intensity)

toString

public String toString()