Package org.jbox2d.common

Examples of org.jbox2d.common.Vec2.sub()


    min.set(-worldExtent, 0.0f);
    Vec2 max = new Vec2();
    max.set(worldExtent, 2.0f * worldExtent);
    Vec2 c = MathUtils.clamp(c0, min, max);

    aabb.lowerBound.addLocal(c.sub(c0));
    aabb.upperBound.addLocal(c.sub(c0));
  }

  public void CreateProxy() {
    for (int i = 0; i < e_actorCount; ++i) {
View Full Code Here


    Vec2 max = new Vec2();
    max.set(worldExtent, 2.0f * worldExtent);
    Vec2 c = MathUtils.clamp(c0, min, max);

    aabb.lowerBound.addLocal(c.sub(c0));
    aabb.upperBound.addLocal(c.sub(c0));
  }

  public void CreateProxy() {
    for (int i = 0; i < e_actorCount; ++i) {
      int j = MathUtils.abs(rand.nextInt() % e_actorCount);
View Full Code Here

      vertices[2] = p3;
      poly1.set(vertices, 3);

      vertices[0] = new Vec2();
      vertices[1] = p5.sub(p4);
      vertices[2] = p6.sub(p4);
      poly2.set(vertices, 3);
    } else {
      Vec2[] vertices = new Vec2[3];

      vertices[0] = p1;
View Full Code Here

      vertices[1] = p3;
      vertices[2] = p2;
      poly1.set(vertices, 3);

      vertices[0] = new Vec2();
      vertices[1] = p6.sub(p4);
      vertices[2] = p5.sub(p4);
      poly2.set(vertices, 3);
    }

    fd1.shape = poly1;
View Full Code Here

    min.set(-worldExtent, 0.0f);
    Vec2 max = new Vec2();
    max.set(worldExtent, 2.0f * worldExtent);
    Vec2 c = MathUtils.clamp(c0, min, max);

    aabb.lowerBound.addLocal(c.sub(c0));
    aabb.upperBound.addLocal(c.sub(c0));
  }

  public void CreateProxy() {
    for (int i = 0; i < e_actorCount; ++i) {
View Full Code Here

    Vec2 max = new Vec2();
    max.set(worldExtent, 2.0f * worldExtent);
    Vec2 c = MathUtils.clamp(c0, min, max);

    aabb.lowerBound.addLocal(c.sub(c0));
    aabb.upperBound.addLocal(c.sub(c0));
  }

  public void CreateProxy() {
    for (int i = 0; i < e_actorCount; ++i) {
      int j = MathUtils.abs(rand.nextInt() % e_actorCount);
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.