Examples of VectorXYZ


Examples of org.osm2world.core.math.VectorXYZ

          pos.xyz(holeBottomEle), 1.5, 0.007, 0.007, false, true);
     
      ImmutableMaterial flagcloth = new ImmutableMaterial(Lighting.SMOOTH, Color.YELLOW);
     
      List<VectorXYZ> flagVertices = asList(
          new VectorXYZ(pos.x, 1.5, pos.z),
          new VectorXYZ(pos.x, 1.2, pos.z),
          new VectorXYZ(pos.x + 0.4, 1.5, pos.z),
          new VectorXYZ(pos.x + 0.4, 1.2, pos.z));
     
      target.drawTriangleStrip(flagcloth, flagVertices,
          texCoordLists(flagVertices, flagcloth, STRIP_WALL));
     
    }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

    public void renderTo(Target<?> target) {
     
      //TODO: join ways back together to reduce the number of caps
     
      List<VectorXYZ> wallShape = asList(
        new VectorXYZ(-width/2, 0, 0),
        new VectorXYZ(-width/2, height, 0),
        new VectorXYZ(+width/2, height, 0),
        new VectorXYZ(+width/2, 0, 0)
      );
     
      List<VectorXYZ> path = getCenterline();
     
      List<List<VectorXYZ>> strips = createShapeExtrusionAlong(wallShape,
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

    private void drawBridgePillarAt(Target<?> target, VectorXZ pos) {
   
      /* determine the bridge elevation at that point */
     
      VectorXYZ top = null;
     
      List<VectorXYZ> vs = primaryRep.getCenterline();
     
      for (int i = 0; i + 1 < vs.size(); i++) {
       
        if (isBetween(pos, vs.get(i).xz(), vs.get(i+1).xz())) {
          top = interpolateElevation(pos, vs.get(i), vs.get(i+1));
        }
       
      }

      /* draw the pillar */
     
      // TODO: start pillar at ground instead of just 100 meters below the bridge
      target.drawColumn(Materials.BRIDGE_PILLAR_DEFAULT, null,
          top.addY(-100),
          100,
          0.2, 0.2, false, false);

    }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

      /* construct panel geometry */

      double panelAngle = PI / 4;
      double panelHeight = 5;
     
      VectorXYZ upVector = Z_UNIT.mult(panelHeight).rotateX(-panelAngle);
           
      /* place and draw rows of panels */
     
      AxisAlignedBoundingBoxXZ box = this.getAxisAlignedBoundingBoxXZ();
     
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

  private void zoom(boolean zoomIn, double scale) {
    Camera c = renderOptions.camera;
   
    if (c != null) {

      VectorXYZ toLookAt = c.getLookAt().subtract(c.getPos());
      VectorXYZ move = toLookAt.mult(scale * (zoomIn ? 0.2f : -0.25f));
      VectorXYZ newPos = c.getPos().add(move);

      c.setPos(newPos);
    }
  }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

      return containedWithinRiverbank;
    }

    private static void modifyLineHeight(List<VectorXYZ> leftWaterBorder, float yMod) {
      for (int i = 0; i < leftWaterBorder.size(); i++) {
        VectorXYZ v = leftWaterBorder.get(i);
        leftWaterBorder.set(i, v.y(v.y+yMod));
      }
    }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

      }
     
      double x = (random.nextDouble() * 2 * SIZE) - SIZE;
      double z = (random.nextDouble() * 2 * SIZE) - SIZE;
     
      panel.add(new VectorXYZ(x, 0, z));
     
    }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

     
      double width=0.1;
      double height=0.5;
     
      List<VectorXYZ> wallShape = asList(
          new VectorXYZ(-width/2, 0, 0),
          new VectorXYZ(-width/2, height, 0),
          new VectorXYZ(+width/2, height, 0),
          new VectorXYZ(+width/2, 0, 0)
      );
     
      List<VectorXYZ> path = getOutlinePolygon().getVertexLoop();
     
      List<List<VectorXYZ>> strips = createShapeExtrusionAlong(
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

      /* apply elevation values */
     
      FaultTolerantIterationUtil.iterate(variables, new Operation<LPVariablePair>() {
        @Override public void perform(LPVariablePair v) {
         
          VectorXYZ posXYZ = v.getPosXYZ().addY(
              + result.get(v.posVar()).doubleValue()
              - result.get(v.negVar()).doubleValue());
         
          v.setPosXYZ(posXYZ);
         
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ

    }
   
    @Override
    public void renderTo(Target<?> target) {
     
      VectorXYZ startLeft = getEleConnectors().getPosXYZ(
          startPos.subtract(cutVector.mult(0.5 * startWidth)));
      VectorXYZ startRight = getEleConnectors().getPosXYZ(
          startPos.add(cutVector.mult(0.5 * startWidth)));
     
      VectorXYZ endLeft = getEleConnectors().getPosXYZ(
          endPos.subtract(cutVector.mult(0.5 * endWidth)));
      VectorXYZ endRight = getEleConnectors().getPosXYZ(
          endPos.add(cutVector.mult(0.5 * endWidth)));
     
      /* determine surface material */
     
      Material surface = getSurfaceForNode(node);
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.