artofillusion.procedural
Class JitterModule

java.lang.Object
  extended by artofillusion.procedural.Module
      extended by artofillusion.procedural.JitterModule

public class JitterModule
extends Module

This is a Module which randomly displaces the coordinate system.


Field Summary
 
Fields inherited from class artofillusion.procedural.Module
linkFrom, linkFromIndex
 
Constructor Summary
JitterModule(java.awt.Point position)
           
 
Method Summary
 Module duplicate()
          Create a duplicate of this module.
 boolean edit(ProcedureEditor editor, Scene theScene)
          This is an old form of edit() that exists only to maintain compatibility with old plugins.
 double getAverageValue(int which, double blur)
          Get the average value of the specified output port.
 double getValueError(int which, double blur)
          Get the uncertainty in the value of the specified output port.
 void getValueGradient(int which, Vec3 grad, double blur)
          Get the gradient of the value of the specified output port.
 double getXAmplitude()
          Get the X amplitude.
 double getXScale()
          Get the X scale.
 double getYAmplitude()
          Get the Y amplitude.
 double getYScale()
          Get the Y scale.
 double getZAmplitude()
          Get the Z amplitude.
 double getZScale()
          Get the Z scale.
 void init(PointInfo p)
          This method initializes the module in preparation for evaluating the procedure at a new point.
 void readFromStream(java.io.DataInputStream in, Scene theScene)
          Read in the module's parameters from an input stream.
 void setXAmplitude(double amp)
          Set the X amplitude.
 void setXScale(double scale)
          Set the X scale.
 void setYAmplitude(double amp)
          Set the Y amplitude.
 void setYScale(double scale)
          Set the Y scale.
 void setZAmplitude(double amp)
          Set the Z amplitude.
 void setZScale(double scale)
          Set the Z scale.
 void writeToStream(java.io.DataOutputStream out, Scene theScene)
          Write out the module's parameters to an output stream.
 
Methods inherited from class artofillusion.procedural.Module
calcSize, checkFeedback, draw, getBounds, getClickedPort, getColor, getInputIndex, getInputPorts, getName, getOutputIndex, getOutputPorts, inputConnected, layout, setInput, setPosition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JitterModule

public JitterModule(java.awt.Point position)
Method Detail

getXScale

public double getXScale()
Get the X scale.


setXScale

public void setXScale(double scale)
Set the X scale.


getYScale

public double getYScale()
Get the Y scale.


setYScale

public void setYScale(double scale)
Set the Y scale.


getZScale

public double getZScale()
Get the Z scale.


setZScale

public void setZScale(double scale)
Set the Z scale.


getXAmplitude

public double getXAmplitude()
Get the X amplitude.


setXAmplitude

public void setXAmplitude(double amp)
Set the X amplitude.


getYAmplitude

public double getYAmplitude()
Get the Y amplitude.


setYAmplitude

public void setYAmplitude(double amp)
Set the Y amplitude.


getZAmplitude

public double getZAmplitude()
Get the Z amplitude.


setZAmplitude

public void setZAmplitude(double amp)
Set the Z amplitude.


init

public void init(PointInfo p)
Description copied from class: Module
This method initializes the module in preparation for evaluating the procedure at a new point. The default implementation does nothing. Subclasses whose output depends on the point should override this method.

Overrides:
init in class Module

getAverageValue

public double getAverageValue(int which,
                              double blur)
Description copied from class: Module
Get the average value of the specified output port. If the specified output port does not have a value type of NUMBER, the result is undefined. Blur specifies the amount of smoothing to use. Subclasses which can return values should override this method.

Overrides:
getAverageValue in class Module

getValueError

public double getValueError(int which,
                            double blur)
Description copied from class: Module
Get the uncertainty in the value of the specified output port. If the specified output port does not have a value type of NUMBER, the result is undefined. Blur specifies the amount of smoothing to use. Subclasses which can return values should override this method.

Overrides:
getValueError in class Module

getValueGradient

public void getValueGradient(int which,
                             Vec3 grad,
                             double blur)
Description copied from class: Module
Get the gradient of the value of the specified output port. If the specified output port does not have a value type of NUMBER, the result is undefined. Blur specifies the amount of smoothing to use. Subclasses which can return values should override this method.

Overrides:
getValueGradient in class Module

edit

public boolean edit(ProcedureEditor editor,
                    Scene theScene)
Description copied from class: Module
This is an old form of edit() that exists only to maintain compatibility with old plugins. Subclasses should override the other form, not this one.

Overrides:
edit in class Module

duplicate

public Module duplicate()
Description copied from class: Module
Create a duplicate of this module. Subclasses with adjustable parameters should override this.

Overrides:
duplicate in class Module

writeToStream

public void writeToStream(java.io.DataOutputStream out,
                          Scene theScene)
                   throws java.io.IOException
Description copied from class: Module
Write out the module's parameters to an output stream. Subclasses with editable parameters should override this method.

Overrides:
writeToStream in class Module
Throws:
java.io.IOException

readFromStream

public void readFromStream(java.io.DataInputStream in,
                           Scene theScene)
                    throws java.io.IOException
Description copied from class: Module
Read in the module's parameters from an input stream. Subclasses with editable parameters should override this method.

Overrides:
readFromStream in class Module
Throws:
java.io.IOException


Copyright © 1999-2011 by Peter Eastman.