Examples of Point


Examples of org.lwjgl.util.Point

    Minecraft mc = Minecraft.getMinecraft();
    if(!mc.isGamePaused && mc.currentScreen == null && mc.thePlayer != null && mc.thePlayer.inventory.getCurrentItem() != null
        && mc.thePlayer.inventory.getCurrentItem().getItem() instanceof ItemRocketLauncher)
    {
      ScaledResolution sr = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
      Point center = new Point(sr.getScaledWidth() / 2, sr.getScaledHeight() / 2);
     
      if(MineFactoryReloadedClient.instance.getLockedEntity() != Integer.MIN_VALUE)
      {
        mc.renderEngine.bindTexture("/powercrystals/minefactoryreloaded/textures/hud/lockon_blue.png");
      }
      else
      {
        mc.renderEngine.bindTexture("/powercrystals/minefactoryreloaded/textures/hud/lockon_red.png");
      }
     
      GL11.glPushMatrix();
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glTranslatef(center.getX(), center.getY(), 0);
      GL11.glRotatef((mc.theWorld.getWorldTime() * 4) % 360 + partialTicks, 0, 0, 1);
     
      float distance = MineFactoryReloadedClient.instance.getLockTimeRemaining();
     
      drawLockonPart(center, distance, 0);
View Full Code Here

Examples of org.mongodb.morphia.query.Shape.Point

    return query.criteria(fieldName).within(shape);
  }

  @Deprecated
  public Criteria within(double x, double y, double radius) {
    return within(center(new Point(x, y), radius));
  }
View Full Code Here

