Class PointLight

java.lang.Object
com.ardor3d.light.Light
com.ardor3d.light.PointLight
All Implemented Interfaces:
Savable, 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.
See Also:
  • Constructor Details

    • 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.
  • Method Details

    • getLocation

      public ReadOnlyVector3 getLocation()
      getLocation returns the position of this light.
      Returns:
      the position of the light.
    • setLocation

      public void setLocation(ReadOnlyVector3 location)
      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

      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:
    • write

      public void write(OutputCapsule capsule) throws IOException
      Specified by:
      write in interface Savable
      Overrides:
      write in class Light
      Throws:
      IOException
    • read

      public void read(InputCapsule capsule) throws IOException
      Specified by:
      read in interface Savable
      Overrides:
      read in class Light
      Throws:
      IOException