org.apache.batik.ext.awt.image
Class PointLight
java.lang.Object
|
+--org.apache.batik.ext.awt.image.AbstractLight
|
+--org.apache.batik.ext.awt.image.PointLight
- All Implemented Interfaces:
- Light
- 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,
java.awt.Color lightColor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PointLight
public PointLight(double lightX,
double lightY,
double lightZ,
java.awt.Color lightColor)
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()
- Overrides:
isConstant
in class AbstractLight
- Returns:
- true if the light is constant over the whole surface
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 computedy
- y-axis coordinate where the light should be computedz
- z-axis coordinate where the light should be computedL
- array of length 3 where the result is stored
Copyright © 2002 Apache Software Foundation. All Rights Reserved.