Examples of distanceTo()


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

        }
       
        // determine width of the lane at that point
       
        double width = (i % 2 == 0)
            ? v.distanceTo(vs.get(i+1))
            : v.distanceTo(vs.get(i-1));
       
        // determine whether this vertex should get the higher or
        // lower t coordinate from the vertex pair
       
View Full Code Here

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

       
        // determine width of the lane at that point
       
        double width = (i % 2 == 0)
            ? v.distanceTo(vs.get(i+1))
            : v.distanceTo(vs.get(i-1));
       
        // determine whether this vertex should get the higher or
        // lower t coordinate from the vertex pair
       
        boolean higher = i % 2 == 0;
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.distanceTo()

        final VectorXZ coord = vertices.get(i);
       
        /* update accumulated wall length */
       
        if (i > 0) {
          accumulatedLength += coord.distanceTo(vertices.get(i-1));
        }
       
        /* add wall vectors */
       
        final VectorXYZ upperVector = coord.xyz(roof.getRoofEleAt(coord));
View Full Code Here

Examples of pr.lib.Vec.distanceTo()

            for (int j = 0; j < 4; j++) {
                Dir pd = d.turn(Turn.values()[j]);
                Vec pHallSpot = p.InDirection(pd);
                Vec pSpot = pHallSpot.InDirection(pd);

                if (pSpot.distanceTo(world.midpoint) >= world.width / 2) {
                    //Debug.log(pSpot+" " + j+ " is out of bounds! ");
                    pSpotsScores[j] = 0;
                    continue;
                }
View Full Code Here

Examples of toxi.geom.ReadonlyVec3D.distanceTo()

        float hue2 = c.hue() * MathUtils.TWO_PI;
        ReadonlyVec3D v1 = new Vec3D((MathUtils.cos(hue) * hsv[1]),
                (MathUtils.sin(hue) * hsv[1]), hsv[2]);
        Vec3D v2 = new Vec3D((MathUtils.cos(hue2) * c.saturation()),
                (MathUtils.sin(hue2) * c.saturation()), c.brightness());
        return v1.distanceTo(v2);
    }

    /*
     * (non-Javadoc)
     *
 
View Full Code Here

Examples of toxi.geom.Vec2D.distanceTo()

        Vec2D pointOnPlane = new Vec2D(mouseX, mouseY);

        SketchPoint pathVert = getClosestPathVertex(pointOnPlane);
   
        if (pathVert != null && pointOnPlane.distanceTo(pathVert) < SETTINGS_SKETCH.select_dia) {
          removeVertex(pathVert);
          skip = true;
        }

      }
View Full Code Here

Examples of toxi.geom.Vec2D.distanceTo()

      && getSketchTools().keyCode == PConstants.CONTROL) {
       
        this.getSketchTools().drawPathToolState = SketchTools.DRAW_PATH_TOOL_STATE_ADD;
        
       
        if(pointOnPlan.distanceTo(sketchShapes.getClosestPathVertex(pointOnPlan)) < SETTINGS_SKETCH.select_dia){
          this.getSketchTools().drawPathToolState = SketchTools.DRAW_PATH_TOOL_STATE_REMOVE;

        }
       
View Full Code Here

Examples of toxi.geom.Vec2D.distanceTo()

                   
                   
                    for (int k = 0; k < points02.size(); k++) {
                     
                      Vec2D vec2d = (Vec2D) points02.get(k).get(0);
                      if(seatBottom == null || vec2d.distanceTo(topIntersect) > vec2d.distanceTo(seatBottom) )
                        seatBottom = vec2d;
                     
                    }
           
                 
View Full Code Here

Examples of toxi.geom.Vec2D.distanceTo()

                   
                   
                    for (int k = 0; k < points02.size(); k++) {
                     
                      Vec2D vec2d = (Vec2D) points02.get(k).get(0);
                      if(seatBottom == null || vec2d.distanceTo(topIntersect) > vec2d.distanceTo(seatBottom) )
                        seatBottom = vec2d;
                     
                    }
           
                 
View Full Code Here

Examples of toxi.geom.Vec2D.distanceTo()

    SketchPoint mousePos = new SketchPoint(mouseX, mouseY);
    float step = SETTINGS_SKETCH.select_on_path_step / this.getlength();
    for (float i = 0; i <= 1; i += step) {
      Vec2D pos = this.getPos(i);

      if (i == 0 || pos.distanceTo(mousePos) < closestDist && pos != null) {
        val = i;
        closestDist = pos.distanceTo(mousePos);
      }

    }
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.