org.jvnet.substance.painter.noise
Class FabricFilter

java.lang.Object
  extended by org.jvnet.substance.painter.noise.FabricFilter
All Implemented Interfaces:
NoiseFilter

public class FabricFilter
extends java.lang.Object
implements NoiseFilter

Noise filter that produces fabric-like distribution. This filter contains a collection of links, each one with its own orientation. Using a combination of filter links it's possible to create a composite complex fabric effect. This class is part of officially supported API.

Author:
Kirill Grouchnikov

Nested Class Summary
static class FabricFilter.FabricFilterLink
          A single fabric link.
 
Nested classes/interfaces inherited from interface org.jvnet.substance.painter.noise.NoiseFilter
NoiseFilter.TrigKind
 
Field Summary
protected  java.util.LinkedList<FabricFilter.FabricFilterLink> links
          Fabric links.
 
Constructor Summary
FabricFilter(FabricFilter.FabricFilterLink... links)
          Creates fabric filter.
 
Method Summary
 double apply(double x, double y, double z, double origValue)
          Applies filter on the noise at the specified location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

links

protected java.util.LinkedList<FabricFilter.FabricFilterLink> links
Fabric links.

Constructor Detail

FabricFilter

public FabricFilter(FabricFilter.FabricFilterLink... links)
Creates fabric filter.

Parameters:
links - Fabric links.
Method Detail

apply

public double apply(double x,
                    double y,
                    double z,
                    double origValue)
Description copied from interface: NoiseFilter
Applies filter on the noise at the specified location.

Specified by:
apply in interface NoiseFilter
Parameters:
x - X coordinate.
y - Y coordinate.
z - Z coordinate.
origValue - The original noise value.
Returns:
New noise value.