Package org.jbox2d.collision

Examples of org.jbox2d.collision.CircleDef


        def.vertices.add(new Vec2(poly.xpoints[i], poly.ypoints[i]));
      }
      return def;
    } else if (shape instanceof Ellipse2D) {
      Ellipse2D ell = (Ellipse2D) shape;
      CircleDef def = new CircleDef();
      def.localPosition = new Vec2((float) ell.getCenterX(), (float) ell.getCenterY());
      def.radius = (float) (ell.getWidth() / 2);
      def.restitution = (float) elasticity;
      return def;
    }
View Full Code Here

TOP

Related Classes of org.jbox2d.collision.CircleDef

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.