Examples of expandBy()


Examples of com.vividsolutions.jts.geom.Envelope.expandBy()

    public boolean labelsWithinDistance(Rectangle2D bounds, double distance) {
        if (distance < 0)
            return false;

        Envelope e = toEnvelope(bounds);
        e.expandBy(distance);
        List<InterferenceItem> results = index.query(e);
        if (results.size() == 0)
            return false;
        for (Iterator<InterferenceItem> it = results.iterator(); it.hasNext();) {
            InterferenceItem item = it.next();
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandBy()

                (elapsedTime = System.currentTimeMillis() - startTime) < DURATION) {

            // Get point and create search envelope
            Coordinate pt = points[pointsProcessed++];
            Envelope search = new Envelope(pt);
            search.expandBy(MAX_SEARCH_DISTANCE);

            /*
             * Query the spatial index for objects within the search envelope.
             * Note that this just compares the point envelope to the line envelopes
             * so it is possible that the point is actually more distant than
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandBy()

        if(geom == null) {
            return infinity();
        }
       
        Envelope env = geom.getEnvelopeInternal();
        env.expandBy(filter.getDistance());
       
        if(bbox != null) {
            bbox.expandToInclude(env);
            return bbox;
        } else {
View Full Code Here

Examples of crazypants.render.BoundingBox.expandBy()

      if(!isMultiblock()) {
        return BoundingBox.UNIT_CUBE;
      }
      BoundingBox bounds = new BoundingBox(multiblock[0]);
      for (int i = 1; i < multiblock.length; i++) {
        bounds = bounds.expandBy(new BoundingBox(multiblock[i]));
      }
      liquidRenderBounds = bounds.translate(-multiblock[0].x, -multiblock[0].y, -multiblock[0].z);
    }
    return liquidRenderBounds;
  }
View Full Code Here

Examples of crazypants.render.BoundingBox.expandBy()

    BoundingBox minBB = new BoundingBox(1, 1, 1, 0, 0, 0);
    if(!ConduitUtil.isSolidFacadeRendered(con, EnderIO.proxy.getClientPlayer())) {

      Collection<CollidableComponent> bounds = con.getCollidableComponents();
      for (CollidableComponent bnd : bounds) {
        minBB = minBB.expandBy(bnd.bound);
      }

    } else {
      minBB = new BoundingBox(0, 0, 0, 1, 1, 1);
    }
View Full Code Here

Examples of crazypants.render.BoundingBox.expandBy()

      BoundingBox bb = null;
      for (CollidableComponent cBB : colCores) {
        if(bb == null) {
          bb = cBB.bound;
        } else {
          bb = bb.expandBy(cBB.bound);
        }
      }
      if(bb != null) {
        bb = bb.scale(1.05, 1.05, 1.05);
        CollidableComponent cc = new CollidableComponent(null, bb, ForgeDirection.UNKNOWN,
View Full Code Here

Examples of crazypants.render.BoundingBox.expandBy()

        addConduitCores(cores, con);
        if(cores.size() > 1) {
          BoundingBox bb = cores.get(0).bound;
          float area = bb.getArea();
          for (CollidableComponent cc : cores) {
            bb = bb.expandBy(cc.bound);
          }
          if(bb.getArea() > area * 1.5f) {
            bb = bb.scale(1.05, 1.05, 1.05);
            CollidableComponent cc = new CollidableComponent(null, bb, ForgeDirection.UNKNOWN,
                ConduitConnectorType.INTERNAL);
View Full Code Here

Examples of org.geotools.geometry.jts.ReferencedEnvelope.expandBy()

    estimator.visit(style);
    int bufferInPixels = estimator.getBuffer();
    // expand area to include buffer
    Rectangle tileInpix = mapContext.getViewport().getScreenArea();
    ReferencedEnvelope metaArea = new ReferencedEnvelope(areaOfInterest);
    metaArea.expandBy(bufferInPixels / tileInpix.getWidth() * areaOfInterest.getWidth(),
        bufferInPixels / tileInpix.getHeight() * areaOfInterest.getHeight());
    // fetch features in meta area
    Crs layerCrs = vectorLayerService.getCrs(layer);
    Envelope layerBounds = geoService.transform(metaArea, (Crs) areaOfInterest.getCoordinateReferenceSystem(),
        layerCrs);
View Full Code Here

Examples of org.geotools.geometry.jts.ReferencedEnvelope.expandBy()

                }
            }
        }

        ReferencedEnvelope bnds = new ReferencedEnvelope(mainMapEnvelope);                                   
        bnds.expandBy(Math.max(bnds.getWidth() * 3, bnds.getHeight() * 3));
        //this may be too slow and may need to done in a job ??
        ReferencedEnvelope maximumExtent = mainmap.getBounds(new NullProgressMonitor());
        ReferencedEnvelope ret = new ReferencedEnvelope(maximumExtent.intersection(bnds), bnds.getCoordinateReferenceSystem());
        return ret;
    }
View Full Code Here

Examples of org.geotools.geometry.jts.ReferencedEnvelope.expandBy()

                                  JTS.transform(delta, mapDelta, layerToMapTransform, 10);
                              }
                              CoordinateReferenceSystem mapCRS = notifier.getMap().getViewportModel().getCRS();
                              ReferencedEnvelope bounds = new ReferencedEnvelope( mapDelta, mapCRS );
                             
                              bounds.expandBy(bounds.getWidth()*.2, bounds.getHeight()*.2);
                              refreshBounds = bounds;
                              refreshLayer = notifier;                             
                            } catch (IOException e) {
                                ProjectPlugin.log("", e); //$NON-NLS-1$
                            } catch (TransformException e) {
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.