|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dolben.iiid.Lighting
public class Lighting
A representation of the lighting of a scene, with a method for finding the shading of a surface depending on its angle to the light.
Constructor Summary | |
---|---|
Lighting()
Creates new Lighting. |
Method Summary | |
---|---|
java.awt.Color |
getShade(double[] normal,
java.awt.Color color)
Gets the shade for a color produced by the lighting. |
void |
setLight(double[] l,
float bg)
Sets the location of the light source and the background light level as a fraction of the source light. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Lighting()
Method Detail |
---|
public void setLight(double[] l, float bg)
l
- the 3D vector location of the light sourcebg
- the background light level (0,1)public java.awt.Color getShade(double[] normal, java.awt.Color color)
normal
- the vector normal to the plane to be shadedcolor
- base color to be shaded
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |