Package 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
A light source which emits a light of constant intensity in all directions.
- Version:
- $Id: PointLight.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
getLight
(double x, double y, double z, double[] L) Computes the light vector in (x, y, z)double
double
double
boolean
Methods inherited from class org.apache.batik.ext.awt.image.AbstractLight
getColor, getLightMap, getLightRow, setColor, sRGBToLsRGB
-
Field Details
-
lightX
private double lightXThe light position, in user space -
lightY
private double lightYThe light position, in user space -
lightZ
private double lightZThe light position, in user space
-
-
Constructor Details
-
PointLight
-
-
Method Details
-
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()- Specified by:
isConstant
in interfaceLight
- Overrides:
isConstant
in classAbstractLight
- 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
-