Examples of Camera


Examples of com.eteks.sweethome3d.model.Camera

 
  /**
   * Stores a clone of the current camera in home under the given <code>name</code>.
   */
  public void storeCamera(String name) {
    Camera camera = this.home.getCamera().clone();
    camera.setName(name);
    List<Camera> homeStoredCameras = this.home.getStoredCameras();
    ArrayList<Camera> storedCameras = new ArrayList<Camera>(homeStoredCameras.size() + 1);
    storedCameras.addAll(homeStoredCameras);
    // Don't keep two cameras with the same name or the same location
    for (Iterator<Camera> it = storedCameras.iterator(); it.hasNext(); ) {
      Camera storedCamera = it.next();
      if (name.equals(storedCamera.getName())
          || (camera.getX() == storedCamera.getX()
              && camera.getY() == storedCamera.getY()
              && camera.getZ() == storedCamera.getZ()
              && camera.getPitch() == storedCamera.getPitch()
              && camera.getYaw() == storedCamera.getYaw()
              && camera.getFieldOfView() == storedCamera.getFieldOfView()
              && camera.getTime() == storedCamera.getTime()
              && camera.getLens() == storedCamera.getLens())) {
        it.remove();
      }
    }
    storedCameras.add(0, camera);
    // Ensure home stored cameras don't contain more than 10 cameras
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.world.Camera

        0.363f, false);
    world.add(emit);
    world.add(eF1);
    world.add(eF2);
    world.add(bF1);
    world.setCamera(new Camera() {

      @Override
      public Vector getPosition() {
        return new Vector(400, 100);
      }
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.world.Camera

  }

  @Override
  public Camera getCamera() {
    // Eine Kamera die immer auf das Zentrum der Engine fixiert ist
    return new Camera() {
      private static final long serialVersionUID = -8443861917665677557L;

      @Override
      public Vector getPosition() {
        return new Vector(Engine.getInstance().getWidth() / 2.0f,
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.world.Camera

    // Spielfigur
   
    // final Body figure = world.addFigure(117.0f, -30.0f);
   
    // Kamera Einstellung
    this.simulatedWorld.setCamera(new Camera() {
      public ROVector2f getPosition() {
        return figure.getPosition();
      }

      public void poll(Input input, float secounds) { }
View Full Code Here

Examples of com.graphics.Camera

 
  public static void initSim(){
    shapes = new ArrayList<Shape> ();
    sim_shapes = new ArrayList<Shape> ();
    distroy_shapes = new ArrayList<Shape> ();
    cam  = new Camera(new Vector(0,0,-500),new Quat());
  }
View Full Code Here

Examples of com.jme.renderer.Camera

     * Calculates the ray to use for picking, based on the given screen coordinates.
     */
    Ray calcPickRayWorld (int x, int y) {
        Ray result = null;
  // Get the world space coordinates of the eye position
  Camera camera = cameraComp.getCamera();
  Vector3f eyePosWorld = camera.getLocation();

  // Convert the event from AWT coords to JME float screen space.
  // Need to invert y because (0f, 0f) is at the button left corner.
  eventPointScreen.setX((float)x);
  eventPointScreen.setY((float)(canvas.getHeight()-1-y));

  // Get the world space coordinates of the screen space point from the event
  // (The glass plate of the screen is considered to be at at z = 0 in world space
        try { // May fail if jME thinks the camera matrix is singular
            camera.getWorldCoordinates(eventPointScreen, 0f, eventPointWorld);
            // Compute the diff and create the ray
            eventPointWorld.subtract(eyePosWorld, directionWorld);
            result = new Ray(eyePosWorld, directionWorld.normalize());
        } catch (ArithmeticException ex) {
            logger.log(Level.SEVERE,"Problem getting world space coords for pick ray.", ex);
View Full Code Here

Examples of com.jme.renderer.Camera

     * {@inheritDoc}
     */
    public void viewPropertiesChange(ViewProperty property) {
        // Update the camera properties, if it has been created already.
        if (cameraComponent != null) {
            Camera camera = cameraComponent.getCamera();
            float fov = viewProperties.getFieldOfView();
            float frontClip = viewProperties.getFrontClip();
            float backClip = viewProperties.getBackClip();
            camera.setFrustumPerspective(fov, aspect, frontClip, backClip);
        }
    }
View Full Code Here

Examples of com.jme.renderer.Camera

    private class MyCameraListener implements ViewManager.CameraListener {
        public void cameraMoved(CellTransform cameraWorldTransform) {
      synchronized (cameraLock) {
    cameraWorldTransform.getTranslation(cameraPositionWorld);
    if (cameraComp != null) {
        Camera camera = cameraComp.getCamera();
        cameraModelViewMatrix = ((AbstractCamera)camera).getModelViewMatrix();
        cameraModelViewMatrixInverse = null;
    }
      }
  }
View Full Code Here

Examples of com.jme.renderer.Camera

  /**
   * Create the chase camera and assign a tank to it.
   *
   */
  protected void buildCamera() {
    Camera cam = renderer.getCamera();

    // initialize the perspective
    cam.setFrustumPerspective(60.0f, (float) display.getWidth()
        / (float) display.getHeight(), nearFrustrum, farFrustrum);
    cam.update();

    // initialize the control scheme
    chaseCam = new MouseLookCamera(cam, player.getControlledObject(), root,
        15, 0, 0);
  }
View Full Code Here

Examples of com.jme3.renderer.Camera

      
        renderer = context.getRenderer();
       
        // init Camera --------------------------------
       
        cam = new Camera(settings.getWidth(), settings.getHeight());

        cam.setFrustumPerspective(45f, (float)cam.getWidth() / cam.getHeight(), 1f, 1000f);
        cam.setLocation(new Vector3f(0f, 0f, 10f));
        cam.lookAt(new Vector3f(0f, 0f, 0f), Vector3f.UNIT_Y);
       

        renderManager = new RenderManager(renderer);
        //Remy - 09/14/2010 setted the timer in the renderManager
        renderManager.setTimer(timer);
        viewPort = renderManager.createMainView("Default", cam);
        viewPort.setClearEnabled(true);

        // Create a new cam for the gui
        Camera guiCam = new Camera(settings.getWidth(), settings.getHeight());
        guiViewPort = renderManager.createPostView("Gui Default", guiCam);
        guiViewPort.setClearEnabled(false);
       
        // init Input ----------------------------------
       
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.