de.javagl.swogl.scene
Interface LightSetup

All Known Implementing Classes:
DefaultLightSetup

public interface LightSetup

This interface describes the lighting setup in a SwoglApplication. It consists of a global ambient light and a collection of Lights.


Method Summary
 void addLight(Light light)
          Add the given Light to this setup.
 void addLightSetupListener(LightSetupListener lightSetupListener)
          Add the given LightSetupListener to be informed about changes in this LightSetup
 void clear()
          Removes all lights from this LightSetup
 javax.vecmath.Color4f getAmbient()
          Returns the global ambient light color
 java.util.List<Light> getLights()
          Returns an unmodifiable copy of the current list of lights contained in this setup.
 int getMaximumNumberOfLights()
          Returns the maximum number of Lights that may be contained in this setup
 void removeLight(int index)
          Removes the Light with the given Index from this setup.
 void removeLight(Light light)
          Removes the given Light from this setup.
 void removeLightSetupListener(LightSetupListener lightSetupListener)
          Remove the given LightSetupListener
 void setAmbient(javax.vecmath.Tuple4f color)
          Set the global ambient light color
 

Method Detail

getAmbient

javax.vecmath.Color4f getAmbient()
Returns the global ambient light color

Returns:
The global ambient light color

setAmbient

void setAmbient(javax.vecmath.Tuple4f color)
Set the global ambient light color

Parameters:
color - The global ambient light color

getMaximumNumberOfLights

int getMaximumNumberOfLights()
Returns the maximum number of Lights that may be contained in this setup

Returns:
The maximum number of lights

addLight

void addLight(Light light)
Add the given Light to this setup.

Parameters:
light - The light to add
Throws:
java.lang.IllegalStateException - If the maximum number of lights is exceeded, as specified by getMaximumNumberOfLights()

removeLight

void removeLight(int index)
Removes the Light with the given Index from this setup.

Parameters:
index - The index of the Light to remove.

removeLight

void removeLight(Light light)
Removes the given Light from this setup.

Parameters:
light - The Light to remove.

clear

void clear()
Removes all lights from this LightSetup


getLights

java.util.List<Light> getLights()
Returns an unmodifiable copy of the current list of lights contained in this setup.

Returns:
The current list of lights

addLightSetupListener

void addLightSetupListener(LightSetupListener lightSetupListener)
Add the given LightSetupListener to be informed about changes in this LightSetup

Parameters:
lightSetupListener - The listener to add

removeLightSetupListener

void removeLightSetupListener(LightSetupListener lightSetupListener)
Remove the given LightSetupListener

Parameters:
lightSetupListener - The listener to remove