|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.light.Light
public abstract class Light
Abstract class for representing a light source.
All light source types have a color.
Nested Class Summary | |
---|---|
static class |
Light.Type
Describes the light type. |
Field Summary | |
---|---|
protected ColorRGBA |
color
|
protected boolean |
enabled
If light is disabled, it will not have any |
protected float |
lastDistance
Used in LightList for caching the distance to the owner spatial. |
protected java.lang.String |
name
The light name. |
Constructor Summary | |
---|---|
Light()
|
Method Summary | |
---|---|
Light |
clone()
|
protected abstract void |
computeLastDistance(Spatial owner)
Used internally to compute the last distance value. |
ColorRGBA |
getColor()
Returns the color of the light. |
java.lang.String |
getName()
Return the light name. |
abstract Light.Type |
getType()
Returns the light type |
void |
read(JmeImporter im)
|
void |
setColor(ColorRGBA color)
Sets the light color. |
void |
setName(java.lang.String name)
This method sets the light name. |
void |
write(JmeExporter ex)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ColorRGBA color
protected transient float lastDistance
protected boolean enabled
protected java.lang.String name
Constructor Detail |
---|
public Light()
Method Detail |
---|
public ColorRGBA getColor()
public void setName(java.lang.String name)
name
- the light namepublic java.lang.String getName()
public void setColor(ColorRGBA color)
color
- the light color.public Light clone()
clone
in class java.lang.Object
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
java.io.IOException
protected abstract void computeLastDistance(Spatial owner)
public abstract Light.Type getType()
Light.Type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |