com.jme.light
Class DirectionalLight

java.lang.Object
  extended bycom.jme.light.Light
      extended bycom.jme.light.DirectionalLight
All Implemented Interfaces:
java.io.Serializable

public class DirectionalLight
extends Light

DirectionalLight defines a light that is assumed to be infintely far away (something similar to the sun). This means the direction of the light rays are all parallel. The direction the light is coming from is defined by the class.

Version:
$Id: DirectionalLight.java,v 1.5 2004/09/14 21:52:18 mojomonkey Exp $
Author:
Mark Powell
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jme.light.Light
LT_AMBIENT, LT_DIRECTIONAL, LT_POINT, LT_SPOT
 
Constructor Summary
DirectionalLight()
          Constructor instantiates a new DirectionalLight object.
 
Method Summary
 Vector3f getDirection()
          getDirection returns the direction the light is emitting from.
 int getType()
          getType returns this light's type (LT_DIRECTIONAL).
 void setDirection(Vector3f direction)
          setDirection sets the direction the light is emitting from.
 
Methods inherited from class com.jme.light.Light
getAmbient, getConstant, getDiffuse, getLinear, getQuadratic, getSpecular, isAttenuate, isEnabled, setAmbient, setAttenuate, setConstant, setDiffuse, setEnabled, setLinear, setQuadratic, setSpecular
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectionalLight

public DirectionalLight()
Constructor instantiates a new DirectionalLight object. The initial light colors are white and the direction the light emits from is (0,0,0).

Method Detail

getDirection

public Vector3f getDirection()
getDirection returns the direction the light is emitting from.

Returns:
the direction the light is emitting from.

setDirection

public void setDirection(Vector3f direction)
setDirection sets the direction the light is emitting from.

Parameters:
direction - the direction the light is emitting from.

getType

public int getType()
getType returns this light's type (LT_DIRECTIONAL).

Specified by:
getType in class Light
Returns:
the type of light that has been created.
See Also:
Light.getType()