Examples of VectorXYZ


Examples of org.osm2world.core.math.VectorXYZ

    objStream.println("# Projection information:");
    objStream.println("# Coordinate origin (0,0,0): "
        + "lat " + mapProjection.calcLat(VectorXZ.NULL_VECTOR) + ", "
        + "lon " + mapProjection.calcLon(VectorXZ.NULL_VECTOR) + ", "
        + "ele 0");
    objStream.println("# North direction: " + new VectorXYZ(
            mapProjection.getNorthUnit().x, 0,
            - mapProjection.getNorthUnit().z));
    objStream.println("# 1 coordinate unit corresponds to roughly "
        + "1 m in reality\n");
   
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

      sumX += v.x;
      sumY += v.y;
      sumZ += v.z;
    }
   
    return new VectorXYZ(sumX / p.primitive.vertices.size(),
        sumY / p.primitive.vertices.size(),
        sumZ / p.primitive.vertices.size());
   
  }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

    int[] normalIndices = null;
    if (normals != null) {
      normalIndices = normalsToIndices(normals);
    }
   
    VectorXYZ faceNormal = new TriangleXYZ(vs.get(0), vs.get(1), vs.get(2)).getNormal();
   
    for (int layer = 0; layer < max(1, material.getNumTextureLayers()); layer++) {
     
      useMaterial(material, layer);
   
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

  }
 
  private String formatVector(Object v) {
   
    if (v instanceof VectorXYZ) {
      VectorXYZ vXYZ = (VectorXYZ)v;
      return vXYZ.x + " " + vXYZ.y + " " + (-vXYZ.z);
    } else {
      VectorXZ vXZ = (VectorXZ)v;
      return vXZ.x + " " + vXZ.z;
    }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

       
        LatLonEle pos = args.getPviewPos();
        LatLonEle lookAt = args.getPviewLookat();
       
        camera = new Camera();
        VectorXYZ posV = proj.calcPos(pos.lat, pos.lon).xyz(pos.ele);
        VectorXYZ laV =  proj.calcPos(lookAt.lat, lookAt.lon).xyz(lookAt.ele);
        camera.setCamera(posV.x, posV.y, posV.z, laV.x, laV.y, laV.z);
       
        projection = new Projection(false,
            args.isPviewAspect() ? args.getPviewAspect() :
              (double)args.getResolution().x / args.getResolution().y,
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

      if (node.getTags().contains( "recycling:clothes", "yes")){
        n++;
      }
     
      if (node.getTags().contains( "recycling:paper", "yes")){
        drawContainer(target, "paper", getBase().add(new VectorXYZ((distanceX*(-n/2 + m) ), 0f(distanceZ/2)).rotateY(faceVector.angle())));
        drawContainer(target, "paper", getBase().add(new VectorXYZ((distanceX*(-n/2 + m) ), 0f,  -(distanceZ/2)).rotateY(faceVector.angle())));
        m++;
      }
      if (node.getTags().containsAny( asList("recycling:glass_bottles","recycling:glass" ), "yes")){
        drawContainer(target, "white_glass", getBase().add(new VectorXYZ((distanceX*(-n/2 + m) ), 0f(distanceZ/2)).rotateY(faceVector.angle())));
        drawContainer(target, "coloured_glass", getBase().add(new VectorXYZ((distanceX*(-n/2 + m) ), 0f,  -(distanceZ/2)).rotateY(faceVector.angle())));
        m++;
      }
      if (node.getTags().contains( "recycling:clothes", "yes")){
        drawContainer(target, "clothes", getBase().add(new VectorXYZ((distanceX*(-n/2 + m) ), 0f0).rotateY(faceVector.angle())));
      }
     

     
    }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

     
        target.drawBox(STEEL,
            pos,
            faceVector, height, width, width);
        target.drawBox(colourFront,
            pos.add(new VectorXYZ((width/2-0.10),0.1f, (width/2-0.1)).rotateY(directionAngle )),
            faceVector, height-0.2, 0.202, 0.202);
        target.drawBox(colourBack,
            pos.add(new VectorXYZ(-(width/2-0.10),0.1f, (width/2-0.1)).rotateY(directionAngle )),
            faceVector, height-0.2, 0.202, 0.202);
        target.drawBox(colourFront,
            pos.add(new VectorXYZ((width/2-0.10),0.1f, -(width/2-0.1)).rotateY(directionAngle )),
            faceVector, height-0.2, 0.202, 0.202);
        target.drawBox(colourBack,
            pos.add(new VectorXYZ(-(width/2-0.10),0.1f, -(width/2-0.1)).rotateY(directionAngle )),
            faceVector, height-0.2, 0.202, 0.202);
      }
    }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

   */
  public final DelaunayTriangle handleTriangle;

  public DelaunayTriangulation(AxisAlignedBoundingBoxXZ bounds) {
       
    VectorXYZ boundV0 = bounds.bottomLeft().xyz(0);
    VectorXYZ boundV1 = bounds.bottomRight().xyz(0);
    VectorXYZ boundV2 = bounds.topRight().xyz(0);
    VectorXYZ boundV3 = bounds.topLeft().xyz(0);
   
    DelaunayTriangle t1 = new DelaunayTriangle(boundV0, boundV1, boundV3);
    DelaunayTriangle t2 = new DelaunayTriangle(boundV1, boundV2, boundV3);
       
    t1.setNeighbor(1, t2);
    t2.setNeighbor(2, t1);
   
    handleTriangle = new DelaunayTriangle(boundV1, boundV0,
        new VectorXYZ(bounds.center().x, 0, bounds.minZ - bounds.sizeZ()));
       
    t1.setNeighbor(0, handleTriangle);
    handleTriangle.setNeighbor(0, t1);
   
  }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

   * temporarily inserts a point to calculate its natural neighbors,
   * then undoes the insertion
   */
  public NaturalNeighbors probe(VectorXZ point) {

    VectorXYZ probePoint = point.xyz(0);
   
    /* insert the point */
   
    Stack<Flip> flipStack = insert(probePoint);
   
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

      double width = projection.getVolumeHeight()
        * projection.getAspectRatio();
      target.appendVector(camera.getRight().mult(width).invert()); //invert compensates for left-handed vs. right handed coordinates
     
      target.append("\n  up ");
      VectorXYZ up = camera.getUp();
      target.appendVector(up.mult(projection.getVolumeHeight()));
           
      target.append("\n  look_at ");
      target.appendVector(camera.getLookAt());
           
    } else {
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.