artofillusion.texture
Class ConstantParameterValue

java.lang.Object
  extended by artofillusion.texture.ConstantParameterValue
All Implemented Interfaces:
ParameterValue

public class ConstantParameterValue
extends java.lang.Object
implements ParameterValue

This class defines a scalar parameter which is constant over the surface of a mesh.


Constructor Summary
ConstantParameterValue(java.io.DataInputStream in)
          Reconstruct a serialized object.
ConstantParameterValue(double val)
          Create a new ConstantParameterValue object.
 
Method Summary
 ParameterValue duplicate()
          Create a duplicate of this object.
 boolean equals(java.lang.Object o)
          Determine whether this object represents the same value as another one.
 double getAverageValue()
          Get the average value of the parameter over the entire surface.
 double getValue()
          Get the constant parameter value.
 double getValue(int tri, int v1, int v2, int v3, double u, double v, double w)
          Get the value of the parameter at a particular point in a particular triangle.
 void setValue(double val)
          Set the constant parameter value.
 void writeToStream(java.io.DataOutputStream out)
          Write out a serialized representation of this object to a stream.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantParameterValue

public ConstantParameterValue(double val)
Create a new ConstantParameterValue object.


ConstantParameterValue

public ConstantParameterValue(java.io.DataInputStream in)
                       throws java.io.IOException
Reconstruct a serialized object.

Throws:
java.io.IOException
Method Detail

getValue

public double getValue()
Get the constant parameter value.


setValue

public void setValue(double val)
Set the constant parameter value.


getValue

public double getValue(int tri,
                       int v1,
                       int v2,
                       int v3,
                       double u,
                       double v,
                       double w)
Get the value of the parameter at a particular point in a particular triangle.

Specified by:
getValue in interface ParameterValue

getAverageValue

public double getAverageValue()
Get the average value of the parameter over the entire surface.

Specified by:
getAverageValue in interface ParameterValue

duplicate

public ParameterValue duplicate()
Create a duplicate of this object.

Specified by:
duplicate in interface ParameterValue

equals

public boolean equals(java.lang.Object o)
Determine whether this object represents the same value as another one.

Overrides:
equals in class java.lang.Object

writeToStream

public void writeToStream(java.io.DataOutputStream out)
                   throws java.io.IOException
Write out a serialized representation of this object to a stream.

Specified by:
writeToStream in interface ParameterValue
Throws:
java.io.IOException


Copyright © 1999-2011 by Peter Eastman.