com.jme.light
Class PointLight
java.lang.Object
com.jme.light.Light
com.jme.light.PointLight
- All Implemented Interfaces:
- Savable, java.io.Serializable
- Direct Known Subclasses:
- SpotLight
public class PointLight
- extends Light
PointLight
defines a light that has a location in space and
emits light in all directions evenly. This would be something similar to a
light bulb. Typically this light's values are attenuated based on the
distance of the point light and the object it illuminates.
- Version:
- $Id: PointLight.java 4131 2009-03-19 20:15:28Z blaine.dev $
- Author:
- Mark Powell
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class com.jme.light.Light |
Light.Type |
Constructor Summary |
PointLight()
Constructor instantiates a new PointLight object. |
Methods inherited from class com.jme.light.Light |
copyFrom, getAmbient, getClassTag, getConstant, getDiffuse, getLightMask, getLinear, getQuadratic, getSpecular, isAttenuate, isEnabled, isShadowCaster, popLightMask, pushLightMask, setAmbient, setAttenuate, setConstant, setDiffuse, setEnabled, setLightMask, setLinear, setQuadratic, setShadowCaster, setSpecular |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PointLight
public PointLight()
- Constructor instantiates a new
PointLight
object. The
initial position of the light is (0,0,0) and it's colors are white.
getLocation
public Vector3f getLocation()
getLocation
returns the position of this light.
- Returns:
- the position of the light.
setLocation
public void setLocation(Vector3f location)
setLocation
sets the position of the light.
- Parameters:
location
- the position of the light.
getType
public Light.Type getType()
getType
returns the type of this light (Type.Point).
- Specified by:
getType
in class Light
- Returns:
- the type of light that has been created.
- See Also:
Light.getType()
write
public void write(JMEExporter e)
throws java.io.IOException
- Specified by:
write
in interface Savable
- Overrides:
write
in class Light
- Throws:
java.io.IOException
read
public void read(JMEImporter e)
throws java.io.IOException
- Specified by:
read
in interface Savable
- Overrides:
read
in class Light
- Throws:
java.io.IOException