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

## net.sf.j3d.threeD.raytracer.shaders
Class SilhouetteShader

    java.lang.Object
      net.sf.j3d.threeD.raytracer.shaders.SilhouetteShader

All Implemented Interfaces:
  ColorProducer, Shader, Editable, Producer

    public class SilhouetteShader

extends Object
implements Editable, Shader

A SilhouetteShader object can be used to shade a surface with one color value for all parts of the surface.

Author:
  Mike Murray

Nested Class Summary

Nested classes/interfaces inherited from interface net.sf.j3d.threeD.raytracer.util.Editable
`Editable.Selection`

Constructor Summary
`SilhouetteShader()` Constructs a new SilhouetteShader object using black as a color.
`SilhouetteShader(ColorProducer color)` Constructs a new SilhouetteShader using the specified ColorProducer as a color.

Method Summary
`RGB` | `evaluate(Object[] args)` Produces a color using the specified arguments.
`Producer[]` | `getInputPropertyValues()`
`String[]` | `getPropertyDescriptions()` Returns an array of String objects with descriptions for each editable property of this Editable object.
`String[]` | `getPropertyNames()` Returns an array of String objects with names for each editable property of this Editable object.
`Class[]` | `getPropertyTypes()` Returns an array of Class objects representing the class types of each editable property of this Editable object.
`Object[]` | `getPropertyValues()` Returns the values of the properties of this Editable object as an Object array.
`void` | `setInputPropertyValue(int index, Producer p)`
`void` | `setPropertyValue(Object value, int index)` Sets the value of the property of this Editable object at the specified index to the specified value.
`void` | `setPropertyValues(Object[] values)` Sets the values of properties of this Editable object to those specified.
`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.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SilhouetteShader

    public SilhouetteShader()

  Constructs a new SilhouetteShader object using black as a color.

### SilhouetteShader

    public SilhouetteShader(ColorProducer color)

  Constructs a new SilhouetteShader using the specified ColorProducer as a color.

  Parameters:
    `color` - ColorProducer to use.

Method Detail

### 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`
  See Also:
    `Shader.shade(net.sf.j3d.threeD.raytracer.shaders.ShaderParameters)`

### 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:
    The RGB color produced.
  See Also:
    `ColorProducer.evaluate(java.lang.Object[])`

### getPropertyNames

    public String[] getPropertyNames()

  Description copied from interface: `Editable`
  Returns an array of String objects with names for each editable property of this Editable object.

  Specified by:
    `getPropertyNames` in interface `Editable`
  See Also:
    `Editable.getPropertyNames()`

### getPropertyDescriptions

    public String[] getPropertyDescriptions()

  Description copied from interface: `Editable`
  Returns an array of String objects with descriptions for each editable property of this Editable object.

  Specified by:
    `getPropertyDescriptions` in interface `Editable`
  See Also:
    `Editable.getPropertyDescriptions()`

### getPropertyTypes

    public Class[] getPropertyTypes()

  Description copied from interface: `Editable`
  Returns an array of Class objects representing the class types of each editable property of this Editable object.

  Specified by:
    `getPropertyTypes` in interface `Editable`
  See Also:
    `Editable.getPropertyTypes()`

### getPropertyValues

    public Object[] getPropertyValues()

  Description copied from interface: `Editable`
  Returns the values of the properties of this Editable object as an Object array.

  Specified by:
    `getPropertyValues` in interface `Editable`
  See Also:
    `Editable.getPropertyValues()`

### setPropertyValue

    public void setPropertyValue(Object value,
                                 int index)

  Description copied from interface: `Editable`
  Sets the value of the property of this Editable object at the specified index to the specified value.

  Specified by:
    `setPropertyValue` in interface `Editable`
  See Also:
    `Editable.setPropertyValue(java.lang.Object, int)`

### setPropertyValues

    public void setPropertyValues(Object[] values)

  Description copied from interface: `Editable`
  Sets the values of properties of this Editable object to those specified.

  Specified by:
    `setPropertyValues` in interface `Editable`
  See Also:
    `Editable.setPropertyValues(java.lang.Object[])`

### getInputPropertyValues

    public Producer[] getInputPropertyValues()

  Specified by:
    `getInputPropertyValues` in interface `Editable`
  Returns:
    An array of Producer objects containing the property values of those properties that are repeatedly evaluated.
  See Also:
    `Editable.getInputPropertyValues()`

### setInputPropertyValue

    public void setInputPropertyValue(int index,
                                      Producer p)

  Specified by:
    `setInputPropertyValue` in interface `Editable`
  Parameters:
    `index` - Index of input property (array index from this.getInputPropertyValue).
    `p` - Producer object to use for input property.
  See Also:
    `Editable.setInputPropertyValue(int, net.sf.j3d.threeD.raytracer.util.Producer)`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  Returns:
    "Silhouette Shader".

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