com.threerings.probs
Class ColorVariable

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.probs.ColorVariable
All Implemented Interfaces:
Exportable, com.threerings.io.Streamable, Copyable, Cloneable
Direct Known Subclasses:
ColorVariable.Constant, ColorVariable.Uniform

@EditorTypes(value={ColorVariable.Constant.class,ColorVariable.Uniform.class},
             label="distribution")
public abstract class ColorVariable
extends DeepObject
implements Exportable, com.threerings.io.Streamable

A color-valued random variable.


Nested Class Summary
static class ColorVariable.Constant
          Always returns the same value.
static class ColorVariable.Uniform
          Returns values uniformly distributed in RGBA space.
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
com.threerings.io.Streamable.Closure
 
Constructor Summary
ColorVariable()
           
 
Method Summary
abstract  Color4f getMean(Color4f result)
          Computes the mean value.
abstract  Color4f getValue(Color4f 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

ColorVariable

public ColorVariable()
Method Detail

getValue

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

Returns:
a reference to the result value, for chaining.

getMean

public abstract Color4f getMean(Color4f result)
Computes the mean value.

Returns:
a reference to the result value, for chaining.


Copyright © 2011. All Rights Reserved.