com.jme.light
Class SpotLight

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

public class SpotLight
extends PointLight

SpotLight defines a light that has a location in space and emits light within a cone. This cone is defined by an angle and exponent. Typically this light's values are attenuated based on the distance of the point light and the object it illuminates.

Version:
$Id: SpotLight.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
SpotLight()
          Constructor instantiates a new SpotLight object.
 
Method Summary
 float getAngle()
          getAngle returns the angle of the spot light.
 Vector3f getDirection()
          getDirection returns the direction the spot light is coming from.
 float getExponent()
          getExponent gets the spot exponent of this light.
 int getType()
          getType returns the type of this light (LT_SPOT).
 void setAngle(float angle)
          setAngle sets the angle of the spot light.
 void setDirection(Vector3f direction)
          setDirection sets the direction the spot light is coming from.
 void setExponent(float exponent)
          setExponent sets the spot exponent of this light.
 
Methods inherited from class com.jme.light.PointLight
getLocation, setLocation
 
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

SpotLight

public SpotLight()
Constructor instantiates a new SpotLight object. The initial position of the light is (0,0,0) with angle 0, and colors white.

Method Detail

getDirection

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

Returns:
the direction the spot light is coming from.

setDirection

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

Parameters:
direction - the direction the spot light is coming from.

getAngle

public float getAngle()
getAngle returns the angle of the spot light.

Returns:
the angle of the spot light.

setAngle

public void setAngle(float angle)
setAngle sets the angle of the spot light.

Parameters:
angle - the angle of the spot light.

getExponent

public float getExponent()
getExponent gets the spot exponent of this light.

Returns:
the spot exponent of this light.

setExponent

public void setExponent(float exponent)
setExponent sets the spot exponent of this light.

Parameters:
exponent - the spot exponent of this light.

getType

public int getType()
getType returns the type of this light (LT_SPOT).

Overrides:
getType in class PointLight
See Also:
Light.getType()