Exemple #1
0
 public void callOriginal() {
   camPos =
       new PVector(
           p.width * 0.5f, p.height * 0.5f, (p.height * 0.5f) / p.tan(p.PI * 30.0f / 180.0f));
   camCenter = new PVector(p.width * 0.5f, p.height * 0.5f, 0f);
   p.camera(camPos.x, camPos.y, camPos.z, camCenter.x, camCenter.y, camCenter.z, 0f, 1f, 0f);
 }
Exemple #2
0
 public void call3D() {
   calcCam(true);
   p.camera(camPos.x, camPos.y, camPos.z, camCenter.x, camCenter.y, camCenter.z, 0, 0, -1);
 }
Exemple #3
0
 public void call2D() {
   calcCam(false);
   p.camera(camCenter.x, camCenter.y, camPos.z, camCenter.x, camCenter.y, camCenter.z, 0, 1, 0);
 }
  /** Send what this camera sees to the view port */
  public void feed() {

    parent.perspective(fov, aspect, nearClip, farClip);

    parent.camera(cameraX, cameraY, cameraZ, targetX, targetY, targetZ, upX, upY, upZ);
  }