jjdh API

jjdh.opengl.core.light
Class SpotLight

java.lang.Object
  extended by jjdh.opengl.core.light.AbstractLightSource
      extended by jjdh.opengl.core.light.PositionalLight
          extended by jjdh.opengl.core.light.SpotLight
All Implemented Interfaces:
Comparable<AbstractLightSource>, GLSwitchable

public class SpotLight
extends PositionalLight


Field Summary
protected  float cutoff
           
protected  float[] direction
           
protected  float exponent
           
 
Fields inherited from class jjdh.opengl.core.light.PositionalLight
attenuation, position
 
Fields inherited from class jjdh.opengl.core.light.AbstractLightSource
glNumber, light
 
Constructor Summary
SpotLight()
           
 
Method Summary
 void applyAll(javax.media.opengl.GL gl)
          Has to be updated only if there are changes of the values.
protected  void applyDirection(javax.media.opengl.GL gl)
           
 void applyPositionAndDirection(javax.media.opengl.GL gl)
          Has to be updated at every frame.
 void applySpot(javax.media.opengl.GL gl)
           
 void setDirection(float x, float y, float z)
           
 void setSpot(float cutoff, float exponent)
           
 
Methods inherited from class jjdh.opengl.core.light.PositionalLight
applyAttenuation, applyPosition, move, setAttenuation, setPosition
 
Methods inherited from class jjdh.opengl.core.light.AbstractLightSource
applyLight, bindTo, compareTo, disable, enable, equals, getLight, setLight
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

direction

protected float[] direction

cutoff

protected float cutoff

exponent

protected float exponent
Constructor Detail

SpotLight

public SpotLight()
Method Detail

setDirection

public final void setDirection(float x,
                               float y,
                               float z)

setSpot

public void setSpot(float cutoff,
                    float exponent)

applyDirection

protected void applyDirection(javax.media.opengl.GL gl)

applySpot

public void applySpot(javax.media.opengl.GL gl)

applyAll

public void applyAll(javax.media.opengl.GL gl)
Description copied from class: AbstractLightSource
Has to be updated only if there are changes of the values.

Overrides:
applyAll in class PositionalLight

applyPositionAndDirection

public void applyPositionAndDirection(javax.media.opengl.GL gl)
Description copied from class: AbstractLightSource
Has to be updated at every frame.

Overrides:
applyPositionAndDirection in class PositionalLight

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.