Package org.osm2world.core.math

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


        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

      } 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

          // 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

        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

        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.