espresso3d.engine.world.sector.light
Class E3DLight
java.lang.Object
espresso3d.engine.base.E3DEngineItem
espresso3d.engine.renderer.base.E3DRenderable
espresso3d.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
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
E3DLight
public E3DLight(E3DEngine engine,
E3DWorld world,
java.lang.String lightID)
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)