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 SphericalLight

    java.lang.Object
      threeD.raytracer.engine.AbstractSurface
          threeD.raytracer.primitives.Sphere
              threeD.raytracer.lighting.SphericalLight

All Implemented Interfaces:
  Light, Surface, SurfaceLight

public class SphericalLight
extends Sphere
implements SurfaceLight

A SphericalLight object provides PointLight samples that are randomly distributed across the surface of a sphere.

Constructor Summary
`SphericalLight()` Constructs a new SphericalLight object.
`SphericalLight(Vector location, double radius)` Constructs a new SphericalLight object.

Method Summary
`double` | `getIntensity()` Returns the intensity of this Light object as a double value.
`double[][]` | `getParticleVertices()`
`int` | `getSampleCount()`
`Light[]` | `getSamples()`
`Light[]` | `getSamples(int total)`
`void` | `setIntensity(double intensity)` Sets the intensity of this Light object.
`void` | `setSampleCount(int samples)` Sets the number of samples to use for this SphericalLight object.
`java.lang.String` | `toString()`

Methods inherited from class threeD.raytracer.primitives.Sphere
`getNormalAt, intersect, intersectAt`

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

### SphericalLight

    public SphericalLight()

  Constructs a new SphericalLight object.

### SphericalLight

    public SphericalLight(Vector location,
                          double radius)

  Constructs a new SphericalLight object.

Parameters:
  `location` - Location for sphere.
  `radius` - Radius of sphere.

Method Detail

### setSampleCount

    public void setSampleCount(int samples)

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

  Parameters:
    `samples` -

### getSampleCount

    public int getSampleCount()

  Returns:
    The number of samples to use for this SphericalLight 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()`

### 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()`

### getParticleVertices

    public double[][] getParticleVertices()

  See Also:
    `ParticleGroup.getParticleVertices()`

### toString

    public java.lang.String toString()

  Returns:
    "Spherical 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