Package org.earth3d.jearth.math

Examples of org.earth3d.jearth.math.Point3D


    double distance;
    float edgeSize;

    if (Global.FORWARD_VIEW) {
      if (virtualviewer.equals(new Point3D(0,0,0))) { // square root cannot be solved, earth not visible in center
        distance = getDistance(viewer.normalize().multiply(1+distsurface/Global.CENTERWEIGHT), ((HeightfieldTreeNodeCore)(currentNode.getCore(1))).getRect());
      }
      else {
        distance = getDistance(virtualviewer, ((HeightfieldTreeNodeCore)(currentNode.getCore(1))).getRect());
      }
View Full Code Here


      return(result);
    }


    /* calculate sphere cone */
    Point3D spherecenter = new Point3D(0,0,0);
    Point3D axis = spherecenter.sub(viewer);
    float o = (float) Math.asin(Global.DRAWRADIUS/axis.length());
    Point3D b = bs.center.sub(viewer);
    double a2 = axis.skalarproduct(b)/(axis.length()*b.length());
    if (a2 > 1) a2 = 1;
    float o2 = (float) Math.acos(a2);
    boolean occresult = o2<o;
    if (occresult) {
      // if it is on the other side of the planet (on the back side)
View Full Code Here

      gl.glBlendFunc (GL.GL_SRC_ALPHA,
          GL.GL_ONE_MINUS_SRC_ALPHA);
      // draw markers
      for(Marker marker : markers) {
//        Point3D center = getGlmain3d().getSphere().getPoint(marker.point);
        Point3D center = marker.getPoint();
       
        gl.glLoadIdentity();
        gl.glRasterPos3d(center.x, center.y, center.z);
        gl.glBitmap(0, 0, 0, 0, -marker.getIcon().getWidth()/2, 0, null); // move raster position
        gl.glDrawPixels(marker.getIcon().getWidth(), marker.getIcon().getHeight(), GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, marker.getIconBuffer());
View Full Code Here

   * Allows the user to add a new mark to the selected position.
   */
  public void mousePressed(MouseEvent e) {
    int pressedbutton = e.getButton();
    if (pressedbutton == MouseEvent.BUTTON1) {
      Point3D point = getGlmain3d().getSelectedPointOnSurface(e.getX(), e.getY());
     
      // create a new marker and let the user edit it
      Marker marker = new Marker(point, "");
      final MarkerEditForm mef = new MarkerEditForm();
      mef.setMarker(marker);
View Full Code Here

TOP

Related Classes of org.earth3d.jearth.math.Point3D

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.