Examples of intersectsCircle()


Examples of net.itscrafted.entity.Bouncer.intersectsCircle()

   
    // check if player hits bouncers
    for(int i = 0; i < bouncers.size(); i++) {
      Bouncer b = bouncers.get(i);
      b.update();
      if(b.intersectsCircle(player)) {
        player.reflect(b.getx(), b.gety(), b.getWidth(), b.getImpulse());
        break;
      }
    }
   
View Full Code Here

Examples of toxi.geom.Rect.intersectsCircle()

    public void draw() {
        background(255);
        Circle c = new Circle(new Vec2D(mouseX, mouseY), 100);
        Rect r = new Rect(200, 200, 300, 100);
        stroke(r.intersectsCircle(c, c.getRadius()) ? 0xffff0000 : 0xff000000);
        noFill();
        gfx.ellipse(c);
        gfx.rect(r);
        List<Vec2D> sel = tree.itemsWithinRadius(c, c.getRadius(), null);
        // List<Vec2D> sel = tree.itemsWithinRect(new Rect(mouseX, mouseY, 200,
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.