com.threerings.opengl.effect
Class FloatFunction.ThreePoint

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.opengl.effect.FloatFunction
          extended by com.threerings.opengl.effect.FloatFunction.ThreePoint
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Enclosing class:
FloatFunction

public static class FloatFunction.ThreePoint
extends FloatFunction

A float function that blends linearly from a start value to a middle value, then to an end value.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.opengl.effect.FloatFunction
FloatFunction.Constant, FloatFunction.InAndOut, FloatFunction.Linear, FloatFunction.Multipoint, FloatFunction.ThreePoint
 
Field Summary
 float end
          The end value.
 float in
          The proportional time to spend blending into the middle value.
 float middle
          The middle value.
 float out
          The proportional time to spend blending into the end value.
 float start
          The starting value.
 
Constructor Summary
FloatFunction.ThreePoint()
          No-arg constructor for deserialization, etc.
FloatFunction.ThreePoint(FloatFunction.InAndOut function)
          Creates a three point function with the other function's parameters.
FloatFunction.ThreePoint(FloatFunction function)
          Creates a three point function with the other function's start, middle, and end.
 
Method Summary
 FloatFunction copy(FloatFunction result)
          Copies this function.
 float getValue(float t)
          Computes the value at the specified time.
 
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

start

@Editable(min=-1d/0d,
          max=-1d/0d,
          step=-1d/0d,
          scale=-1d/0d)
public float start
The starting value.


middle

@Editable(min=-1d/0d,
          max=-1d/0d,
          step=-1d/0d,
          scale=-1d/0d)
public float middle
The middle value.


end

@Editable(min=-1d/0d,
          max=-1d/0d,
          step=-1d/0d,
          scale=-1d/0d)
public float end
The end value.


in

@Editable(min=0.0,
          max=1.0,
          step=0.01)
public float in
The proportional time to spend blending into the middle value.


out

@Editable(min=0.0,
          max=1.0,
          step=0.01)
public float out
The proportional time to spend blending into the end value.

Constructor Detail

FloatFunction.ThreePoint

public FloatFunction.ThreePoint(FloatFunction function)
Creates a three point function with the other function's start, middle, and end.


FloatFunction.ThreePoint

public FloatFunction.ThreePoint(FloatFunction.InAndOut function)
Creates a three point function with the other function's parameters.


FloatFunction.ThreePoint

public FloatFunction.ThreePoint()
No-arg constructor for deserialization, etc.

Method Detail

getValue

public float getValue(float t)
Description copied from class: FloatFunction
Computes the value at the specified time.

Specified by:
getValue in class FloatFunction

copy

public FloatFunction copy(FloatFunction result)
Description copied from class: FloatFunction
Copies this function.

Specified by:
copy in class FloatFunction
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.