Package org.spoutcraft.api.util

Examples of org.spoutcraft.api.util.Location


  public AnimatableLocation(double x, double y, double z, double yaw, double pitch) {
    super(x, y, z, yaw, pitch);
  }

  public Animatable getValueAt(double p, Animatable startValue, Animatable endValue) {
    Location p1 = (Location) startValue;
    Location p2 = (Location) endValue;
    double x = p1.getX(), y = p1.getY(), z = p1.getZ();
    double yaw = p1.getYaw(), pitch = p1.getPitch();
    x += (p1.getX() - p2.getX()) * p;
    y += (p1.getY() - p2.getY()) * p;
    z += (p1.getZ() - p2.getZ()) * p;
    yaw += (p1.getYaw() - p2.getYaw()) * p;
    pitch += (p1.getPitch() - p2.getPitch()) * p;

    return new AnimatableLocation(x, y, z, yaw, pitch);
  }
View Full Code Here

TOP

Related Classes of org.spoutcraft.api.util.Location

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.