org.jvnet.substance.painter.noise
Class MedianBeakFilter

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

public class MedianBeakFilter
extends java.lang.Object
implements NoiseFilter

Noise filter that produces median-beak distribution. For values 0.0 and 1.0 the resulting value is 1.0, for value 0.5 the resulting value is 0.0. The filter signature is that of the downward-pointing beak. This class is part of officially supported API.

Author:
Kirill Grouchnikov

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jvnet.substance.painter.noise.NoiseFilter
NoiseFilter.TrigKind
 
Constructor Summary
MedianBeakFilter()
           
 
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
 

Constructor Detail

MedianBeakFilter

public MedianBeakFilter()
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.