Esempio n. 1
0
  public Point projectScreen(Vector23f p) {
    Ray3f eye2P = new Ray3f(eye, p);
    Vector23f proj = eye2P.intersect(viewPlane);

    proj.x -= (eye.x - width / 2);
    proj.y -= (eye.y - height / 2);

    return new Point((int) proj.x, (int) proj.y);
  }
Esempio n. 2
0
  public void moveEye(float deltaX, float deltaY, float deltaZ) {
    eye.x -= deltaX;
    eye.y -= deltaY;

    if (eye.z - deltaZ > 0) {
      eye.z -= deltaZ;
    }

    findViewPlane();
  }
Esempio n. 3
0
 public void moveEyeTo(float x, float y) {
   eye.x = x;
   eye.y = y;
 }