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.textures
Class StripeTexture

    java.lang.Object
      net.sf.j3d.threeD.raytracer.textures.StripeTexture

All Implemented Interfaces:
  Texture, ColorProducer, Editable, Producer

    public class StripeTexture

extends Object
implements Texture, Editable

The StripeTexture object can be used to stripe a surface.

Author:
  Mike Murray

Nested Class Summary

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

Field Summary
`static int` | `XAxis`
`static int` | `YAxis`
`static int` | `ZAxis`

Constructor Summary
`StripeTexture()` Constructs a StripeTexture object that can be used to stripe a surface.
`StripeTexture(Object[] props)` Constructs a StripeTexture object using the specified properties.

Method Summary
`RGB` | `evaluate(Object[] args)` Produces a color using the specified arguments.
`RGB` | `getColorAt(Vector point)` Returns the color of the texture represented by this Texture object at the specified point as an RGB object using the arguments stored by this Texture object.
`RGB` | `getColorAt(Vector point, Object[] props)` Returns the color of the texture represented by this Texture object at the specified point as an RGB object 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` | `setAxis(int axis)`
`void` | `setFirstColor(RGB color)`
`void` | `setInputPropertyValue(int index, Producer p)` Sets the values of properties of this HighlightShader object to those specified.
`void` | `setOffset(double off)`
`void` | `setPropertyValue(Object value, int index)` Sets the value of the property of this StripeTexture object at the specified index to the specified value.
`void` | `setPropertyValues(Object[] values)` Sets the values of properties of this StripeTexture object to those specified.
`void` | `setSecondColor(RGB color)`
`void` | `setSmooth(boolean s)`
`void` | `setStripeWidth(double w)`
`String` | `toString()`

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

Field Detail

### XAxis

    public static final int XAxis

See Also:
  Constant Field Values

### YAxis

    public static final int YAxis

See Also:
  Constant Field Values

### ZAxis

    public static final int ZAxis

See Also:
  Constant Field Values

Constructor Detail

### StripeTexture

    public StripeTexture()

  Constructs a StripeTexture object that can be used to stripe a surface. The default colors are black and white with a stripe width of 1.0 that is solid (not smooth) across the x axis.

### StripeTexture

    public StripeTexture(Object[] props)

  Constructs a StripeTexture object using the specified properties.

Method Detail

### getColorAt

    public RGB getColorAt(Vector point)

  Description copied from interface: `Texture`
  Returns the color of the texture represented by this Texture object at the specified point as an RGB object using the arguments stored by this Texture object.

  Specified by:
    `getColorAt` in interface `Texture`
  Returns:
    The color of the texture represented by this StripeTexture object at the specified point as an RGB object.

### getColorAt

    public RGB getColorAt(Vector point,
                          Object[] props)

  Description copied from interface: `Texture`
  Returns the color of the texture represented by this Texture object at the specified point as an RGB object using the specified arguments.

  Specified by:
    `getColorAt` in interface `Texture`
  Returns:
    The color of the texture represented by this StripeTexture object at the specified point as an RGB object.
  Throws:
    `IllegalArgumentException` - If one of the objects specified is not of the correct type.

### 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[]` - {point, arg0, arg1, ...}
  Returns:
    The RGB color produced.
  Throws:
    `IllegalArgumentException` - If args does not contain the correct object types.
  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`
  Returns:
    An array of String objects with names for each editable property of this StripeTexture object.

### 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`
  Returns:
    An array of String objects with descriptions for each editable property of this StripeTexture object.

### 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`
  Returns:
    An array of Class objects representing the class types of each editable property of this StripeTexture object.

### 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`
  Returns:
    The values of the properties of this StripeTexture object as an Object array.

### setPropertyValue

    public void setPropertyValue(Object value,
                                 int index)

  Sets the value of the property of this StripeTexture object at the specified index to the specified value.

  Specified by:
    `setPropertyValue` in interface `Editable`
  Throws:
    `IllegalArgumentException` - If the object specified is not of the correct type.
    `IndexOutOfBoundsException` - If the index specified does not correspond to an editable property of this StripeTexture object.

### setPropertyValues

    public void setPropertyValues(Object[] values)

  Sets the values of properties of this StripeTexture object to those specified.

  Specified by:
    `setPropertyValues` in interface `Editable`
  Throws:
    `IllegalArgumentException` - If one of the objects specified is not of the correct type. (Note: none of the values after the erroneous value will be set)
    `IndexOutOfBoundsException` - If the length of the specified array is longer than permitted.

### getInputPropertyValues

    public Producer[] getInputPropertyValues()

  Specified by:
    `getInputPropertyValues` in interface `Editable`
  Returns:
    {first color, second color}.

### setInputPropertyValue

    public void setInputPropertyValue(int index,
                                      Producer p)

  Sets the values of properties of this HighlightShader object to those specified.

  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.
  Throws:
    `IllegalArgumentException` - If the Producer object specified is not of the correct type.
    `IndexOutOfBoundsException` - If the index > 1.

### setStripeWidth

    public void setStripeWidth(double w)

### setSmooth

    public void setSmooth(boolean s)

### setAxis

    public void setAxis(int axis)

### setFirstColor

    public void setFirstColor(RGB color)

### setSecondColor

    public void setSecondColor(RGB color)

### setOffset

    public void setOffset(double off)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  Returns:
    "Stripe Texture".

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