|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jreality.scene.SceneGraphNode
de.jreality.scene.Light
public abstract class Light
Light is the abstract super class to all lights in the scene. It carries a color and an intensity as the only common properties of all lights.
Warning: currently, all lights are considered to be global (setGlobal(boolean)
)
in all backends.
Constructor Summary | |
---|---|
Light(java.lang.String name)
|
Method Summary | |
---|---|
void |
accept(SceneGraphVisitor v)
The accept method for a SceneGraphVisitor. |
void |
addLightListener(LightListener listener)
|
java.awt.Color |
getColor()
|
double |
getIntensity()
Get this light's intensity |
float[] |
getScaledColorAsFloat()
get the current color of this light as a triple of floats, premultiplied by the intensity factor. |
boolean |
isAmbientFake()
|
boolean |
isGlobal()
|
void |
removeLightListener(LightListener listener)
|
void |
setAmbientFake(boolean b)
|
void |
setColor(java.awt.Color color)
|
void |
setGlobal(boolean global)
|
void |
setIntensity(double intensity)
Sets the intensity. |
Methods inherited from class de.jreality.scene.SceneGraphNode |
---|
getName, getOwner, getThreadSafe, isReadOnly, setName, setOwner, setReadOnly, setThreadSafe, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Light(java.lang.String name)
Method Detail |
---|
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
public float[] getScaledColorAsFloat()
public double getIntensity()
public void setIntensity(double intensity)
intensity
- the intensitypublic boolean isGlobal()
public void setGlobal(boolean global)
global:
- setting wether the light is global for the scene.public boolean isAmbientFake()
public void setAmbientFake(boolean b)
global:
- setting whether the light should be considered as a fake for
ambient light (so sophisticated renderers might ignore it).public void accept(SceneGraphVisitor v)
SceneGraphNode
accept
in class SceneGraphNode
public void addLightListener(LightListener listener)
public void removeLightListener(LightListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |