jjdh API

jjdh.opengl.core.light
Class AbstractLightSource

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

public abstract class AbstractLightSource
extends Object
implements GLSwitchable, Comparable<AbstractLightSource>


Field Summary
protected  int glNumber
           
protected  Light light
           
 
Constructor Summary
AbstractLightSource()
           
 
Method Summary
 void applyAll(javax.media.opengl.GL gl)
          Has to be updated only if there are changes of the values.
protected  void applyLight(javax.media.opengl.GL gl)
           
 void applyPositionAndDirection(javax.media.opengl.GL gl)
          Has to be updated at every frame.
 void bindTo(int number)
           
 int compareTo(AbstractLightSource o)
           
 void disable(javax.media.opengl.GL gl)
           
 void enable(javax.media.opengl.GL gl)
           
 boolean equals(Object o)
           
 Light getLight()
           
 void setLight(Light light)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

glNumber

protected int glNumber

light

protected Light light
Constructor Detail

AbstractLightSource

public AbstractLightSource()
Method Detail

bindTo

public void bindTo(int number)

setLight

public void setLight(Light light)

getLight

public Light getLight()

applyLight

protected final void applyLight(javax.media.opengl.GL gl)

enable

public void enable(javax.media.opengl.GL gl)
Specified by:
enable in interface GLSwitchable

disable

public void disable(javax.media.opengl.GL gl)
Specified by:
disable in interface GLSwitchable

applyAll

public void applyAll(javax.media.opengl.GL gl)
Has to be updated only if there are changes of the values.


applyPositionAndDirection

public void applyPositionAndDirection(javax.media.opengl.GL gl)
Has to be updated at every frame.


compareTo

public int compareTo(AbstractLightSource o)
Specified by:
compareTo in interface Comparable<AbstractLightSource>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

jjdh API

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