Examples of distanceTo()


Examples of cc.sketchchair.sketch.SketchPoint.distanceTo()

                    p3 = (SketchPoint) legSpline.getPath()
                        .get(0);
                    p4 = (SketchPoint) legSpline.getPath()
                        .get(3);

                    legWidthBottom = p1.distanceTo(p2);
                    legWidthTop = p3.distanceTo(p4);
                    Yoffset = 0;
                   
                   
                   
View Full Code Here

Examples of com.jme3.bounding.BoundingVolume.distanceTo()

        BoundingVolume bv = spatial.getWorldBound();

        Camera cam = vp.getCamera();
        float atanNH = FastMath.atan(cam.getFrustumNear() * cam.getFrustumTop());
        float ratio = (FastMath.PI / (8f * atanNH));
        float newDistance = bv.distanceTo(vp.getCamera().getLocation()) / ratio;
        int level;

        if (Math.abs(newDistance - lastDistance) <= distTolerance) {
            level = lastLevel; // we haven't moved relative to the model, send the old measurement back.
        } else if (lastDistance > newDistance && lastLevel == 0) {
View Full Code Here

Examples of com.neuralnetwork.shared.neurons.SOMNeuron.distanceTo()

                }
       
        for (int x = xstart; x < xend; x++) {
          for (int y = ystart; y < yend; y++) {
            temp = lattice.getNeuron(x, y);
              dist = bmu.distanceTo(temp);
              if (dist <= (nbhRadius * nbhRadius)) {
                dFalloff = getDistanceFalloff(dist, nbhRadius);
                temp.updateWeights(curInput,
                                   learningRate, dFalloff);
              }
View Full Code Here

Examples of de.hpi.eworld.model.db.data.GlobalPosition.distanceTo()

        EdgeModel edge = edgeList.get(0);

        GlobalPosition edgeStartGlobal = edge.getFromNode().getPosition();
        GlobalPosition edgeEndGlobal = edge.getToNode().getPosition();
       
        double globalLenght = edgeEndGlobal.distanceTo(edgeStartGlobal);
        double distanceToStart = edgeLocation.getDistance();

        Point2D edgeStartLocal = edge.getFromNode().getPosition().projected();
        Point2D edgeEndLocal = edge.getToNode().getPosition().projected();
       
View Full Code Here

Examples of de.hpi.eworld.model.db.data.GlobalPosition.distanceTo()

    GlobalPosition edgeEndGlobal = edge.getToNode().getPosition();

    Point2D edgeStartLocal = edgeStartGlobal.projected();
    Point2D edgeEndLocal = edgeEndGlobal.projected();
   
    double globalLenght = edgeEndGlobal.distanceTo(edgeStartGlobal);
    double localLength = Point2DUtils.distance(edgeEndLocal, edgeStartLocal);
    double distanceToStart = Point2DUtils.distance(position, edgeStartLocal);
   
    double realtiveEdgePosition = distanceToStart / localLength;
    if (realtiveEdgePosition < 0.0d || realtiveEdgePosition > 1.0d) {
View Full Code Here

Examples of dwlab.shapes.sprites.Sprite.distanceTo()

  public void spread( LinkedList<Sprite> path, Sprite fromPivot, Sprite toPivot, double length ) {
    for( LineSegment line: contents.get( fromPivot ) ) {
      Sprite otherPivot = ( line.pivot[ 0 ] == fromPivot ? line.pivot[ 1 ] : line.pivot[ 0 ] ) ;
      double newLength = length + fromPivot.distanceTo( otherPivot );
      if( newLength + otherPivot.distanceTo( toPivot ) > maxLength ) continue;
      while( true ) {
        if( lengthMap.containsKey( otherPivot ) ) {
          if( lengthMap.get( otherPivot ) < newLength ) break;
        }
        LinkedList<Sprite> newPath = new LinkedList<Sprite>();
View Full Code Here

Examples of gml4u.model.GmlPoint.distanceTo()

      if (prev.isZeroVector()) {
        prev.set(point);
      }
      pos.set(point);
      // use distance to previous point as target stroke weight
      weight += (Math.sqrt(pos.distanceTo(prev))*2-weight)*0.1;

      /*weight = 0;
      if(pos.time- prev.time != 0) {
        weight = pos.distanceTo(prev);
      }*/
 
View Full Code Here

Examples of gml4u.model.GmlPoint.distanceTo()

       
        // Check minimum distance from last point
        if (null != strokes.get(sessionID).getLastPoint()) {
          GmlPoint prev = new GmlPoint();
          prev.set(strokes.get(sessionID).getLastPoint());
          if (prev.distanceTo(v) > minPointsDistance) {
            strokes.get(sessionID).addPoint(new GmlPoint(v, time, pressure, rotation, direction, thickness));
          }
          else {
            LOGGER.log(Level.FINE, "Skipped, too close from previous point: "+prev.distanceTo(v));
          }
View Full Code Here

Examples of gml4u.model.GmlPoint.distanceTo()

          prev.set(strokes.get(sessionID).getLastPoint());
          if (prev.distanceTo(v) > minPointsDistance) {
            strokes.get(sessionID).addPoint(new GmlPoint(v, time, pressure, rotation, direction, thickness));
          }
          else {
            LOGGER.log(Level.FINE, "Skipped, too close from previous point: "+prev.distanceTo(v));
          }
        }
        else { // First point, add it
          strokes.get(sessionID).addPoint(new GmlPoint(v, time, pressure, rotation, direction, thickness));
        }
View Full Code Here

Examples of gml4u.model.GmlPoint.distanceTo()

        if (point.time < minTime) continue;
        if (point.time > maxTime) break;
        pos.set(point);

        // use distance to previous point as target stroke weight
        weight += (pos.distanceTo(prev)*4-weight)*0.1;

        // define offset points for the triangle strip
        a.set(pos);
        b.set(pos);
        a.addSelf(0, 0, weight);
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.