plugins.noiseGen
Class ManagedNoiseEngine

java.lang.Object
  extended by Utilities.NoiseEngine
      extended by plugins.noiseGen.ManagedNoiseEngine
Direct Known Subclasses:
BrickPatternEngine, CellNoiseEngine, ChessPatternEngine, ManagedFunctionEngine

public abstract class ManagedNoiseEngine
extends NoiseEngine

Extending classes must override getNoiseForVertex(double x, double y, double z) or getNoiseForVertex(Vertex v) or an infinite loop and stack overflow will occur. Better use the getNoiseForVertex(double x, double y, double z) version

Author:
sdatta

Field Summary
 double depth
           
 double height
           
 java.lang.String noiseDescription
           
 java.lang.String noiseName
           
protected  javax.swing.JPanel panel
           
protected  AutoProperty properties
           
 double width
           
 double xOffset
           
 double yOffset
           
 double zOffset
           
 
Fields inherited from class Utilities.NoiseEngine
gridProjection, max, min, noiseArray, preview, previewNoise, scanlineSize, terrain, xGap
 
Constructor Summary
ManagedNoiseEngine()
           
 
Method Summary
 java.lang.String description()
           
 double getNoiseForVertex(double x, double y, double z)
           
 double getNoiseForVertex(int vertex)
           
 double getNoiseForVertex(Vertex vertex)
           
 Vertex getNoiseOffset()
           
 Vertex getNoiseSize()
           
 javax.swing.JPanel getPanel()
           
 Vertex[] getPreviewVertices()
           
 double getScaledMovedNoiseForVertex(double x, double y, double z)
          Range 0 to 1 spans the width of the preview window.
 void initNoise()
           
 void load(java.io.ObjectInputStream file)
           
 void makePreview()
           
 java.lang.String name()
           
 void restoreSettings()
           
 void save(java.io.ObjectOutputStream file)
           
 void storeSettings()
           
 
Methods inherited from class Utilities.NoiseEngine
copy, getDetails, getMax, getMin, getPreviewNoise, getTerrain, getVertex, paintIcon, setProjection, setTerrain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

noiseName

public java.lang.String noiseName

noiseDescription

public java.lang.String noiseDescription

panel

protected javax.swing.JPanel panel

properties

protected AutoProperty properties

width

public double width

height

public double height

depth

public double depth

xOffset

public double xOffset

yOffset

public double yOffset

zOffset

public double zOffset
Constructor Detail

ManagedNoiseEngine

public ManagedNoiseEngine()
Method Detail

initNoise

public void initNoise()
Specified by:
initNoise in class NoiseEngine

description

public java.lang.String description()
Specified by:
description in class NoiseEngine

getPanel

public javax.swing.JPanel getPanel()
Specified by:
getPanel in class NoiseEngine

name

public java.lang.String name()
Specified by:
name in class NoiseEngine

getNoiseForVertex

public double getNoiseForVertex(double x,
                                double y,
                                double z)

getNoiseForVertex

public double getNoiseForVertex(Vertex vertex)
Specified by:
getNoiseForVertex in class NoiseEngine

getScaledMovedNoiseForVertex

public double getScaledMovedNoiseForVertex(double x,
                                           double y,
                                           double z)
Description copied from class: NoiseEngine
Range 0 to 1 spans the width of the preview window.

Specified by:
getScaledMovedNoiseForVertex in class NoiseEngine
Returns:

getNoiseForVertex

public double getNoiseForVertex(int vertex)
Specified by:
getNoiseForVertex in class NoiseEngine

getPreviewVertices

public Vertex[] getPreviewVertices()
Overrides:
getPreviewVertices in class NoiseEngine

makePreview

public void makePreview()
Specified by:
makePreview in class NoiseEngine

restoreSettings

public void restoreSettings()
Specified by:
restoreSettings in class NoiseEngine

storeSettings

public void storeSettings()
Specified by:
storeSettings in class NoiseEngine

save

public void save(java.io.ObjectOutputStream file)
          throws java.io.IOException
Specified by:
save in class NoiseEngine
Throws:
java.io.IOException

load

public void load(java.io.ObjectInputStream file)
          throws java.lang.ClassNotFoundException,
                 java.io.IOException
Specified by:
load in class NoiseEngine
Throws:
java.lang.ClassNotFoundException
java.io.IOException

getNoiseOffset

public Vertex getNoiseOffset()
Overrides:
getNoiseOffset in class NoiseEngine

getNoiseSize

public Vertex getNoiseSize()
Overrides:
getNoiseSize in class NoiseEngine