org.metasyntactic.graphics.lights
Class SphereLight

java.lang.Object
  |
  +--org.metasyntactic.graphics.shapes.Shape
        |
        +--org.metasyntactic.graphics.shapes.CartesianShape
              |
              +--org.metasyntactic.graphics.shapes.ReflectiveShape
                    |
                    +--org.metasyntactic.graphics.shapes.VolumetricShape
                          |
                          +--org.metasyntactic.graphics.lights.Light
                                |
                                +--org.metasyntactic.graphics.lights.SphereLight

public class SphereLight
extends Light


Constructor Summary
SphereLight()
          Creates a new instance of SphereLight
 
Method Summary
static SphereLight fromXML(org.w3c.dom.Element element)
           
 double getIntensity()
          Getter for property intensity.
 double getIntensity(Point otherLocation)
           
 Intersection getIntersection(Ray ray)
          returns null if there is no intersection
 void setIntensity(double intensity)
          Setter for property intensity.
 
Methods inherited from class org.metasyntactic.graphics.shapes.VolumetricShape
getDepth, getHeight, getWidth, setDepth, setHeight, setWidth
 
Methods inherited from class org.metasyntactic.graphics.shapes.ReflectiveShape
getShadeModel, setShadeModel
 
Methods inherited from class org.metasyntactic.graphics.shapes.CartesianShape
getIntersections, getPosition, setPosition
 
Methods inherited from class org.metasyntactic.graphics.shapes.Shape
getColor, setColor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SphereLight

public SphereLight()
Creates a new instance of SphereLight

Method Detail

getIntensity

public double getIntensity()
Getter for property intensity.

Specified by:
getIntensity in class Light
Returns:
Value of property intensity.

setIntensity

public void setIntensity(double intensity)
Setter for property intensity.

Specified by:
setIntensity in class Light
Parameters:
intensity - New value of property intensity.

getIntensity

public double getIntensity(Point otherLocation)
Specified by:
getIntensity in class Light

fromXML

public static SphereLight fromXML(org.w3c.dom.Element element)

getIntersection

public Intersection getIntersection(Ray ray)
Description copied from class: CartesianShape
returns null if there is no intersection

Overrides:
getIntersection in class CartesianShape