Examples of CameraPosPreference


Examples of com.google.devtools.depan.eclipse.editors.CameraPosPreference

  }

  @Override
  public void marshal(Object source, HierarchicalStreamWriter writer,
      MarshallingContext context) {
    CameraPosPreference pos = (CameraPosPreference) source;
    Float posX = pos.getX();
    Float posY = pos.getY();
    Float posZ = pos.getZ();

    writer.addAttribute("x", Float.toString(posX));
    writer.addAttribute("y", Float.toString(posY));
    writer.addAttribute("z", Float.toString(posZ));
  }
View Full Code Here

Examples of com.google.devtools.depan.eclipse.editors.CameraPosPreference

      String textY = reader.getAttribute("y");
      String textZ = reader.getAttribute("z");
      Float posX = Float.valueOf(textX);
      Float posY = Float.valueOf(textY);
      Float posZ = Float.valueOf(textZ);
      return new CameraPosPreference(posX, posY, posZ);
    } catch (RuntimeException err) {
      err.printStackTrace();
      throw err;
    }
  }
View Full Code Here

Examples of com.google.devtools.depan.eclipse.editors.CameraPosPreference

  /**
   * Save the current camera position into the supplied ScenePreferences
   * instance.
   */
  public void saveCameraPosition(ScenePreferences prefs) {
    CameraPosPreference prefsPos = prefs.getCameraPos();
    if (null == prefsPos) {
      prefsPos = CameraPosPreference.getDefaultCameraPos();
      prefs.setCameraPos(prefsPos);
    }

    float[] scenePos = glPanel.getCameraPosition();
    prefsPos.setX(scenePos[0]);
    prefsPos.setY(scenePos[1]);
    prefsPos.setZ(scenePos[2]);
  }
View Full Code Here

Examples of com.google.devtools.depan.eclipse.editors.CameraPosPreference

   */
  public void setCameraPosition(ScenePreferences prefs) {
    if (null == prefs) {
      return;
    }
    CameraPosPreference prefsPos = prefs.getCameraPos();
    if (null == prefsPos) {
      return;
    }

    GLScene scene = glPanel;
    scene.moveToCamera(prefsPos.getX(), prefsPos.getY());
    scene.zoomToCamera(prefsPos.getZ());
    scene.cutCamera();
  }
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.