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 PointLightGrid

    java.lang.Object
      threeD.raytracer.engine.AbstractSurface
          threeD.raytracer.lighting.PointLightGrid

All Implemented Interfaces:
  Light, Surface

public class PointLightGrid
extends AbstractSurface
implements Light

A PointLightGrid object stores a grid of PointLight objects.

Constructor Summary
`PointLightGrid(int width, int height, double xSpace, double ySpace)` Constructs a new PointLightGrid object with the specified width, height, and x and y spacing between lights and uses a default PointLight object for each light in the grid.
`PointLightGrid(int width, int height, double xSpace, double ySpace, PointLight prototype)` Constructs a new PointLightGrid object with the specified width, height, and x and y spacing between lights using the data from the specified PointLight object for each light in the grid.

Method Summary
`double` | `getIntensity()` Returns the total intensity of this PointLightGrid (the sum of the intensities of all lights in the grid).
`PointLight[]` | `getLights()` Returns the array of PointLight objects stored by this PointLightGrid object.
`Vector` | `getNormalAt(Vector point)` Returns a zero vector.
`boolean` | `intersect(Ray ray)` Returns false.
`Intersection` | `intersectAt(Ray ray)` Returns null.
`void` | `setColor(RGB color)` Sets the color of the PointLight objects stored by this PointLightGrid object to the color represented by the specified RGB object.
`void` | `setIntensity(double intensity)` Sets the total intensity of this PointLightGrid object (the sum of intensities of all lights in the grid) to the specified double value.
`void` | `updateGrid(int width, int height, double xSpace, double ySpace, PointLight prototype)` Updates the light grid stored by this PointLightGrid object to have the specified width, height, and x and y spaceing between lights using the data from the specified Point Light object for each light in the grid.

Methods inherited from class threeD.raytracer.engine.AbstractSurface
`addShader, addTexture, addTransform, calculateTransform, getColor, getColorAt, getLocation, getParent, getRotationCoefficients, getScaleCoefficients, getShadeBack, getShadeFront, getShaderSet, getSize, getTexture, getTextures, getTextureSet, getTransform, getTransform, getTransforms, removeTexture, removeTransform, setLocation, setParent, setRotationCoefficients, setScaleCoefficients, setShadeBack, setShadeFront, setShaders, setSize, setTexture, setTextures, setTransform, setTransforms, shade`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface threeD.raytracer.lighting.Light
`getColor, getColorAt`

Constructor Detail

### PointLightGrid

    public PointLightGrid(int width,
                          int height,
                          double xSpace,
                          double ySpace)

  Constructs a new PointLightGrid object with the specified width, height, and x and y spacing between lights and uses a default PointLight object for each light in the grid. After the grid is created the total intensity will be set to 1.0.

### PointLightGrid

    public PointLightGrid(int width,
                          int height,
                          double xSpace,
                          double ySpace,
                          PointLight prototype)

  Constructs a new PointLightGrid object with the specified width, height, and x and y spacing between lights using the data from the specified PointLight object for each light in the grid.

Method Detail

### updateGrid

    public void updateGrid(int width,
                           int height,
                           double xSpace,
                           double ySpace,
                           PointLight prototype)

  Updates the light grid stored by this PointLightGrid object to have the specified width, height, and x and y spaceing between lights using the data from the specified Point Light object for each light in the grid.

### setIntensity

    public void setIntensity(double intensity)

  Sets the total intensity of this PointLightGrid object (the sum of intensities of all lights in the grid) to the specified double value.

  Specified by:
    `setIntensity` in interface `Light`

### setColor

    public void setColor(RGB color)

  Sets the color of the PointLight objects stored by this PointLightGrid object to the color represented by the specified RGB object.

  Specified by:
    `setColor` in interface `Light`
  Overrides:
    `setColor` in class `AbstractSurface`

### getIntensity

    public double getIntensity()

  Returns the total intensity of this PointLightGrid (the sum of the intensities of all lights in the grid).

  Specified by:
    `getIntensity` in interface `Light`

### getLights

    public PointLight[] getLights()

  Returns the array of PointLight objects stored by this PointLightGrid object.

### getNormalAt

    public Vector getNormalAt(Vector point)

  Returns a zero vector.

  Specified by:
    `getNormalAt` in interface `Surface`

### intersect

    public boolean intersect(Ray ray)

  Returns false.

  Specified by:
    `intersect` in interface `Surface`

### intersectAt

    public Intersection intersectAt(Ray ray)

  Returns null.

  Specified by:
    `intersectAt` in interface `Surface`

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