com.jme3.light
Class DirectionalLight
java.lang.Object
com.jme3.light.Light
com.jme3.light.DirectionalLight
- All Implemented Interfaces:
- Savable, java.lang.Cloneable
public class DirectionalLight
- extends Light
DirectionalLight
is a light coming from a certain direction in world space.
E.g sun or moon light.
Directional lights have no specific position in the scene, they always
come from their direction regardless of where an object is placed.
Nested classes/interfaces inherited from class com.jme3.light.Light |
Light.Type |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
direction
protected Vector3f direction
DirectionalLight
public DirectionalLight()
computeLastDistance
public void computeLastDistance(Spatial owner)
- Description copied from class:
Light
- Used internally to compute the last distance value.
- Specified by:
computeLastDistance
in class Light
getDirection
public Vector3f getDirection()
- Returns the direction vector of the light.
- Returns:
- The direction vector of the light.
- See Also:
setDirection(com.jme3.math.Vector3f)
setDirection
public void setDirection(Vector3f dir)
- Sets the direction of the light.
Represents the vector direction the light is coming from.
(1, 0, 0) would represent a directional light coming from the X axis.
- Parameters:
dir
- the direction of the light.
getType
public Light.Type getType()
- Description copied from class:
Light
- Returns the light type
- Specified by:
getType
in class Light
- Returns:
- the light type
- See Also:
Light.Type
write
public void write(JmeExporter ex)
throws java.io.IOException
- Specified by:
write
in interface Savable
- Overrides:
write
in class Light
- Throws:
java.io.IOException
read
public void read(JmeImporter im)
throws java.io.IOException
- Specified by:
read
in interface Savable
- Overrides:
read
in class Light
- Throws:
java.io.IOException