Examples of mult()


Examples of org.osm2world.core.math.VectorXZ.mult()

     
      /* draw lid */
      List<VectorXYZ> vs = new ArrayList<VectorXYZ>();
      vs.add(getBase().addY(height + 0.2));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(-width/2)).add(faceVector.mult(depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(-width/2)).add(faceVector.mult(-depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(-depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(depth/2)).addY(height));
     
      target.drawTriangleFan(material.brighter(), vs, null);
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

      /* draw lid */
      List<VectorXYZ> vs = new ArrayList<VectorXYZ>();
      vs.add(getBase().addY(height + 0.2));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(-width/2)).add(faceVector.mult(depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(-width/2)).add(faceVector.mult(-depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(-depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(depth/2)).addY(height));
     
      target.drawTriangleFan(material.brighter(), vs, null);
     
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

      List<VectorXYZ> vs = new ArrayList<VectorXYZ>();
      vs.add(getBase().addY(height + 0.2));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(-width/2)).add(faceVector.mult(depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(-width/2)).add(faceVector.mult(-depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(-depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(depth/2)).addY(height));
     
      target.drawTriangleFan(material.brighter(), vs, null);
     
    }
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

      vs.add(getBase().addY(height + 0.2));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(-width/2)).add(faceVector.mult(depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(-width/2)).add(faceVector.mult(-depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(-depth/2)).addY(height));
      vs.add(getBase().add(boardVector.mult(width/2)).add(faceVector.mult(depth/2)).addY(height));
     
      target.drawTriangleFan(material.brighter(), vs, null);
     
    }
 
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

          target.drawBox(poleMaterial,
            getBase(),
            faceVector, height, 0.08, 0.08);
         
          target.drawBox(boxMaterial,
            getBase().add(faceVector.mult(width/2 - 0.08/2)).addY(height),
            faceVector, width, width, width);
          break;
        case PILLAR:
          height = parseHeight(node.getTags(), 2f);
          width = parseWidth(node.getTags(), 0.5f);
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

        float boxWidth     = width * 1/3;
        float roofOverhang = 0.3f;
       
        /* draw rondel */
        target.drawColumn(boxMaterial, null,
          getBase().add(rightVector.mult(-rondelWidth/2)),
          height,  rondelWidth/2, rondelWidth/2, false, true);
        /* draw box */
        target.drawBox(boxMaterial,
          getBase().add(rightVector.mult(boxWidth/2)).add(faceVector.mult(-boxWidth/2)),
          faceVector, height, boxWidth, boxWidth);
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

        target.drawColumn(boxMaterial, null,
          getBase().add(rightVector.mult(-rondelWidth/2)),
          height,  rondelWidth/2, rondelWidth/2, false, true);
        /* draw box */
        target.drawBox(boxMaterial,
          getBase().add(rightVector.mult(boxWidth/2)).add(faceVector.mult(-boxWidth/2)),
          faceVector, height, boxWidth, boxWidth);
        /* draw roof */
        target.drawColumn(otherMaterial, null,
          getBase().addY(height),
          0.1, rondelWidth/2 + roofOverhang/2, rondelWidth/2 + roofOverhang/2, true, true);
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

      } catch (NumberFormatException e) {}
      try {
        voltage = Integer.valueOf(powerLine.getTags().getValue("voltage"));
      } catch (NumberFormatException e) {}
    }
    dir = dir.mult(1.0/powerLines.size());

    return new TowerConfig(node, cables, voltage, dir);
  }
 
  @Override
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

          // use a simple parabola between two towers
          double height = (1 - Math.pow(2.0*(ratio - 0.5), 2)) * -SLACK_SPAN;
          // add a linear function to account for different tower/terrain heights
          height += ratio * heightDiff;
         
          path.add(start.add(dir.mult(dx)).add(0, height, 0));
        }
       
        List<List<VectorXYZ>> strips = createShapeExtrusionAlong(
            powerlineShape, path,
            nCopies(path.size(), VectorXYZ.Y_UNIT));
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.mult()

        headStart.add(endDirXZ.mult(headLength/2))),
        null);
   
    target.drawTriangleStrip(colorMaterial, asList(
        lastV,
        headStart.subtract(endNormalXZ.mult(headLength/2)),
        headStart.add(endNormalXZ.mult(headLength/2))),
        null);
   
  }
 
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.