Package com.ardor3d.light
Class PointLight
java.lang.Object
com.ardor3d.light.Light
com.ardor3d.light.PointLight
- All Implemented Interfaces:
Savable
,Serializable
- Direct Known Subclasses:
SpotLight
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.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.light.Light
Light.Type
-
Field Summary
Fields inherited from class com.ardor3d.light.Light
_shadowCaster, DEFAULT_AMBIENT, DEFAULT_DIFFUSE, DEFAULT_SPECULAR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLocation
returns the position of this light.getType()
getType
returns the type of this light (Type.Point).void
read
(InputCapsule capsule) void
setLocation
(double x, double y, double z) setLocation
sets the position of the light.void
setLocation
(ReadOnlyVector3 location) setLocation
sets the position of the light.void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.light.Light
copyFrom, getAmbient, getClassTag, getConstant, getDiffuse, getLightMask, getLinear, getName, getQuadratic, getSpecular, isAttenuate, isEnabled, isShadowCaster, popLightMask, pushLightMask, setAmbient, setAttenuate, setConstant, setDiffuse, setEnabled, setLightMask, setLinear, setName, setQuadratic, setShadowCaster, setSpecular
-
Constructor Details
-
PointLight
public PointLight()Constructor instantiates a newPointLight
object. The initial position of the light is (0,0,0) and it's colors are white.
-
-
Method Details
-
getLocation
getLocation
returns the position of this light.- Returns:
- the position of the light.
-
setLocation
setLocation
sets the position of the light.- Parameters:
location
- the position of the light.
-
setLocation
public void setLocation(double x, double y, double z) setLocation
sets the position of the light.- Parameters:
x
- the x position of the light.y
- the y position of the light.z
- the z position of the light.
-
getType
getType
returns the type of this light (Type.Point). -
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classLight
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classLight
- Throws:
IOException
-