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

## threeD.raytracer.engine
Class ShaderSet

    java.lang.Object
      java.util.AbstractCollection
          java.util.AbstractSet
              java.util.HashSet
                  threeD.raytracer.engine.ShaderSet

All Implemented Interfaces:
  Cloneable, Collection, ColorProducer, Producer, Serializable, Set, Shader

Direct Known Subclasses:
  HighlightShader, ReflectionShader, TextureShader

public class ShaderSet
extends HashSet
implements Shader

See Also:
  Serialized Form

Constructor Summary
`ShaderSet()`

Method Summary
`boolean` | `add(Object o)` Adds the specified Object to this set and returns true.
`boolean` | `addAll(Collection c)` Adds all of the elements stored by the specified Collection object to this set.
`RGB` | `evaluate(Object[] args)` Produces a color using the specified arguments.
`RGB` | `shade(ShaderParameters p)` Returns an RGB object that represents the shaded color calculated using the values of the specified ShaderParameters object.
`String` | `toString()`

Methods inherited from class java.util.HashSet
`clear, clone, contains, isEmpty, iterator, remove, size`

Methods inherited from class java.util.AbstractSet
`equals, hashCode, removeAll`

Methods inherited from class java.util.AbstractCollection
`containsAll, retainAll, toArray, toArray`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Set
`containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray`

Constructor Detail

### ShaderSet

    public ShaderSet()

Method Detail

### add

    public boolean add(Object o)

  Adds the specified Object to this set and returns true.

  Specified by:
    `add` in interface `Set`
  Throws:
    `IllegalArgumentException` - If the specified Object is not an instance of Shader.

### addAll

    public boolean addAll(Collection c)

  Adds all of the elements stored by the specified Collection object to this set. Returns true if the set changed as a result.

  Specified by:
    `addAll` in interface `Set`
  Throws:
    `IllegalArgumentException` - If an element in the specified Collection object is not an instance of Shader. Note: Elements that have not yet been added to the set at the time this error occurs will not be added.
    `NullPointerException` - If the specified Collection object is null.

### shade

    public RGB shade(ShaderParameters p)

  Description copied from interface: `Shader`
  Returns an RGB object that represents the shaded color calculated using the values of the specified ShaderParameters object.

  Specified by:
    `shade` in interface `Shader`
  Returns:
    The sum of the values given by the shade method for each Shader object stored by this ShaderSet object.

### evaluate

    public RGB evaluate(Object[] args)

  Description copied from interface: `ColorProducer`
  Produces a color using the specified arguments.

  Specified by:
    `evaluate` in interface `ColorProducer`
  Parameters:
    `args` - Arguments.
  Returns:
    this.shade(args[0]).
  Throws:
    `IllegalArgumentException` - If args[0] is not a ShaderParameters object.

### toString

    public String toString()

  Returns:
    "ShaderSet".

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

Copyright 2003-05 Mike Murray