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 RectangularLight

    java.lang.Object
      threeD.raytracer.engine.AbstractSurface
          threeD.raytracer.primitives.Plane
              threeD.raytracer.lighting.RectangularLight

All Implemented Interfaces:
  Light, ParticleGroup, Surface, SurfaceLight

public class RectangularLight
extends Plane
implements SurfaceLight

A RectangularLight object provides PointLight samples that are randomly distributed across the a plane surface. The location of the plane is used for the upper left corner of the area to sample.

Field Summary

Fields inherited from class threeD.raytracer.primitives.Plane
`XY, XZ, YZ`

Constructor Summary
`RectangularLight()` Constructs a new RectangularLight object.
`RectangularLight(double width, double height)` Constructs a new RectangularLight object.

Method Summary
`double` | `getHeight()`
`double` | `getIntensity()` Returns the intensity of this Light object as a double value.
`int` | `getSampleCount()`
`Light[]` | `getSamples()`
`Light[]` | `getSamples(int total)`
`double` | `getWidth()`
`void` | `setHeight(double height)` Sets the height of the rectangular area of this RectangularLight object.
`void` | `setIntensity(double intensity)` Sets the intensity of this Light object.
`void` | `setSampleCount(int samples)` Sets the number of samples to use for this RectangularLight object.
`void` | `setWidth(double width)` Sets the width of the rectangular area of this RectangularLight object.
`java.lang.String` | `toString()`

Methods inherited from class threeD.raytracer.primitives.Plane
`getNormalAt, getParticleVertices, getType, intersect, intersectAt, setType`

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, setColor, 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, wait, wait, wait`

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

Constructor Detail

### RectangularLight

    public RectangularLight()

  Constructs a new RectangularLight object.

### RectangularLight

    public RectangularLight(double width,
                            double height)

  Constructs a new RectangularLight object.

Parameters:
  `width` - Width of rectangle.
  `height` - Hieght of rectangle.

Method Detail

### setSampleCount

    public void setSampleCount(int samples)

  Sets the number of samples to use for this RectangularLight object.

  Parameters:
    `samples` -

### getSampleCount

    public int getSampleCount()

  Returns:
    The number of samples to use for this RectangularLight object.

### getSamples

    public Light[] getSamples(int total)

  Specified by:
    `getSamples` in interface `SurfaceLight`
  Parameters:
    `total` - Total number of samples to return.
  Returns:
    An array containing samples for this SurfaceLight instance.
  See Also:
    `SurfaceLight.getSamples(int)`

### getSamples

    public Light[] getSamples()

  Specified by:
    `getSamples` in interface `SurfaceLight`
  Returns:
    An array containing samples for this SurfaceLight instance.
  See Also:
    `SurfaceLight.getSamples()`

### setWidth

    public void setWidth(double width)

  Sets the width of the rectangular area of this RectangularLight object.

### setHeight

    public void setHeight(double height)

  Sets the height of the rectangular area of this RectangularLight object.

### getWidth

    public double getWidth()

  Returns:
    The width of the rectangular area of this RectangularLight object.

### getHeight

    public double getHeight()

  Returns:
    The width of the rectangular area of this RectangularLight object.

### setIntensity

    public void setIntensity(double intensity)

  Description copied from interface: `Light`
  Sets the intensity of this Light object.

  Specified by:
    `setIntensity` in interface `Light`
  See Also:
    `Light.setIntensity(double)`

### getIntensity

    public double getIntensity()

  Description copied from interface: `Light`
  Returns the intensity of this Light object as a double value.

  Specified by:
    `getIntensity` in interface `Light`
  See Also:
    `Light.getIntensity()`

### toString

    public java.lang.String toString()

  Returns:
    "Rectangular Light".

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