Examples of subLocal()


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

  }

  public float getLength2 () {
    final Vec2 p = pool.popVec2();
    m_bodyB.getWorldPointToOut(m_localAnchorB, p);
    p.subLocal(m_groundAnchorB);

    float len = p.length();
    pool.pushVec2(1);
    return len;
  }
View Full Code Here

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

  /** Get the extents of the AABB (half-widths).
   *
   * @return */
  public final Vec2 getExtents () {
    final Vec2 center = new Vec2(upperBound);
    center.subLocal(lowerBound);
    center.mulLocal(.5f);
    return center;
  }

  public final void getExtentsToOut (final Vec2 out) {
View Full Code Here

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

    // Cdot = dot(u, v + cross(w, r))
    Vec2.crossToOutUnsafe(wA, m_rA, vpA);
    vpA.addLocal(vA);
    Vec2.crossToOutUnsafe(wB, m_rB, vpB);
    vpB.addLocal(vB);
    float Cdot = Vec2.dot(m_u, vpB.subLocal(vpA));

    float impulse = -m_mass * (Cdot + m_bias + m_gamma * m_impulse);
    m_impulse += impulse;

    float Px = impulse * m_u.x;
 
View Full Code Here

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

    // Cdot = dot(u, v + cross(w, r))
    Vec2.crossToOutUnsafe(wA, m_rA, vpA);
    vpA.addLocal(vA);
    Vec2.crossToOutUnsafe(wB, m_rB, vpB);
    vpB.addLocal(vB);
    float Cdot = Vec2.dot(m_u, vpB.subLocal(vpA));

    float impulse = -m_mass * (Cdot + m_bias + m_gamma * m_impulse);
    m_impulse += impulse;

    float Px = impulse * m_u.x;
 
View Full Code Here

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

  }

  public float getCurrentLengthA () {
    final Vec2 p = pool.popVec2();
    m_bodyA.getWorldPointToOut(m_localAnchorA, p);
    p.subLocal(m_groundAnchorA);
    float length = p.length();
    pool.pushVec2(1);
    return length;
  }
View Full Code Here

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

  }

  public float getCurrentLengthB () {
    final Vec2 p = pool.popVec2();
    m_bodyB.getWorldPointToOut(m_localAnchorB, p);
    p.subLocal(m_groundAnchorB);
    float length = p.length();
    pool.pushVec2(1);
    return length;
  }
View Full Code Here

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

  }

  public float getLength1 () {
    final Vec2 p = pool.popVec2();
    m_bodyA.getWorldPointToOut(m_localAnchorA, p);
    p.subLocal(m_groundAnchorA);

    float len = p.length();
    pool.pushVec2(1);
    return len;
  }
View Full Code Here

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

  }

  public float getLength2 () {
    final Vec2 p = pool.popVec2();
    m_bodyB.getWorldPointToOut(m_localAnchorB, p);
    p.subLocal(m_groundAnchorB);

    float len = p.length();
    pool.pushVec2(1);
    return len;
  }
View Full Code Here

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

  /** Get the extents of the AABB (half-widths).
   *
   * @return */
  public final Vec2 getExtents () {
    final Vec2 center = new Vec2(upperBound);
    center.subLocal(lowerBound);
    center.mulLocal(.5f);
    return center;
  }

  public final void getExtentsToOut (final Vec2 out) {
View Full Code Here

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

  public void testVec2() {
    Vec2 v = new Vec2();
    v.x = 0;
    v.y = 1;
    v.subLocal(new Vec2(10, 10));
    assertEquals(-10f, v.x);
    assertEquals(-9f, v.y);

    Vec2 v2 = v.add(new Vec2(1, 1));
    assertEquals(-9f, v2.x);
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.