public abstract class Light extends SceneGraphNode
Warning: currently, all lights are considered to be global (setGlobal(boolean)
)
in all backends.
Modifier and Type | Method and Description |
---|---|
void |
accept(SceneGraphVisitor v)
The accept method for a SceneGraphVisitor.
|
void |
addLightListener(LightListener listener) |
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(Color color) |
void |
setGlobal(boolean global) |
void |
setIntensity(double intensity)
Sets the intensity.
|
getName, getOwner, getThreadSafe, isReadOnly, setName, setOwner, setReadOnly, setThreadSafe, toString
public Light(String name)
public Color getColor()
public void setColor(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)