Rings
Version 0.3

threeD.raytracer.lighting
Class DirectionalAmbientLight

java.lang.Object
  extended bythreeD.raytracer.lighting.AmbientLight
      extended bythreeD.raytracer.lighting.DirectionalAmbientLight
All Implemented Interfaces:
Light

public class DirectionalAmbientLight
extends AmbientLight

A DirectionAmbientLight object represents an ambient light source that always comes from a particular direction. The direction is a vector that represents the direction from which the light enters the scene. By default the light comes from the top, parallel to the yz plane.


Constructor Summary
DirectionalAmbientLight()
          Constructs a DirectionalAmbientLight object with the default direction, intensity, and color.
DirectionalAmbientLight(double intensity, RGB color, Vector direction)
          Constructs a DirectionalAmbientLight object with the direction, intensity, and color represented by the specified values.
DirectionalAmbientLight(Vector direction)
          Constructs a DirectionalAmbientLight object with default intensity and color and the direction represented by the specified Vector object.
 
Method Summary
 Vector getDirection()
          Returns the direction of this DirectionalAmbientLight object as a Vector object.
 void setDirection(Vector direction)
          Sets the direction of this DirectionalAmbientLight object to the direction represented by the specified Vector object.
 java.lang.String toString()
          Returns "Directional Ambient Light".
 
Methods inherited from class threeD.raytracer.lighting.AmbientLight
getColor, getColorAt, getIntensity, setColor, setIntensity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectionalAmbientLight

public DirectionalAmbientLight()
Constructs a DirectionalAmbientLight object with the default direction, intensity, and color.


DirectionalAmbientLight

public DirectionalAmbientLight(Vector direction)
Constructs a DirectionalAmbientLight object with default intensity and color and the direction represented by the specified Vector object.


DirectionalAmbientLight

public DirectionalAmbientLight(double intensity,
                               RGB color,
                               Vector direction)
Constructs a DirectionalAmbientLight object with the direction, intensity, and color represented by the specified values.

Method Detail

setDirection

public void setDirection(Vector direction)
Sets the direction of this DirectionalAmbientLight object to the direction represented by the specified Vector object.


getDirection

public Vector getDirection()
Returns the direction of this DirectionalAmbientLight object as a Vector object.


toString

public java.lang.String toString()
Returns "Directional Ambient Light".

Overrides:
toString in class AmbientLight

Rings
Version 0.3

Copyright 2003-05 Mike Murray