Package de.lessvoid.nifty.tools

Examples of de.lessvoid.nifty.tools.LinearInterpolator


  public boolean isTimeInterpolator() {
    return effectValues.containsTimeValues();
  }

  public LinearInterpolator getInterpolator() {
    LinearInterpolator interpolator = effectValues.toLinearInterpolator();
    if (interpolator == null) {
      return null;
    }
    interpolator.prepare();
    return interpolator;
  }
View Full Code Here


      return null;
    }
    if (!containsTimeValues()) {
      return null;
    }
    LinearInterpolator interpolator = new LinearInterpolator();
    for (Attributes p : values) {
        interpolator.addPoint(p.getAsFloat("time"), p.getAsFloat("value"));
      }
    return interpolator;
  }
View Full Code Here

    if (!effectValues.isEmpty()) {
      for (EffectValueType effectValueType : effectValues) {
        effectProperties.addEffectValue(effectValueType.getAttributes());
      }
      if (effectProperties.isTimeInterpolator()) {
        LinearInterpolator interpolator = effectProperties.getInterpolator();
        effectProperties.setProperty("length", String.valueOf((long)interpolator.getMaxX()));
      }
    }
  }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.tools.LinearInterpolator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.