Package com.jhlabs.image
Class LightFilter.Light
java.lang.Object
com.jhlabs.image.LightFilter.Light
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
LightFilter.AmbientLight,LightFilter.DistantLight,LightFilter.PointLight,LightFilter.SpotLight
- Enclosing class:
- LightFilter
A class representing a light.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()floatfloatGet the centre of the light in the X direction as a proportion of the image size.floatGet the centre of the light in the Y direction as a proportion of the image size.intgetColor()floatfloatfloatfloatgetFocus()floatvoidprepare(int width, int height) Prepare the light for rendering.voidsetAzimuth(float azimuth) voidsetCentreX(float x) Set the centre of the light in the X direction as a proportion of the image size.voidsetCentreY(float y) Set the centre of the light in the Y direction as a proportion of the image size.voidsetColor(int color) voidsetConeAngle(float coneAngle) voidsetDistance(float distance) voidsetElevation(float elevation) voidsetFocus(float focus) voidsetIntensity(float intensity) toString()
-
Constructor Details
-
Light
public Light() -
Light
public Light(float azimuth, float elevation, float intensity)
-
-
Method Details
-
setAzimuth
public void setAzimuth(float azimuth) -
getAzimuth
public float getAzimuth() -
setElevation
public void setElevation(float elevation) -
getElevation
public float getElevation() -
setDistance
public void setDistance(float distance) -
getDistance
public float getDistance() -
setIntensity
public void setIntensity(float intensity) -
getIntensity
public float getIntensity() -
setConeAngle
public void setConeAngle(float coneAngle) -
getConeAngle
public float getConeAngle() -
setFocus
public void setFocus(float focus) -
getFocus
public float getFocus() -
setColor
public void setColor(int color) -
getColor
public int getColor() -
setCentreX
public void setCentreX(float x) Set the centre of the light in the X direction as a proportion of the image size.- Parameters:
centreX- the center- See Also:
-
getCentreX
public float getCentreX()Get the centre of the light in the X direction as a proportion of the image size.- Returns:
- the center
- See Also:
-
setCentreY
public void setCentreY(float y) Set the centre of the light in the Y direction as a proportion of the image size.- Parameters:
centreY- the center- See Also:
-
getCentreY
public float getCentreY()Get the centre of the light in the Y direction as a proportion of the image size.- Returns:
- the center
- See Also:
-
prepare
public void prepare(int width, int height) Prepare the light for rendering.- Parameters:
width- the output image widthheight- the output image height
-
clone
-
toString
-