fi.hut.tml.xsmiles.mlfc.smil.extension
Class AnimatedPairValue

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.smil.extension.AnimatedPairValue
All Implemented Interfaces:
AnimatedValue

public class AnimatedPairValue
extends java.lang.Object
implements AnimatedValue

Animated Pair Value, animates values in format "(x, y)"


Constructor Summary
AnimatedPairValue(float xx, float yy)
           
AnimatedPairValue(java.lang.String str)
           
 
Method Summary
 AnimatedValue add(AnimatedValue val)
          Add val to this.
 void clampValue()
           
 float distance(AnimatedValue val)
          Calculates the distance between this and val.
 float getX()
           
 float getY()
           
 AnimatedValue interpolate(AnimatedValue val, float t)
          Interpolate between this and val by t, where t is [0,1].
 AnimatedValue mult(int integer)
          Multiply this by integer value.
static AnimatedPairValue parse(java.lang.String str)
          Parse this string into value.
 java.lang.String toString()
          Parse this string into value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnimatedPairValue

public AnimatedPairValue(float xx,
                         float yy)

AnimatedPairValue

public AnimatedPairValue(java.lang.String str)
Method Detail

parse

public static AnimatedPairValue parse(java.lang.String str)
Parse this string into value. Throws NumberFormatException, if cannot parse.

Parameters:
str - String to be parsed
Returns:
Parsed AnimatedPairValue

getX

public float getX()

getY

public float getY()

toString

public java.lang.String toString()
Description copied from interface: AnimatedValue
Parse this string into value. Throws NumberFormatException, if cannot parse.

Specified by:
toString in interface AnimatedValue

clampValue

public void clampValue()
Specified by:
clampValue in interface AnimatedValue

add

public AnimatedValue add(AnimatedValue val)
Add val to this.

Specified by:
add in interface AnimatedValue
Parameters:
val - Val to be added to this.
Returns:
Returns val+this.

mult

public AnimatedValue mult(int integer)
Multiply this by integer value.

Specified by:
mult in interface AnimatedValue
Parameters:
integer - Pair value
Returns:
Returns this * integer.

interpolate

public AnimatedValue interpolate(AnimatedValue val,
                                 float t)
Interpolate between this and val by t, where t is [0,1]. For integers: (val-this)*t.

Specified by:
interpolate in interface AnimatedValue
Parameters:
val - AnimatedPairValue
Returns:
Returns this * integer.

distance

public float distance(AnimatedValue val)
Calculates the distance between this and val. (for one dimension: abs(this-val) )

Specified by:
distance in interface AnimatedValue
Parameters:
val - AnimatedPairValue
Returns:
Returns distance between this nad val..


X-Smiles 1.2