Package peasy.org.apache.commons.math.geometry

Examples of peasy.org.apache.commons.math.geometry.Rotation


      final double lookAtZ, final double distance) {
    this.p = parent;
    this.g  = pg;
    this.startCenter = this.center = new Vector3D(lookAtX, lookAtY, lookAtZ);
    this.startDistance = this.distance = distance;
    this.rotation = new Rotation();
    this.originalMatrix = parent.getMatrix((PMatrix3D)null);

    feed();

    rotateX = new DampedAction(this) {
      @Override
      protected void behave(final double velocity) {
        rotation = rotation.applyTo(new Rotation(Vector3D.plusI, velocity));
      }
    };

    rotateY = new DampedAction(this) {
      @Override
      protected void behave(final double velocity) {
        rotation = rotation.applyTo(new Rotation(Vector3D.plusJ, velocity));
      }
    };

    rotateZ = new DampedAction(this) {
      @Override
      protected void behave(final double velocity) {
        rotation = rotation.applyTo(new Rotation(Vector3D.plusK, velocity));
      }
    };

    dampedZoom = new DampedAction(this) {
      @Override
View Full Code Here


  public void reset() {
    reset(300);
  }

  public void reset(final long animationTimeInMillis) {
    setState(new CameraState(new Rotation(), startCenter, startDistance),
        animationTimeInMillis);
  }
View Full Code Here

    center = center.add(rotation.applyTo(new Vector3D(dx, dy, 0)));
    feed();
  }

  public void rotateX(final double angle) {
    rotation = rotation.applyTo(new Rotation(Vector3D.plusI, angle));
    feed();
  }
View Full Code Here

    rotation = rotation.applyTo(new Rotation(Vector3D.plusI, angle));
    feed();
  }

  public void rotateY(final double angle) {
    rotation = rotation.applyTo(new Rotation(Vector3D.plusJ, angle));
    feed();
  }
View Full Code Here

    rotation = rotation.applyTo(new Rotation(Vector3D.plusJ, angle));
    feed();
  }

  public void rotateZ(final double angle) {
    rotation = rotation.applyTo(new Rotation(Vector3D.plusK, angle));
    feed();
  }
View Full Code Here

    feed();
  }

  public void setRotations(final double pitch, final double yaw, final double roll) {
    rotationInterps.cancelInterpolation();
    this.rotation = new Rotation(RotationOrder.XYZ, pitch, yaw, roll);
    feed();
  }
View Full Code Here

      w2 = Math.sin(t * theta) / sinTheta;
    } else {
      w1 = 1.0 - t;
      w2 = t;
    }
    return new Rotation(w1 * a0 + w2 * b0, w1 * a1 + w2 * b1, w1 * a2 + w2 * b2, w1
        * a3 + w2 * b3, true);
  }
View Full Code Here

TOP

Related Classes of peasy.org.apache.commons.math.geometry.Rotation

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.