artofillusion.procedural
Class CoordinateModule

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

public class CoordinateModule
extends Module

This is a Module which outputs a coordinate (x, y, z, or t).


Field Summary
static java.lang.String[] COORD_NAME
           
static int T
           
static int X
           
static int Y
           
static int Z
           
 
Fields inherited from class artofillusion.procedural.Module
linkFrom, linkFromIndex
 
Constructor Summary
CoordinateModule(java.awt.Point position)
           
CoordinateModule(java.awt.Point position, int coordinate)
           
 
Method Summary
 Module duplicate()
          Create a duplicate of this module.
 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.
 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 setCoordinate(int coordinate)
           
 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, edit, edit, 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
 

Field Detail

X

public static final int X
See Also:
Constant Field Values

Y

public static final int Y
See Also:
Constant Field Values

Z

public static final int Z
See Also:
Constant Field Values

T

public static final int T
See Also:
Constant Field Values

COORD_NAME

public static final java.lang.String[] COORD_NAME
Constructor Detail

CoordinateModule

public CoordinateModule(java.awt.Point position)

CoordinateModule

public CoordinateModule(java.awt.Point position,
                        int coordinate)
Method Detail

setCoordinate

public void setCoordinate(int coordinate)

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

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.