Package org.freeplane.view.swing.map.link

Examples of org.freeplane.view.swing.map.link.CollisionDetector


    }
  }

  @Override
  public boolean detectCollision(final Point p) {
    final CollisionDetector collisionDetector = new CollisionDetector();
    for (int i = 1; i < xs.length; i++) {
      if (collisionDetector.detectCollision(p, new Line2D.Float(xs[i - 1], ys[i - 1], xs[i], ys[i]))) {
        return true;
      }
    }
    return false;
  }
View Full Code Here


  }

  @Override
  public boolean detectCollision(final Point p) {
    final Line2D line = new Line2D.Float(start, end);
    return new CollisionDetector().detectCollision(p, line);
  }
View Full Code Here

  public boolean detectCollision(final Point p) {
    final int w = getMap().getZoomed(getWidth() / 2 + 1);
    final int xs[] = { start.x, end.x, start.x };
    final int ys[] = { start.y + w, end.y, start.y - w };
    final Polygon polygon = new Polygon(xs, ys, 3);
    return new CollisionDetector().detectCollision(p, polygon);
  }
View Full Code Here

  @Override
  public boolean detectCollision(final Point p) {
    final CubicCurve2D.Float line1 = new CubicCurve2D.Float();
    line1.setCurve(start.x, start.y, one.x, one.y, two.x, two.y, end.x, end.y);
    return new CollisionDetector().detectCollision(p, line1);
  }
View Full Code Here

  }
 
  @Override
  public boolean detectCollision(final Point p) {
    final CubicCurve2D.Float graph = update();
    return new CollisionDetector().detectCollision(p, graph);
  }
View Full Code Here

  }

  @Override
  public boolean detectCollision(final Point p) {
    final Shape graph = update();
    return new CollisionDetector().detectCollision(p, graph);
  }
View Full Code Here

TOP

Related Classes of org.freeplane.view.swing.map.link.CollisionDetector

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.