Examples of distanceFrom()


Examples of com.mmoscene.h4j.habbohotel.pathfinding.Position.distanceFrom()

            v.lastID++;
            v.count++;
            v.getBinaryHeap()[v.count] = v.lastID;
            v.getX()[v.lastID] = n.getX();
            v.getY()[v.lastID] = n.getY();
            v.getH()[v.lastID] = (short) n.distanceFrom(end);
            v.getParent()[v.lastID] = p;

            if (n.getX() == v.getX()[p] || n.getY() == v.getY()[p]) {
                v.getG()[v.lastID] = (short) (10 + v.getG()[p]);
            } else {
View Full Code Here

Examples of com.mmoscene.h4j.habbohotel.pathfinding.Position.distanceFrom()

            if (room.getModel().getSquares()[n.getX()][n.getY()] == SquareState.CLOSED) { //it's a closed tile anyways
                continue;
            }

            if (pointer > n.distanceFrom(end)) {
                pointer = n.distanceFrom(end);
                p = n;
            }
        }
View Full Code Here

Examples of com.mmoscene.h4j.habbohotel.pathfinding.Position.distanceFrom()

            if (room.getModel().getSquares()[n.getX()][n.getY()] == SquareState.CLOSED) { //it's a closed tile anyways
                continue;
            }

            if (pointer > n.distanceFrom(end)) {
                pointer = n.distanceFrom(end);
                p = n;
            }
        }

        return p;
View Full Code Here

Examples of com.mmoscene.h4j.habbohotel.pathfinding.Position.distanceFrom()

                if (room.getModel().getSquares()[n.getX()][n.getY()] == SquareState.CLOSED) { //it's a closed tile anyways
                    continue;
                }

                if (distancePointer > n.distanceFrom(end)) {  //it's out of bounds
                    distancePointer = n.distanceFrom(end);
                    H4J.getLogger("a").info(limit + " => " + n.getX() + "|" + n.getY());
                    current = n;
                }
            }
View Full Code Here

Examples of com.mmoscene.h4j.habbohotel.pathfinding.Position.distanceFrom()

                if (room.getModel().getSquares()[n.getX()][n.getY()] == SquareState.CLOSED) { //it's a closed tile anyways
                    continue;
                }

                if (distancePointer > n.distanceFrom(end)) {  //it's out of bounds
                    distancePointer = n.distanceFrom(end);
                    H4J.getLogger("a").info(limit + " => " + n.getX() + "|" + n.getY());
                    current = n;
                }
            }
View Full Code Here

Examples of org.graphstream.ui.layout.springbox.GraphCellData.distanceFrom()

      }
    } else {
      if (cell != this.cell) {
        GraphCellData bary = (GraphCellData) cell.getData();

        double dist = bary.distanceFrom(pos);
        double size = cell.getSpace().getSize();

        if ((!cell.isLeaf())
            && ((size / dist) > box.getBarnesHutTheta())) {
          int div = cell.getSpace().getDivisions();
View Full Code Here

Examples of org.graphstream.ui.layout.springbox.GraphCellData.distanceFrom()

          recurseRepulsion(cell.getSub(i), delta);
      }
    } else {
      if (cell != this.cell) {
        GraphCellData bary = (GraphCellData) cell.getData();
        double dist = bary.distanceFrom(pos);
        double size = cell.getSpace().getSize();

        if ((!cell.isLeaf())
            && ((size / dist) > box.getBarnesHutTheta())) {
          int div = cell.getSpace().getDivisions();
View Full Code Here

Examples of progs.lib.BFS.distanceFrom()

        if (specialNodes.contains(node)) {
          continue;
        }
        int localDistance = 0;
        for (Node stationNode : specialNodes) {
          localDistance += bfs.distanceFrom(stationNode, node);
        }
        if (localDistance < previousMinDistance) {
          previousMinDistance = localDistance;
          bestNodeSoFar = node;
        }
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.