org.apache.batik.ext.awt.image

Class PointLight

public class PointLight extends AbstractLight

A light source which emits a light of constant intensity in all directions.
Constructor Summary
PointLight(double lightX, double lightY, double lightZ, Color lightColor)
Method Summary
voidgetLight(double x, double y, double z, double[] L)
Computes the light vector in (x, y, z)
doublegetLightX()
doublegetLightY()
doublegetLightZ()
booleanisConstant()

Constructor Detail

PointLight

public PointLight(double lightX, double lightY, double lightZ, Color lightColor)

Method Detail

getLight

public final void getLight(double x, double y, double z, double[] L)
Computes the light vector in (x, y, z)

Parameters: x x-axis coordinate where the light should be computed y y-axis coordinate where the light should be computed z z-axis coordinate where the light should be computed L array of length 3 where the result is stored

getLightX

public double getLightX()

Returns: the light's x position

getLightY

public double getLightY()

Returns: the light's y position

getLightZ

public double getLightZ()

Returns: the light's z position

isConstant

public boolean isConstant()

Returns: true if the light is constant over the whole surface

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.