com.threerings.probs
Class ColorFunctionVariable

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.probs.ColorFunctionVariable
All Implemented Interfaces:
Exportable, com.threerings.io.Streamable, Copyable, Cloneable
Direct Known Subclasses:
ColorFunctionVariable.Fixed, ColorFunctionVariable.VariableConstant, ColorFunctionVariable.VariableLinear

@EditorTypes(value={ColorFunctionVariable.Fixed.class,ColorFunctionVariable.VariableConstant.class,ColorFunctionVariable.VariableLinear.class},
             label="mode")
public abstract class ColorFunctionVariable
extends DeepObject
implements Exportable, com.threerings.io.Streamable

A ColorFunction random variable.


Nested Class Summary
static class ColorFunctionVariable.Fixed
          Simply returns the same function.
static class ColorFunctionVariable.VariableConstant
          Returns a constant function with a variable value.
static class ColorFunctionVariable.VariableLinear
          Returns a linear function with independent variable start and end values.
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
com.threerings.io.Streamable.Closure
 
Constructor Summary
ColorFunctionVariable()
           
 
Method Summary
abstract  ColorFunction getValue(ColorFunction result)
          Computes a sample value according to the variable's distribution.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColorFunctionVariable

public ColorFunctionVariable()
Method Detail

getValue

public abstract ColorFunction getValue(ColorFunction result)
Computes a sample value according to the variable's distribution.

Parameters:
result - an object to repopulate, if possible.
Returns:
either the result object, if it could be repopulated, or a new object containing the result.


Copyright © 2011. All Rights Reserved.