artofillusion.procedural
Class ParameterModule

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

public class ParameterModule
extends Module

This is a Module which outputs a per-vertex texture parameter.


Field Summary
 
Fields inherited from class artofillusion.procedural.Module
linkFrom, linkFromIndex
 
Constructor Summary
ParameterModule(java.awt.Point position)
           
 
Method Summary
 Module duplicate()
          Create a duplicate of this module.
 boolean edit(buoy.widget.BFrame fr, Scene theScene)
          This should display a user interface for editing the module, and return true if the module is changed.
 double getAverageValue(int which, double blur)
          Get the average value of the specified output port.
 double getDefaultValue()
          Get the default value for the parameter.
 double getMaximum()
          Get the maximum value for the parameter.
 double getMinimum()
          Get the minimum value for the parameter.
 TextureParameter getParameter(java.lang.Object owner)
           
 java.lang.String getParameterName()
          Get the name of the parameter.
 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 setDefaultValue(double val)
          Set the default value for the parameter.
 void setIndex(int index)
           
 void setMaximum(double val)
          Set the maximum value for the parameter.
 void setMinimum(double val)
          Set the minimum value for the parameter.
 void setParameterName(java.lang.String name)
          Set the name of the parameter.
 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, getValueError, getValueGradient, inputConnected, layout, setInput, setPosition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterModule

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

getParameterName

public java.lang.String getParameterName()
Get the name of the parameter.


setParameterName

public void setParameterName(java.lang.String name)
Set the name of the parameter.


getMinimum

public double getMinimum()
Get the minimum value for the parameter.


setMinimum

public void setMinimum(double val)
Set the minimum value for the parameter.


getMaximum

public double getMaximum()
Get the maximum value for the parameter.


setMaximum

public void setMaximum(double val)
Set the maximum value for the parameter.


getDefaultValue

public double getDefaultValue()
Get the default value for the parameter.


setDefaultValue

public void setDefaultValue(double val)
Set the default value for the parameter.


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

setIndex

public void setIndex(int index)

getParameter

public TextureParameter getParameter(java.lang.Object owner)

edit

public boolean edit(buoy.widget.BFrame fr,
                    Scene theScene)
Description copied from class: Module
This should display a user interface for editing the module, and return true if the module is changed. The default implementation does nothing.

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-2008 by Peter Eastman.