Examples of Circle


Examples of org.newdawn.slick.geom.Circle

 
  private List<Projectile>   bullet_array = new ArrayList<Projectile>();
 
  public Gun()
  {
    exception_circle = new Circle(GameplayState.player.getX()-17, GameplayState.player.getY()-13, 28);
    exception_circle_f = new Circle(GameplayState.player.getX()-10, GameplayState.player.getY()-13, 28);
    gun = Util.loadImage("player/gun.png");
    gun_f = gun.getFlippedCopy(true, false);
    gun.setCenterOfRotation(2, 2); //do not move gun to gun and gun_f to gun_f
    gun_f.setCenterOfRotation(24, 2);
    /*strange bug:
View Full Code Here

Examples of org.newdawn.slick.geom.Circle

      if (mob_state != MS.DEAD && mob_state != MS.NULL)
      {
        Rectangle mob_hitbox = list.get(i).hitbox; 
        for (float j = 0; j < radius; j += 3)
        {
          if (mob_hitbox.intersects(new Circle(x, y, j)) && mobNotDamaged(list.get(i), dmg_list))
          {
            float knockback = power; //calculate knockback
            knockback += (pc?2+pc_lvl:0);
            knockback += (th?4+th_lvl*0.8f:0);
            knockback += km_lvl*0.8f;
 
View Full Code Here

Examples of org.nlogo.shape.Circle

            (start, last, editorDialog.getElementColor());
      } else if (editorDialog.getElementType() == Rectangle.class) {
        return new Rectangle
            (start, last, editorDialog.getElementColor());
      } else if (editorDialog.getElementType() == Circle.class) {
        return new Circle
            (start, last, editorDialog.getElementColor());
      }
      // curves are not currently supported - ST 6/11/04
      //case VectorShape.CURVE:
      //    return new Curve
View Full Code Here

Examples of org.ow2.easybeans.tests.common.ejbs.entity.geometricforms.Circle

    /**
     * Creates a circle and modifies it.
     */
    @Override
    protected void createAndModifyEntity() {
        Circle c = new Circle();
        c.setRadius(1);
        c.setFormType(FormType.CIRCLE);
        entityManager.persist(c);
        entityManager.flush();

        c.setRadius(2);
        entityManager.flush();
    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.ejbs.entity.geometricforms.Circle

    /**
     * Creates a Circle and refreshes it.
     */
    @Override
    protected void createAndRefreshEntity() {
        Circle c = new Circle();
        c.setRadius(1);
        c.setFormType(FormType.CIRCLE);
        entityManager.persist(c);
        entityManager.flush();

        entityManager.refresh(c);
    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.ejbs.entity.geometricforms.Circle

    /**
     * Creates a circle and removes it.
     */
    @Override
    protected void createAndRemoveEntity() {
        Circle c = new Circle();
        c.setRadius(1);
        c.setFormType(FormType.CIRCLE);
        entityManager.persist(c);
        entityManager.flush();

        entityManager.remove(c);
        entityManager.flush();
View Full Code Here

Examples of org.ow2.easybeans.tests.common.ejbs.entity.geometricforms.Circle

    /**
     * Creates a circle.
     */
    @Override
    protected void createEntity() {
        Circle c = new Circle();
        c.setRadius(1);
        c.setFormType(FormType.CIRCLE);
        entityManager.persist(c);
        entityManager.flush();
    }
View Full Code Here

Examples of org.primefaces.model.map.Circle

    MapModel model = map.getModel();
   
    writer.write(",circles:[");
   
    for(Iterator<Circle> circles = model.getCircles().iterator(); circles.hasNext();) {
      Circle circle = (Circle) circles.next();
     
      writer.write("new google.maps.Circle({");
      writer.write("id:'" + circle.getId() + "'");
                       
      writer.write(",center:new google.maps.LatLng(" + circle.getCenter().getLat() + ", " + circle.getCenter().getLng() + ")");
      writer.write(",radius:" + circle.getRadius());
                       
      writer.write(",strokeOpacity:" + circle.getStrokeOpacity());
      writer.write(",strokeWeight:" + circle.getStrokeWeight());
      writer.write(",fillOpacity:" + circle.getFillOpacity());
     
      if(circle.getStrokeColor() != null) writer.write(",strokeColor:'" + circle.getStrokeColor() + "'");
      if(circle.getFillColor() != null) writer.write(",fillColor:'" + circle.getFillColor() + "'");
      if(circle.getZindex() > Integer.MIN_VALUE) writer.write(",zIndex:" + circle.getZindex());

            writer.write("})");
     
      if(circles.hasNext())
        writer.write(",");
View Full Code Here

Examples of org.springframework.data.geo.Circle

   * @see DATAMONGO-858
   */
  @Test
  public void convertsCircleToDbObjectAndBackCorrectly() {

    Circle circle = new Circle(new Point(1, 2), 3);

    DBObject dbo = GeoConverters.CircleToDbObjectConverter.INSTANCE.convert(circle);
    Shape shape = GeoConverters.DbObjectToCircleConverter.INSTANCE.convert(dbo);

    assertThat(shape, is((org.springframework.data.geo.Shape) circle));
View Full Code Here

Examples of org.springframework.data.mongodb.core.geo.Circle

    assertLocations(locations, "A", "B", "C", "D", "Berlin", "Cologne", "D�sseldorf");
  }

  @Test public void shouldFindAroundOrigin() {
    // when
    List<Location> locations = repo.findByPositionWithin(new Circle(0, 0,
        0.75));

    // then
    assertLocations(locations, "A", "C", "D");
  }
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.