Overview | Package | Class | Use | Tree | Index | Help
| Rings Version 0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## threeD.raytracer.lighting
Class DirectionalAmbientLight

    java.lang.Object
      threeD.raytracer.lighting.AmbientLight
          threeD.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`

Overview | Package | Class | Use | Tree | Index | Help
| Rings Version 0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2003-05 Mike Murray