com.threerings.probs
Class ColorVariable.Constant

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.probs.ColorVariable
          extended by com.threerings.probs.ColorVariable.Constant
All Implemented Interfaces:
Exportable, com.threerings.io.Streamable, Copyable, Cloneable
Enclosing class:
ColorVariable

public static class ColorVariable.Constant
extends ColorVariable

Always returns the same value.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.probs.ColorVariable
ColorVariable.Constant, ColorVariable.Uniform
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
com.threerings.io.Streamable.Closure
 
Field Summary
 Color4f value
          The value to return.
 
Constructor Summary
ColorVariable.Constant()
          No-arg constructor for deserialization, etc.
ColorVariable.Constant(ColorVariable variable)
          Creates a constant variable from the parameters of the other variable.
 
Method Summary
 Color4f getMean(Color4f result)
          Computes the mean value.
 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
 

Field Detail

value

@Editable(mode="%INHERIT%")
public Color4f value
The value to return.

Constructor Detail

ColorVariable.Constant

public ColorVariable.Constant(ColorVariable variable)
Creates a constant variable from the parameters of the other variable.


ColorVariable.Constant

public ColorVariable.Constant()
No-arg constructor for deserialization, etc.

Method Detail

getValue

public Color4f getValue(Color4f result)
Description copied from class: ColorVariable
Computes a sample value according to the variable's distribution.

Specified by:
getValue in class ColorVariable
Returns:
a reference to the result value, for chaining.

getMean

public Color4f getMean(Color4f result)
Description copied from class: ColorVariable
Computes the mean value.

Specified by:
getMean in class ColorVariable
Returns:
a reference to the result value, for chaining.


Copyright © 2011. All Rights Reserved.