Package org.osm2world.core.math

Examples of org.osm2world.core.math.PolygonXZ


   
    if (vectors.size() > 2) {
     
      vectors.add(vectors.get(0)); //close polygon
     
      PolygonXZ poly = new PolygonXZ(vectors);
     
      try {
       
        SimplePolygonXZ simplePoly = poly.asSimplePolygon();
       
        if (simplePoly.isClockwise()) {
          return simplePoly.reverse();
        } else {
          return simplePoly;
View Full Code Here


    // first column
    for (int z = numPointsZ - 2; z >= 0 /* [0][0] will be added again*/; z--) {
      vertices.add(vectorXZForPointAt(0, z));
    }
   
    return new PolygonXZ(vertices);
   
  }
View Full Code Here

    for (TerrainBoundaryWorldObject tb :
      map.getWorldObjects(TerrainBoundaryWorldObject.class)) {
     
      AxisAlignedBoundingBoxXZ box = tb.getAxisAlignedBoundingBoxXZ();
      if (box != null) {
        PolygonXZ polygon = box.polygonXZ();
        target.drawLineLoop(BB_COLOR, 1, polygon.xyz(0).getVertices());
      }
     
    }
   
  }
View Full Code Here

      }
     
      @Override
      public PolygonWithHolesXZ getPolygon() {
       
        PolygonXZ newOuter = polygon.getOuter();
       
        newOuter = insertIntoPolygon(newOuter, cap1part.p1, 0.2);
        newOuter = insertIntoPolygon(newOuter, cap1part.p2, 0.2);
        newOuter = insertIntoPolygon(newOuter, cap2part.p1, 0.2);
        newOuter = insertIntoPolygon(newOuter, cap2part.p2, 0.2);
       
        return new PolygonWithHolesXZ(
            newOuter.asSimplePolygon(),
            polygon.getHoles());
       
      }
View Full Code Here

      }
     
      @Override
      public PolygonWithHolesXZ getPolygon() {
       
        PolygonXZ newOuter = polygon.getOuter();

        newOuter = insertIntoPolygon(newOuter, ridge.p1, 0.2);
        newOuter = insertIntoPolygon(newOuter, ridge.p2, 0.2);
        newOuter = insertIntoPolygon(newOuter, cap1part.p1, 0.2);
        newOuter = insertIntoPolygon(newOuter, cap1part.p2, 0.2);
        newOuter = insertIntoPolygon(newOuter, cap2part.p1, 0.2);
        newOuter = insertIntoPolygon(newOuter, cap2part.p2, 0.2);
       
        //TODO: add intersections of additional edges with outline?
       
        return new PolygonWithHolesXZ(
            newOuter.asSimplePolygon(),
            polygon.getHoles());
       
      }
View Full Code Here

      }

      @Override
      public PolygonWithHolesXZ getPolygon() {

        PolygonXZ newOuter = polygon.getOuter();

        newOuter = insertIntoPolygon(newOuter, ridge.p1, 0.2);
        newOuter = insertIntoPolygon(newOuter, ridge.p2, 0.2);

        for (LineSegmentXZ capPart : capParts){
          newOuter = insertIntoPolygon(newOuter, capPart.p1, 0.2);
          newOuter = insertIntoPolygon(newOuter, capPart.p2, 0.2);
        }

        //TODO: add intersections of additional edges with outline?
        return new PolygonWithHolesXZ(
            newOuter.asSimplePolygon(),
            polygon.getHoles());

      }
View Full Code Here

      }
     
      @Override
      public PolygonWithHolesXZ getPolygon() {
       
        PolygonXZ newOuter = polygon.getOuter();
       
        newOuter = insertIntoPolygon(newOuter, ridge.p1, 0.2);
        newOuter = insertIntoPolygon(newOuter, ridge.p2, 0.2);
       
        return new PolygonWithHolesXZ(
            newOuter.asSimplePolygon(),
            polygon.getHoles());
       
      }
View Full Code Here

TOP

Related Classes of org.osm2world.core.math.PolygonXZ

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.