Examples of Rotation


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

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

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

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

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

    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

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

    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

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

    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

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

    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

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

      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

Examples of plotter.Rotation

    if (format.getClass().equals(DateNumberFormat.class)) {
      GregorianCalendar gc = new GregorianCalendar();
      gc.setTimeInMillis((long) value);
      label.setToolTipText(format.format(value) +" " + gc.get(Calendar.YEAR) );
    }
    Rotation labelRotation = getLabelRotation();
    if(labelRotation != null) {
      label.putClientProperty(Rotation.class.getName(), labelRotation);
    }
    label.setUI(MultiLineLabelUI.labelUI);
    label.setForeground(getForeground());
View Full Code Here

Examples of purrpackagedemo.Transformation.Rotation

  public void testTransformationsOnPoints() {
    Translation t = new Translation( 3, -2.5 );
    assertPointEquals( new Point( 3, -2.5 ), t.apply( Point.ORIGIN ));
    assertPointEquals( new Point( 4, -1.5 ), t.apply( new Point( 1, 1 ) ) );
   
    Rotation r = new Rotation( Math.PI / 2.0 );
    assertPointEquals( new Point( 0, 1 ), r.apply( new Point( 1, 0 )) );
    assertPointEquals( new Point( -2, 0 ), r.apply( r.apply( new Point( 2, 0 ))) );
   
    Expansion z = new Expansion( -2 );
    assertPointEquals( new Point( 14, -16 ), z.apply( new Point( -7, 8 )) );
  }
View Full Code Here

Examples of purrpackagedemo.Transformation.Rotation

  }
 
  @Test
  public void testAccidentally() {
    Point p = new Point( 0, -1 );
    Rotation r = new Rotation( Math.PI / 2);
    System.out.println( r.apply( p ));
   

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.