Package org.openpixi.pixi.physics.util

Examples of org.openpixi.pixi.physics.util.Point


  }


  private Point[] getSurroundingPoints(Point p) {
    return new Point[] {
        new Point(p.x - 1, p.y), new Point(p.x + 1, p.y),
        new Point(p.x, p.y - 1), new Point(p.x, p.y + 1)
    };
  }
View Full Code Here


    }
    else if (neighborPart.ymax() < myPart.ymin()) {
      ydirec = -1;
    }

    return new Point(xdirec, ydirec);
  }
View Full Code Here

        List<SharedData> sharedDatas = sharedDataManager.getBorderSharedData(region);
        List<Point> directions = sharedDataManager.getBorderDirections(region);
        assert sharedDatas.size() == directions.size();

        for (int i = 0; i < sharedDatas.size(); ++i) {
          Point remoteGhostCellIndex = getRemoteGhostCellIndex(x, y, directions.get(i));

          sharedDatas.get(i).registerBorderCell(
              myCells[realIndex(x)][realIndex(y)],
              remoteGhostCellIndex);
        }
View Full Code Here

   * Translates the local border cell index to remote ghost cell index.
   */
  private Point getRemoteGhostCellIndex(int x, int y, Point direction) {
    int xoffset = direction.x * settings.getGridCellsX();
    int yoffset = direction.y * settings.getGridCellsY();
    return new Point(x - xoffset, y - yoffset);
  }
View Full Code Here

   * Decomposes the region id to X and Y components.
   */
  public Point decomposeRegionID(int regionID) {
    int y = findHighestPossibleY(regionID);
    int x = findX(y, regionID);
    return new Point(x, y);
  }
View Full Code Here

TOP

Related Classes of org.openpixi.pixi.physics.util.Point

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.