de.javagl.swogl.scene
Class Lights

java.lang.Object
  extended by de.javagl.swogl.scene.Lights

public class Lights
extends java.lang.Object

Methods for creating Light instances


Method Summary
static Light createDirectionalLight(float dx, float dy, float dz)
          Create a directional Light.
static Light createPointLight(float x, float y, float z)
          Create a a point Light.
static Light createSpotLight(float x, float y, float z, float dx, float dy, float dz, float spotCutoff, float spotExponent)
          Create a spot Light.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createPointLight

public static Light createPointLight(float x,
                                     float y,
                                     float z)
Create a a point Light.
The ambient color will be (0,0,0,1)
The diffuse color will be (1,1,1,1)
The specular color will be (1,1,1,1)
The position will be (0,0,1)
The constant attenuation will be 1
The linear attenuation will be 0
The quadratic attenuation will be 0

Parameters:
x - The x coordinate of the position
y - The y coordinate of the position
z - The z coordinate of the position
Returns:
The Light

createDirectionalLight

public static Light createDirectionalLight(float dx,
                                           float dy,
                                           float dz)
Create a directional Light.
The ambient color will be (0,0,0,1)
The diffuse color will be (1,1,1,1)
The specular color will be (1,1,1,1)

Parameters:
dx - The x coordinate of the direction
dy - The y coordinate of the direction
dz - The z coordinate of the direction
Returns:
The Light

createSpotLight

public static Light createSpotLight(float x,
                                    float y,
                                    float z,
                                    float dx,
                                    float dy,
                                    float dz,
                                    float spotCutoff,
                                    float spotExponent)
Create a spot Light.
The ambient color will be (0,0,0,1)
The diffuse color will be (1,1,1,1)
The specular color will be (1,1,1,1)
The constant attenuation will be 1
The linear attenuation will be 0
The quadratic attenuation will be 0

Parameters:
x - The x coordinate of the position
y - The y coordinate of the position
z - The z coordinate of the position
dx - The x coordinate of the direction
dy - The y coordinate of the direction
dz - The z coordinate of the direction
spotCutoff - The spot cutoff, in degrees
spotExponent - The spot exponent
Returns:
The Light