Examples of Vec2


Examples of org.jbox2d.common.Vec2

    return height;
  }

  @Override
  protected void applyOffset(float x, float y, float angle) {
    shape.setAsBox(width/2, height/2, new Vec2(x,y), angle);
  }
View Full Code Here

Examples of org.jbox2d.common.Vec2

   */
  public float inertiaScale;
 
  public BodyDef() {
    userData = null;
    position = new Vec2();
    angle = 0f;
    linearVelocity = new Vec2();
    angularVelocity = 0f;
    linearDamping = 0f;
    angularDamping = 0f;
    allowSleep = true;
    awake = true;
View Full Code Here

Examples of org.jbox2d.common.Vec2

   * @param x The x axis location of the body
   * @param y The y axis location of the body
   */
  public Body(Shape shape, float x, float y) {
    jboxBodyDef = new BodyDef();
    jboxBodyDef.position = new Vec2(x,y);
    this.shape = shape;
  }
View Full Code Here

Examples of org.jbox2d.common.Vec2

   * @param x The amount of force on the X axis
   * @param y The amount of force on the Y axis
   */
  public void applyForce(float x, float y) {
    assertBodyAttached();
    jboxBody.applyForce(new Vec2(x,y), jboxBody.getWorldCenter());
  }
View Full Code Here

Examples of org.matheusdev.util.vecmath.Vec2

      throw new IllegalArgumentException("elements < 3: This is not a Polygon.");
    }
    this.vertices = vertices;
    this.verticesCached = new Vec2[elements];
    this.center = calculateCenter();
    this.centerCached = new Vec2();

    this.normals = new Vec2[elements];
    for (int i = 0; i < normals.length; i++) normals[i] = new Vec2();
    this.mat = new Mat4();
    this.aabb = new Rect();
    this.circBounds = createCircularBounds(circBounds);
    updateFromMatrix();
  }
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.