Package toxi.geom

Examples of toxi.geom.Vec2D.distanceTo()


      Vec2D closestPointTemp = curSketch.getClosestPointAlongPath(mouseX,
          mouseY);

      if (returnShape == null
          || closestPointTemp.distanceTo(mPos) < closestDist) {
        closestDist = closestPointTemp.distanceTo(mPos);
        returnShape = curSketch;
      }

    }
    return returnShape;
View Full Code Here


  public SketchPoint getOverSelectPoint(float x, float y) {
    Vec2D pointOnPlan = new Vec2D(x, y);
    SketchPoint p = this.getClosestPathVertex(pointOnPlan);

    if (p != null && pointOnPlan.distanceTo(p) < SETTINGS_SKETCH.select_dia)
      return p;
    else
      return null;
  }
View Full Code Here

  public boolean overSelectPoint(float mouseX, float mouseY) {
    Vec2D pointOnPlan = new Vec2D(mouseX, mouseY);
    SketchPoint p = this.getClosestPathVertex(pointOnPlan);

    if (p != null && pointOnPlan.distanceTo(p) < SETTINGS_SKETCH.select_dia) {

      return true;
    } else
      return false;
  }
View Full Code Here

          Object o = curSketch.getSelectedNodes().get(n);
          Vec2D p = (Vec2D) curSketch.getSelectedNodes().get(n);

          nodeFound = true;
          if (selectedNode == null
              || p.distanceTo(new Vec2D(x, y)) < selectedNode
                  .distanceTo(new Vec2D(x, y))) {
            selectedNode = p;
            selectedNodeObj = o;
          }
        }
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.