jjdh API

jjdh.opengl.core.light
Class PositionalLight

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

public class PositionalLight
extends AbstractLightSource


Field Summary
protected  Attenuation attenuation
           
protected  float[] position
           
 
Fields inherited from class jjdh.opengl.core.light.AbstractLightSource
glNumber, light
 
Constructor Summary
PositionalLight()
           
 
Method Summary
 void applyAll(javax.media.opengl.GL gl)
          Has to be updated only if there are changes of the values.
protected  void applyAttenuation(javax.media.opengl.GL gl)
           
protected  void applyPosition(javax.media.opengl.GL gl)
           
 void applyPositionAndDirection(javax.media.opengl.GL gl)
          Has to be updated at every frame.
 void move(float x, float y, float z)
           
 void setAttenuation(Attenuation attenuation)
           
 void setPosition(float x, float y, float z, float w)
           
 
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

position

protected float[] position

attenuation

protected Attenuation attenuation
Constructor Detail

PositionalLight

public PositionalLight()
Method Detail

setAttenuation

public void setAttenuation(Attenuation attenuation)

setPosition

public final void setPosition(float x,
                              float y,
                              float z,
                              float w)

move

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

applyPosition

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

applyAttenuation

protected final void applyAttenuation(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 AbstractLightSource

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 AbstractLightSource

jjdh API

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