org.bukkit.util.noise
Class SimplexOctaveGenerator

java.lang.Object
  extended by org.bukkit.util.noise.OctaveGenerator
      extended by org.bukkit.util.noise.SimplexOctaveGenerator

public class SimplexOctaveGenerator
extends OctaveGenerator

Creates simplex noise through unbiased octaves


Field Summary
 
Fields inherited from class org.bukkit.util.noise.OctaveGenerator
octaves, xScale, yScale, zScale
 
Constructor Summary
SimplexOctaveGenerator(long seed, int octaves)
          Creates a simplex octave generator for the given world
SimplexOctaveGenerator(Random rand, int octaves)
          Creates a simplex octave generator for the given Random
SimplexOctaveGenerator(World world, int octaves)
          Creates a simplex octave generator for the given world
 
Method Summary
 double getWScale()
          Gets the scale used for each W-coordinates passed
 double noise(double x, double y, double z, double w, double frequency, double amplitude)
          Generates noise for the 3D coordinates using the specified number of octaves and parameters
 double noise(double x, double y, double z, double w, double frequency, double amplitude, boolean normalized)
          Generates noise for the 3D coordinates using the specified number of octaves and parameters
 void setScale(double scale)
          Sets the scale used for all coordinates passed to this generator.
 void setWScale(double scale)
          Sets the scale used for each W-coordinates passed
 
Methods inherited from class org.bukkit.util.noise.OctaveGenerator
getOctaves, getXScale, getYScale, getZScale, noise, noise, noise, noise, noise, noise, setXScale, setYScale, setZScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplexOctaveGenerator

public SimplexOctaveGenerator(World world,
                              int octaves)
Creates a simplex octave generator for the given world

Parameters:
world - World to construct this generator for
octaves - Amount of octaves to create

SimplexOctaveGenerator

public SimplexOctaveGenerator(long seed,
                              int octaves)
Creates a simplex octave generator for the given world

Parameters:
seed - Seed to construct this generator for
octaves - Amount of octaves to create

SimplexOctaveGenerator

public SimplexOctaveGenerator(Random rand,
                              int octaves)
Creates a simplex octave generator for the given Random

Parameters:
rand - Random object to construct this generator for
octaves - Amount of octaves to create
Method Detail

setScale

public void setScale(double scale)
Description copied from class: OctaveGenerator
Sets the scale used for all coordinates passed to this generator.

This is the equivalent to setting each coordinate to the specified value.

Overrides:
setScale in class OctaveGenerator
Parameters:
scale - New value to scale each coordinate by

getWScale

public double getWScale()
Gets the scale used for each W-coordinates passed

Returns:
W scale

setWScale

public void setWScale(double scale)
Sets the scale used for each W-coordinates passed

Parameters:
scale - New W scale

noise

public double noise(double x,
                    double y,
                    double z,
                    double w,
                    double frequency,
                    double amplitude)
Generates noise for the 3D coordinates using the specified number of octaves and parameters

Parameters:
x - X-coordinate
y - Y-coordinate
z - Z-coordinate
w - W-coordinate
frequency - How much to alter the frequency by each octave
amplitude - How much to alter the amplitude by each octave
Returns:
Resulting noise

noise

public double noise(double x,
                    double y,
                    double z,
                    double w,
                    double frequency,
                    double amplitude,
                    boolean normalized)
Generates noise for the 3D coordinates using the specified number of octaves and parameters

Parameters:
x - X-coordinate
y - Y-coordinate
z - Z-coordinate
w - W-coordinate
frequency - How much to alter the frequency by each octave
amplitude - How much to alter the amplitude by each octave
normalized - If true, normalize the value to [-1, 1]
Returns:
Resulting noise


Copyright © 2013. All Rights Reserved.