Package org.apache.commons.math.geometry

Examples of org.apache.commons.math.geometry.Rotation.applyTo()


      for (double phi = -1.55; phi < 1.55; phi += 0.2) {
          Vector3D u = new Vector3D(Math.cos(lambda) * Math.cos(phi),
                                    Math.sin(lambda) * Math.cos(phi),
                                    Math.sin(phi));
          r.applyInverseTo(r.applyTo(u));
          checkVector(u, r.applyInverseTo(r.applyTo(u)));
          checkVector(u, r.applyTo(r.applyInverseTo(u)));
      }
    }

    r = Rotation.IDENTITY;
View Full Code Here


          Vector3D u = new Vector3D(Math.cos(lambda) * Math.cos(phi),
                                    Math.sin(lambda) * Math.cos(phi),
                                    Math.sin(phi));
          r.applyInverseTo(r.applyTo(u));
          checkVector(u, r.applyInverseTo(r.applyTo(u)));
          checkVector(u, r.applyTo(r.applyInverseTo(u)));
      }
    }

    r = Rotation.IDENTITY;
    for (double lambda = 0; lambda < 6.2; lambda += 0.2) {
View Full Code Here

    for (double lambda = 0; lambda < 6.2; lambda += 0.2) {
      for (double phi = -1.55; phi < 1.55; phi += 0.2) {
          Vector3D u = new Vector3D(Math.cos(lambda) * Math.cos(phi),
                                    Math.sin(lambda) * Math.cos(phi),
                                    Math.sin(phi));
          checkVector(u, r.applyInverseTo(r.applyTo(u)));
          checkVector(u, r.applyTo(r.applyInverseTo(u)));
      }
    }

    r = new Rotation(Vector3D.PLUS_K, Math.PI);
View Full Code Here

      for (double phi = -1.55; phi < 1.55; phi += 0.2) {
          Vector3D u = new Vector3D(Math.cos(lambda) * Math.cos(phi),
                                    Math.sin(lambda) * Math.cos(phi),
                                    Math.sin(phi));
          checkVector(u, r.applyInverseTo(r.applyTo(u)));
          checkVector(u, r.applyTo(r.applyInverseTo(u)));
      }
    }

    r = new Rotation(Vector3D.PLUS_K, Math.PI);
    for (double lambda = 0; lambda < 6.2; lambda += 0.2) {
View Full Code Here

    for (double lambda = 0; lambda < 6.2; lambda += 0.2) {
      for (double phi = -1.55; phi < 1.55; phi += 0.2) {
          Vector3D u = new Vector3D(Math.cos(lambda) * Math.cos(phi),
                                    Math.sin(lambda) * Math.cos(phi),
                                    Math.sin(phi));
          checkVector(u, r.applyInverseTo(r.applyTo(u)));
          checkVector(u, r.applyTo(r.applyInverseTo(u)));
      }
    }

  }
View Full Code Here

      for (double phi = -1.55; phi < 1.55; phi += 0.2) {
          Vector3D u = new Vector3D(Math.cos(lambda) * Math.cos(phi),
                                    Math.sin(lambda) * Math.cos(phi),
                                    Math.sin(phi));
          checkVector(u, r.applyInverseTo(r.applyTo(u)));
          checkVector(u, r.applyTo(r.applyInverseTo(u)));
      }
    }

  }

View Full Code Here

  }

  public void testIdentity() {

    Rotation r = new Rotation();
    checkVector(r.applyTo(Vector3D.plusI), Vector3D.plusI);
    checkVector(r.applyTo(Vector3D.plusJ), Vector3D.plusJ);
    checkVector(r.applyTo(Vector3D.plusK), Vector3D.plusK);
    checkAngle(r.getAngle(), 0);

    r = new Rotation(-1, 0, 0, 0, false);
View Full Code Here

  public void testIdentity() {

    Rotation r = new Rotation();
    checkVector(r.applyTo(Vector3D.plusI), Vector3D.plusI);
    checkVector(r.applyTo(Vector3D.plusJ), Vector3D.plusJ);
    checkVector(r.applyTo(Vector3D.plusK), Vector3D.plusK);
    checkAngle(r.getAngle(), 0);

    r = new Rotation(-1, 0, 0, 0, false);
    checkVector(r.applyTo(Vector3D.plusI), Vector3D.plusI);
View Full Code Here

  public void testIdentity() {

    Rotation r = new Rotation();
    checkVector(r.applyTo(Vector3D.plusI), Vector3D.plusI);
    checkVector(r.applyTo(Vector3D.plusJ), Vector3D.plusJ);
    checkVector(r.applyTo(Vector3D.plusK), Vector3D.plusK);
    checkAngle(r.getAngle(), 0);

    r = new Rotation(-1, 0, 0, 0, false);
    checkVector(r.applyTo(Vector3D.plusI), Vector3D.plusI);
    checkVector(r.applyTo(Vector3D.plusJ), Vector3D.plusJ);
View Full Code Here

    checkVector(r.applyTo(Vector3D.plusJ), Vector3D.plusJ);
    checkVector(r.applyTo(Vector3D.plusK), Vector3D.plusK);
    checkAngle(r.getAngle(), 0);

    r = new Rotation(-1, 0, 0, 0, false);
    checkVector(r.applyTo(Vector3D.plusI), Vector3D.plusI);
    checkVector(r.applyTo(Vector3D.plusJ), Vector3D.plusJ);
    checkVector(r.applyTo(Vector3D.plusK), Vector3D.plusK);
    checkAngle(r.getAngle(), 0);

    r = new Rotation(42, 0, 0, 0, true);
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.