de.jreality.scene
Class SpotLight

java.lang.Object
  extended by de.jreality.scene.SceneGraphNode
      extended by de.jreality.scene.Light
          extended by de.jreality.scene.PointLight
              extended by de.jreality.scene.SpotLight

public class SpotLight
extends PointLight

This is a spot light. The light direction is the z-axis. Other directions may be obtained by changing the transformation.

The cone angle is specified in radians. The distribution is an exponent specifying the distribution of the light directions around the axis. A value of 0 implies the light is evenly distributed around the axis.

Author:
Tim Hoffmann

Constructor Summary
SpotLight()
           
SpotLight(java.lang.String name)
           
 
Method Summary
 void accept(SceneGraphVisitor v)
          The accept method for a SceneGraphVisitor.
 double getConeAngle()
           
 double getConeDeltaAngle()
           
 double getDistribution()
           
 void setConeAngle(double coneAngle)
          Sets the coneAngle.
 void setConeDeltaAngle(double coneDeltaAngle)
          Sets the coneDeltaAngle.
 void setDistribution(double distribution)
          Sets the distribution.
 
Methods inherited from class de.jreality.scene.PointLight
getFalloffA0, getFalloffA1, getFalloffA2, getShadowMap, getShadowMapX, getShadowMapY, isUseShadowMap, setFalloff, setFalloff, setFalloffA0, setFalloffA1, setFalloffA2, setShadowMap, setShadowMapX, setShadowMapY, setUseShadowMap
 
Methods inherited from class de.jreality.scene.Light
addLightListener, getColor, getIntensity, getScaledColorAsFloat, isAmbientFake, isGlobal, removeLightListener, setAmbientFake, setColor, setGlobal, setIntensity
 
Methods inherited from class de.jreality.scene.SceneGraphNode
getName, getOwner, getThreadSafe, isReadOnly, setName, setOwner, setReadOnly, setThreadSafe, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpotLight

public SpotLight()

SpotLight

public SpotLight(java.lang.String name)
Method Detail

getConeAngle

public double getConeAngle()

setConeAngle

public void setConeAngle(double coneAngle)
Sets the coneAngle. This is the maximal illuminated cone.

Parameters:
coneAngle - The coneAngle to set

getConeDeltaAngle

public double getConeDeltaAngle()

getDistribution

public double getDistribution()

setConeDeltaAngle

public void setConeDeltaAngle(double coneDeltaAngle)
Sets the coneDeltaAngle. This angle gives the width of the smooth falloff of the light's intensity towards the edge of the coneAngle.

Parameters:
coneDeltaAngle - The coneDeltaAngle to set

setDistribution

public void setDistribution(double distribution)
Sets the distribution. This is the regular falloff of the lights intensity towards the edge of the cone it is an exponent.

Parameters:
distribution - The distribution to set

accept

public void accept(SceneGraphVisitor v)
Description copied from class: SceneGraphNode
The accept method for a SceneGraphVisitor.

Overrides:
accept in class PointLight