Examples of Circle


Examples of com.google.gwt.user.client.rpc.InheritanceTestSetFactory.Circle

            TestSetValidator.rethrowException(caught);
          }

          @Override
          public void onSuccess(Object result) {
            Circle circle = (Circle) result;
            assertNotNull(circle.getName());
            finishTest();
          }
        });
  }
View Full Code Here

Examples of com.googlecode.jumpnevolve.math.Circle

  @Test
  public void testSpeedOldRectCollisions() {
    Shape rect = new Rectangle(new Vector(10, 100), 20, 20);
    // Rectangle rect2 = new Rectangle(new Vector(10, 90), 20, 20);
    Shape rect2 = new Circle(new Vector(10, 90), 10);
    Date start = new Date();
    long startTime = start.getTime();
    for (int i = 0; i < 1000000; i++) {
      if (rect.doesCollide(rect2)) {
        rect.getCollision(rect2, false, true);
View Full Code Here

Examples of com.impetus.kundera.gis.geometry.Circle

        return em.find(Person.class, personId);
    }

    public List<Person> findWithinCircle(double x, double y, double r, SurfaceType surfaceType)
    {
        Circle circle = new Circle(x, y, r);
        circle.setSurfaceType(surfaceType);

        Query q = em.createQuery("Select p from Person p where p.currentLocation IN ?1");
        q.setParameter(1, circle);
        List<Person> persons = q.getResultList();
        return persons;
View Full Code Here

Examples of com.kjoshi.shareit.responsible.Circle

*
*/
public class ChainOfResponsibility {
  public static void main(String[] args) {
    // I am keeping Circle in the last in the chain so starting from Circle
    Area circle = new Circle();
    Area triangle = new Triangle(circle);
    Area rectangle = new Rectangle(triangle);
    Area square = new Square(rectangle);
    for (String shape : listOfShapes()) {
      square.findArea(shape);
View Full Code Here

Examples of com.luxoft.dnepr.courses.unit2.model.Circle

    }

    @Test
    public void calculateOverallAreaTest() {
        List<Figure> figures = new ArrayList<Figure>();
        figures.add(new Circle(2d));
        figures.add(new Square(3d));
        figures.add(new Hexagon(4d));
        final double SUM_OF_SQUARES = 63.1355899d;
        Assert.assertEquals(SUM_OF_SQUARES, LuxoftUtils.calculateOverallArea(figures), DELTA);
    }
View Full Code Here

Examples of com.nr.cg.Circle

    center.x[0]=1.5;
    center.x[1]=2.5;
    radius=3.5;

    Circle cir = new Circle(center,radius);

    localflag = Point.dist(center,cir.center) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** Circle: Circle does not have correct center");
View Full Code Here

Examples of com.nr.cg.Circle

  @Test
  public void test() {
    int i,N=10;
    double sbeps=1.e-15;
    Point a =new Point(2),b =new Point(2),c =new Point(2);
    Circle cir=new Circle(a,0.0)// placeholder
    double[] d=new double[3];
    boolean localflag, globalflag=false;

   
View Full Code Here

Examples of com.spatial4j.core.shape.Circle

    } else if (shape instanceof Rectangle) {
      Rectangle rect = (Rectangle) shape;
      return nf.format(rect.getMinX()) + " " + nf.format(rect.getMinY()) + " " + nf.format(rect.getMaxX()) + " "
          + nf.format(rect.getMaxY());
    } else if (shape instanceof Circle) {
      Circle c = (Circle) shape;
      return "Circle(" + nf.format(c.getCenter().getX()) + " " + nf.format(c.getCenter().getY()) + " " + "d="
          + nf.format(c.getRadius()) + ")";
    }
    return shape.toString();
  }
View Full Code Here

Examples of cranks.geom.Circle

      double l4 = getLink(4).getLength();
      getLink(1).getPostJoint().setCoordinates(-(l1/2), 0);
      getLink(2).getPostJoint().setCoordinates(l2*Math.cos(inputAngle.getAngle())-(l1/2),
                                         l2*Math.sin(inputAngle.getAngle()));
      getLink(4).getPostJoint().setCoordinates(l1/2, 0);
      Circle circle1 = new Circle(getLink(2).getPostJoint(), l3);
      Circle circle2 = new Circle(getLink(4).getPostJoint(), l4);
      Point newJoint = (elbowUp)?(circle1.intersect(circle2)[0]):
                                 (circle1.intersect(circle2)[1]);
      if (newJoint != null)
        getLink(3).getPostJoint().setCoordinates(newJoint.getX(), newJoint.getY());
    }
View Full Code Here

Examples of eas.simulation.spatial.sim2D.physicalSimulation.physicsEngine.net.phys2d.raw.shapes.Circle

    boolean touches = bodyA.getBodyShape().getBounds().touches(x1,y1,bodyB.getBodyShape().getBounds(),x2,y2);
    if (!touches) {
      return 0;
    }
   
    Circle circleA = (Circle) bodyA.getBodyShape();
    Circle circleB = (Circle) bodyB.getBodyShape();
   
    touches = circleA.touches(x1,y1,circleB,x2,y2);
    if (!touches) {
      return 0;
    }
   
    Vector2f normal = MathUtil.sub(bodyB.getPosition(),bodyA.getPosition());
    float sep = (circleA.getRadius() + circleB.getRadius()) - normal.length();

    normal.normalise();
    Vector2f pt = MathUtil.scale(normal, circleA.getRadius());
    pt.add(bodyA.getPosition());
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.