Examples of org.moparscape.msc.gs.model.Point

  public Shop toShop() {
    List<String> opts = new ArrayList<String>();
    for (String s : options) {
      opts.add(s);
    }
    Shop shop = new Shop(name, greeting, opts, new Point(minX, minY),
        new Point(maxX, maxY), general, respawnRate, buyModifier,
        sellModifier);
    for (InvItem i : items) {
      shop.add(i.id, i.amount, false);
    }
    return shop;
View Full Code Here

Examples of org.moxieapps.gwt.highcharts.client.Point

     * point instance associated with the legend label.
     *
     * @return A Point instance that is connected to the Highcharts data point associated with the legend label
     */
    public Point getPoint() {
        return new Point(data);
    }
View Full Code Here

Examples of org.newdawn.slick.geom.Point

    {
      hp = hp_default;
      x = Game.getAppX()+30+(new Random().nextInt(20));
      hitbox = new Rectangle(x-width, y-height, width, height); //setting hitbox
      hitbox_crit = new Rectangle(x-width+7, y-height+2, 9, 9);
      center = new Point(x-(float)width/2, y+(float)height/2);
      updateFacing();
    }
View Full Code Here

Examples of org.opencv.core.Point

* @see org.opencv.core.Core#idft
*/
    public static Point phaseCorrelate(Mat src1, Mat src2, Mat window)
    {

        Point retVal = new Point(phaseCorrelate_0(src1.nativeObj, src2.nativeObj, window.nativeObj));

        return retVal;
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.Point

    // test 2.5D point creation
    double[] da = new double[3];
    da[0] = 10.0;
    da[1] = -115000.0;
    da[2] = 0.0000000125;
    Point p1 = pf.createPoint(da);
    assertTrue(p1.getDirectPosition().getOrdinate(0) == 10.0);
    assertTrue(p1.getDirectPosition().getOrdinate(1) == -115000.0);
    assertTrue(p1.getDirectPosition().getOrdinate(2) == 0.0000000125);

    // public PointImpl createPoint(Position position);
    // public PointImpl createPoint(DirectPositionImpl dp);
    da[0] = 999999999.0;
    da[1] = 100.0;
    da[2] = -0.00000565;
    Position pos1 = new DirectPositionImpl( pf.getCoordinateReferenceSystem(),  da );
    Point p2 = pf.createPoint(pos1);
    assertTrue(p2.getDirectPosition().getOrdinate(0) == 999999999.0);
    assertTrue(p2.getDirectPosition().getOrdinate(1) == 100.0);
    assertTrue(p2.getDirectPosition().getOrdinate(2) == -0.00000565);
   
  }
View Full Code Here

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

    // Test boundary corner regions

    int region = BoundaryRegions.X_MIN + BoundaryRegions.Y_MIN;
    int neighbor = neighborMap.getBoundaryNeighbor(region);
    Assert.assertEquals(7, neighbor);
    Point direction = neighborMap.getBoundaryNeighborsDirections(region);
    Assert.assertEquals(new Point(-1, -1), direction);

    region = BoundaryRegions.X_MAX + BoundaryRegions.Y_MAX;
    neighbor = neighborMap.getBoundaryNeighbor(region);
    Assert.assertEquals(3, neighbor);
    direction = neighborMap.getBoundaryNeighborsDirections(region);
    Assert.assertEquals(new Point(1, 1), direction);

    region = BoundaryRegions.X_MIN + BoundaryRegions.Y_MAX;
    neighbor = neighborMap.getBoundaryNeighbor(region);
    Assert.assertEquals(3, neighbor);
    direction = neighborMap.getBoundaryNeighborsDirections(region);
    Assert.assertEquals(new Point(-1, 1), direction);

    // Test boundary edge regions

    region = BoundaryRegions.X_MIN + BoundaryRegions.Y_CENTER;
    neighbor = neighborMap.getBoundaryNeighbor(region);
    Assert.assertEquals(2, neighbor);
    direction = neighborMap.getBoundaryNeighborsDirections(region);
    Assert.assertEquals(new Point(-1, 0), direction);

    region = BoundaryRegions.X_MAX + BoundaryRegions.Y_CENTER;
    neighbor = neighborMap.getBoundaryNeighbor(region);
    Assert.assertEquals(2, neighbor);
    direction = neighborMap.getBoundaryNeighborsDirections(region);
    Assert.assertEquals(new Point(1, 0), direction);

    region = BoundaryRegions.X_CENTER + BoundaryRegions.Y_MIN;
    neighbor = neighborMap.getBoundaryNeighbor(region);
    Assert.assertEquals(5, neighbor);
    direction = neighborMap.getBoundaryNeighborsDirections(region);
    Assert.assertEquals(new Point(0, -1), direction);

    // Test border corner regions

    region = BorderRegions.X_BORDER_MIN + BorderRegions.Y_BORDER_MIN;
    int[] neighbors = neighborMap.getBorderNeighbors(region);
    int on1 = assertContains(neighbors, 2);
    int on2 = assertContains(neighbors, 5);
    int on3 = assertContains(neighbors, 7);
    Point[] directions = neighborMap.getBorderNeighborsDirections(region);
    int od1 = assertContainsPoint(directions, new Point(-1, 0));
    int od2 = assertContainsPoint(directions, new Point(0, -1));
    int od3 = assertContainsPoint(directions, new Point(-1, -1));
    // Test order
    Assert.assertEquals(on1, od1);
    Assert.assertEquals(on2, od2);
    Assert.assertEquals(on3, od3);

    region = BorderRegions.X_BORDER_MAX + BorderRegions.Y_BORDER_MAX;
    neighbors = neighborMap.getBorderNeighbors(region);
    on1 = assertContains(neighbors, 1);
    on2 = assertContains(neighbors, 2);
    on3 = assertContains(neighbors, 3);
    directions = neighborMap.getBorderNeighborsDirections(region);
    od1 = assertContainsPoint(directions, new Point(0, 1));
    od2 = assertContainsPoint(directions, new Point(1, 0));
    od3 = assertContainsPoint(directions, new Point(1, 1));
    // Test order
    Assert.assertEquals(on1, od1);
    Assert.assertEquals(on2, od2);
    Assert.assertEquals(on3, od3);

    // Test border edge regions

    region = BorderRegions.X_CENTER + BorderRegions.Y_BORDER_MIN;
    neighbors = neighborMap.getBorderNeighbors(region);
    assertContains(neighbors, 5);
    directions = neighborMap.getBorderNeighborsDirections(region);
    assertContainsPoint(directions, new Point(0, -1));

    region = BorderRegions.X_BORDER_MAX + BorderRegions.Y_CENTER;
    neighbors = neighborMap.getBorderNeighbors(region);
    assertContains(neighbors, 2);
    directions = neighborMap.getBorderNeighborsDirections(region);
    assertContainsPoint(directions, new Point(1, 0));
  }
View Full Code Here

Examples of org.openpnp.model.Point

 
    return point;
  }
 
  public static Point translatePoint(Point point, double x, double y) {
    return new Point(point.getX() + x, point.getY() + y);
  }
View Full Code Here

Examples of org.openqa.selenium.Point

        WebElement wnd = getDriver().findElement(By.id("topwindow"));
        // There is some bug in Selenium. Can't move window using header
        // need use footer instead.
        WebElement wnd1Footer = wnd
                .findElement(By.className("v-window-footer"));
        Point startLoc = wnd.getLocation();
        Coordinates footerCoordinates = ((Locatable) wnd1Footer)
                .getCoordinates();
        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
        mouse.mouseDown(footerCoordinates);
        mouse.mouseMove(footerCoordinates, 200, 200);
        mouse.mouseUp(footerCoordinates);
        Point endLoc = wnd.getLocation();
        // don't compare to specific coordinate, because in IE9 and IE11
        // the window position is random.
        // So, checkt that the window was moved
        org.junit.Assert.assertNotEquals(startLoc, endLoc);
    }
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.