Package org.osm2world.core.math

Examples of org.osm2world.core.math.VectorXYZ


  }

  private void setLookAt(VectorXYZ lookAt) {
    this.lookAt = lookAt;

    VectorXYZ right = getRight();
    up = right.crossNormalized(getViewDirection());
  }
View Full Code Here


    VectorXYZ right = getRight();
    up = right.crossNormalized(getViewDirection());
  }

  private void setLookAt(double x, double y, double z) {
    this.setLookAt(new VectorXYZ(x, y, z));
  }
View Full Code Here

  /**
   * moves pos and lookAt in the view direction
   * @param step  units to move forward
   */
  public void moveForward(double step) {
    VectorXYZ d = getViewDirection();
    move(d.x * step, d.y * step, d.z * step);
  }
 
View Full Code Here

  /**
   * moves pos and lookAt forward in the map plane
   * @param step  units to move forward
   */
  public void moveMapForward(double step) {
    VectorXYZ d = getViewDirection();
    VectorXZ md = new VectorXZ(d.x, d.z).normalize();
    move(md.x * step, 0, md.z * step);
  }
 
View Full Code Here

   * moves pos and lookAt to the right, orthogonally to the view direction
   *
   * @param step  units to move right, negative units move to the left
   */
  public void moveRight(double step) {
    VectorXYZ right = getRight();
    move(right.x * step, right.y * step, right.z * step);
  }
 
View Full Code Here

   * moves pos and lookAt to the right in the map plane
   *
   * @param step  units to move right, negative units move to the left
   */
  public void moveMapRight(double step) {
    VectorXYZ right = getRight();
    VectorXZ md = new VectorXZ(right.x, right.z).normalize();
    move(md.x * step, 0, md.z * step);
  }
 
View Full Code Here

   * @param d  angle in radians
   */
  public void rotateY(double d) {
   
    up = up.rotateY(d);
    VectorXYZ toOldLookAt = lookAt.subtract(pos);
    VectorXYZ toNewLookAt = toOldLookAt.rotateY(d);
   
    lookAt = pos.add(toNewLookAt);
  }
View Full Code Here

   *
   * @param d  angle in radians
   */
  public void yaw(double d) {
   
    VectorXYZ toOldLookAt = lookAt.subtract(pos);
    VectorXYZ toNewLookAt = toOldLookAt.rotateVec(d, up);
   
    lookAt = pos.add(toNewLookAt);
  }
View Full Code Here

        target.drawBox(BUS_STOP_SIGN,
          getBase().addY(height - signHeight),
          faceVector, signHeight, signWidth, 0.02);
        /*  draw timetable */
        target.drawBox(poleMaterial,
          getBase().addY(1.2f).add(new VectorXYZ(0.055f,0,0f).rotateY(directionAngle)),
          faceVector, 0.31, 0.01, 0.43);
       
        //TODO Add Shelter and bench
      }
    }
View Full Code Here

   * rolls the camera
   *
   * @param d  angle in radians
   */
  public void roll(double d) {
    VectorXYZ view = getViewDirection();
    up = up.rotateVec(d, view);
  }
View Full Code Here

TOP

Related Classes of org.osm2world.core.math.VectorXYZ

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.