Package org.osm2world.core.map_elevation.creation

Examples of org.osm2world.core.map_elevation.creation.DelaunayTriangulation$DelaunayTriangle


    for (Random random : RANDOMS) {
     
      AxisAlignedBoundingBoxXZ bounds = new AxisAlignedBoundingBoxXZ(
          -SIZE, -SIZE, +SIZE, +SIZE);
     
      DelaunayTriangulation triangulation =
          new DelaunayTriangulation(bounds);
      DelaunayTriangulation triangulation2 =
          new DelaunayTriangulation(bounds);
     
      List<VectorXYZ> points = new ArrayList<VectorXYZ>();
     
      for (int insertCount = 0; insertCount < 100; insertCount++) {
       
        System.out.println(RANDOMS.indexOf(random) + ":"
            + insertCount);
       
        double x = (random.nextDouble() * 2 * SIZE) - SIZE;
        double z = (random.nextDouble() * 2 * SIZE) - SIZE;
       
        VectorXYZ point = new VectorXYZ(x, 0, z);
       
        points.add(point);
       
        // check whether undoing works
       
        triangulation2.probe(point.xz());
       
        assertTriangulationsEqual(triangulation, triangulation2);
       
        // insert for real
       
        triangulation.insert(point);
        triangulation2.insert(point);
       
        assertTriangulationProperties(triangulation, points);
       
      }
     
View Full Code Here

TOP

Related Classes of org.osm2world.core.map_elevation.creation.DelaunayTriangulation$DelaunayTriangle

Copyright © 2018 www.massapicom. 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.