public class NoiseFilter2D extends AbstractMask2D
Constructor and Description |
---|
NoiseFilter2D(NoiseGenerator noiseGenerator,
double density)
Create a new noise filter.
|
Modifier and Type | Method and Description |
---|---|
double |
getDensity()
Get the probability of passing as a number between 0 and 1 (inclusive).
|
NoiseGenerator |
getNoiseGenerator()
Get the noise generator.
|
void |
setDensity(double density)
Set the probability of passing as a number between 0 and 1 (inclusive).
|
void |
setNoiseGenerator(NoiseGenerator noiseGenerator)
Set the noise generator.
|
boolean |
test(BlockVector2 pos)
Returns true if the criteria is met.
|
public NoiseFilter2D(NoiseGenerator noiseGenerator, double density)
noiseGenerator
- the noise generatordensity
- the densitypublic NoiseGenerator getNoiseGenerator()
public void setNoiseGenerator(NoiseGenerator noiseGenerator)
noiseGenerator
- a noise generatorpublic double getDensity()
public void setDensity(double density)
public boolean test(BlockVector2 pos)
Mask2D
pos
- the vector to test