espresso3d.engine.world.sector.light
Class E3DLight

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.renderer.base.E3DRenderable
          extended byespresso3d.engine.world.sector.light.E3DLight

public class E3DLight
extends E3DRenderable

Author:
Curt TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
static int LIGHT_TYPE_GLOBAL
           
static int LIGHT_TYPE_OMNIDIRECTIONAL
           
 
Constructor Summary
E3DLight(E3DEngine engine, E3DWorld world, java.lang.String lightID)
           
 
Method Summary
 double getBrightness()
           
 E3DVector3F getColor()
           
 double getFalloff()
           
 java.lang.String getLightID()
           
 E3DVector3F getLitVertex(E3DVector3F vertex)
          Returns the RGB values in a E3DVector3F with the correct lighting information for this light based on the distance the vertex passed in is away and the lights color, brightness, falloff, etc.
 E3DVector3F getPositionVec()
           
 E3DSector getSector()
           
 int getType()
           
 E3DWorld getWorld()
           
 void renderAtPosition(E3DVector3F position)
           
 void setBrightness(double brightness)
          Brightness is a value between 0 and 1.
 void setColor(E3DVector3F color)
           
 void setFalloff(double falloff)
           
 void setLightID(java.lang.String lightID)
           
 void setPositionVec(E3DVector3F positionVec)
           
 void setSector(E3DSector sector)
           
 void setType(int type)
           
 void setWorld(E3DWorld world)
           
 
Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable
render
 
Methods inherited from class espresso3d.engine.base.E3DEngineItem
getEngine, setEngine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIGHT_TYPE_OMNIDIRECTIONAL

public static final int LIGHT_TYPE_OMNIDIRECTIONAL
See Also:
Constant Field Values

LIGHT_TYPE_GLOBAL

public static final int LIGHT_TYPE_GLOBAL
See Also:
Constant Field Values
Constructor Detail

E3DLight

public E3DLight(E3DEngine engine,
                E3DWorld world,
                java.lang.String lightID)
Method Detail

getLitVertex

public E3DVector3F getLitVertex(E3DVector3F vertex)
Returns the RGB values in a E3DVector3F with the correct lighting information for this light based on the distance the vertex passed in is away and the lights color, brightness, falloff, etc.

Parameters:
vertex - The vertex that we want to get the lit values of from this light
Returns:
Returns the lit values for this vertex from this light. Other lights will have to be accumulated

renderAtPosition

public void renderAtPosition(E3DVector3F position)
Specified by:
renderAtPosition in class E3DRenderable

getBrightness

public double getBrightness()
Returns:
Returns the brightness.

setBrightness

public void setBrightness(double brightness)
Brightness is a value between 0 and 1. 1 being the brightest. Anything larger is set to 1, smaller is set to 0

Parameters:
brightness - The brightness to set.

getColor

public E3DVector3F getColor()
Returns:
Returns the color in a vector with RGB = XYZ as a 0.0 to 1.0 value

setColor

public void setColor(E3DVector3F color)
Parameters:
color - The color to set.

getFalloff

public double getFalloff()
Returns:
Returns the falloff.

setFalloff

public void setFalloff(double falloff)
Parameters:
falloff - The falloff to set.

getPositionVec

public E3DVector3F getPositionVec()
Returns:
Returns the positionVec.

setPositionVec

public void setPositionVec(E3DVector3F positionVec)
Parameters:
positionVec - The positionVec to set.

getType

public int getType()
Returns:
Returns the type.

setType

public void setType(int type)
Parameters:
type - The type to set.

getLightID

public java.lang.String getLightID()

setLightID

public void setLightID(java.lang.String lightID)

getSector

public E3DSector getSector()

setSector

public void setSector(E3DSector sector)

getWorld

public E3DWorld getWorld()

setWorld

public void setWorld(E3DWorld world)