Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.PerspectiveCamera


      int w = Gdx.graphics.getWidth(), h = Gdx.graphics.getHeight();
      modelBatch = new ModelBatch();
      environment = new Environment();
      environment.add(new DirectionalLight().set(Color.WHITE, 0,0,-1));
     
      worldCamera = new PerspectiveCamera(67, w, h);
      worldCamera.position.set(10, 10, 10);
      worldCamera.lookAt(0,0,0);
      worldCamera.near = 0.1f;
      worldCamera.far = 300f;
      worldCamera.update();
View Full Code Here


    Vector3 oldPosition = new Vector3();
    Vector3 oldDirection = new Vector3();
    if (cam != null) {
      oldPosition.set(cam.position);
      oldDirection.set(cam.direction);
      cam = new PerspectiveCamera(28, Gdx.graphics.getWidth(),
          Gdx.graphics.getHeight());
      cam.position.set(oldPosition);
      cam.direction.set(oldDirection);
    } else {
      cam = new PerspectiveCamera(28, Gdx.graphics.getWidth(),
          Gdx.graphics.getHeight());
      cam.position.set(0, 0f, 16f);
      cam.direction.set(0, 0, -1);
    }
    cam.up.set(0, 1, 0);
View Full Code Here

    Vector3 oldPosition = new Vector3();
    Vector3 oldDirection = new Vector3();
    if (cam != null) {
      oldPosition.set(cam.position);
      oldDirection.set(cam.direction);
      cam = new PerspectiveCamera(45, Gdx.graphics.getWidth(),
          Gdx.graphics.getHeight());
      cam.position.set(oldPosition);
      cam.direction.set(oldDirection);
    } else {
      cam = new PerspectiveCamera(45, Gdx.graphics.getWidth(),
          Gdx.graphics.getHeight());
      cam.position.set(0, 0f, 16f);
      cam.direction.set(0, 0, -1);
    }
    cam.up.set(0, 1, 0);
View Full Code Here

    Vector3 oldPosition = new Vector3();
    Vector3 oldDirection = new Vector3();
    if (cam != null) {
      oldPosition.set(cam.position);
      oldDirection.set(cam.direction);
      cam = new PerspectiveCamera(28, Gdx.graphics.getWidth(),
          Gdx.graphics.getHeight());
      cam.position.set(oldPosition);
      cam.direction.set(oldDirection);
    } else {
      cam = new PerspectiveCamera(28, Gdx.graphics.getWidth(),
          Gdx.graphics.getHeight());
      cam.position.set(0, 0f, 16f);
      cam.direction.set(0, 0, -1);
    }
    cam.up.set(0, 1, 0);
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.PerspectiveCamera

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.