com.threerings.opengl.renderer
Class Light

java.lang.Object
  extended by com.threerings.opengl.renderer.Light

public class Light
extends Object

Represents the state of a single light.


Nested Class Summary
static class Light.Type
          The basic light types.
 
Field Summary
 Color4f ambient
          The ambient light intensity.
 boolean castsShadows
          A hint as to whether or not this light should cast shadows.
 float constantAttenuation
          The light's constant attenuation.
 Color4f diffuse
          The diffuse light intensity.
 boolean dirty
          Set when the light has changed and must be reapplied.
 float linearAttenuation
          The light's linear attenuation.
 Vector4f position
          The position or direction of the light.
 float quadraticAttenuation
          The light's quadratic attenuation.
 Color4f specular
          The specular light intensity.
 float spotCutoff
          The light's spot cutoff.
 Vector3f spotDirection
          The light's spot direction.
 float spotExponent
          The light's spot exponent.
 
Constructor Summary
Light()
           
 
Method Summary
 Light.Type getType()
          Returns the basic type of this light.
 boolean isCompatible(Light olight)
          Determines whether this light is "compatible" with the specified other.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ambient

public Color4f ambient
The ambient light intensity.


diffuse

public Color4f diffuse
The diffuse light intensity.


specular

public Color4f specular
The specular light intensity.


position

public Vector4f position
The position or direction of the light.


spotDirection

public Vector3f spotDirection
The light's spot direction.


spotExponent

public float spotExponent
The light's spot exponent.


spotCutoff

public float spotCutoff
The light's spot cutoff.


constantAttenuation

public float constantAttenuation
The light's constant attenuation.


linearAttenuation

public float linearAttenuation
The light's linear attenuation.


quadraticAttenuation

public float quadraticAttenuation
The light's quadratic attenuation.


dirty

public boolean dirty
Set when the light has changed and must be reapplied.


castsShadows

public boolean castsShadows
A hint as to whether or not this light should cast shadows.

Constructor Detail

Light

public Light()
Method Detail

isCompatible

public boolean isCompatible(Light olight)
Determines whether this light is "compatible" with the specified other. Lights are compatible if they have the same type (directional, point, spot) and hints.


getType

public Light.Type getType()
Returns the basic type of this light.



Copyright © 2011. All Rights Reserved.