Package org.osm2world.core.math

Examples of org.osm2world.core.math.VectorXYZ.subtract()


        VectorXYZ backCenter = stepBorderPositions.get(step+1);
       
        double height = abs(frontCenter.y - backCenter.y);
               
        VectorXYZ center = (frontCenter.add(backCenter)).mult(0.5);
        center = center.subtract(Y_UNIT.mult(0.5 * height));
       
        VectorXZ faceDirection = segment.getDirection();
        if (frontCenter.y < backCenter.y) {
          //invert if upwards
          faceDirection = faceDirection.invert();
View Full Code Here


        VectorXYZ backCenter = stepBorderPositions.get(step+1);
       
        double height = abs(frontCenter.y - backCenter.y);
               
        VectorXYZ center = (frontCenter.add(backCenter)).mult(0.5);
        center = center.subtract(Y_UNIT.mult(0.5 * height));
       
        VectorXZ faceDirection = segment.getDirection();
        if (frontCenter.y < backCenter.y) {
          //invert if upwards
          faceDirection = faceDirection.invert();
View Full Code Here

    MapProjection projection = data.getConversionResults().getMapProjection();

    VectorXZ newPosXZ = projection.calcPos(lat, lon);
    VectorXYZ newPos = newPosXZ.xyz(height);
   
    renderOptions.camera.move(newPos.subtract(renderOptions.camera.getPos()));
   
  }

}
View Full Code Here

    ImmutableMaterial colorMaterial =
        new ImmutableMaterial(Lighting.FLAT, color);
   
    target.drawTriangleStrip(colorMaterial, asList(
        lastV,
        headStart.subtract(endDirXZ.mult(headLength/2)),
        headStart.add(endDirXZ.mult(headLength/2))),
        null);
   
    target.drawTriangleStrip(colorMaterial, asList(
        lastV,
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

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.