Examples of subLocal()


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

  }
 
  public float getLength1() {
    final Vec2 p = pool.popVec2();
    m_bodyA.getWorldPointToOut(m_localAnchor1, p);
    p.subLocal(m_groundAnchor1);
   
    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_localAnchor2, p);
    p.subLocal(m_groundAnchor2);
   
    float len = p.length();
    pool.pushVec2(1);
    return len;
  }
View Full Code Here

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

          p.y = y;
          if (shape.testPoint(identity, p)) {
            Transform.mulToOut(transform, p, p);
            particleDef.position.x = p.x;
            particleDef.position.y = p.y;
            p.subLocal(groupDef.position);
            Vec2.crossToOutUnsafe(groupDef.angularVelocity, p, particleDef.velocity);
            particleDef.velocity.addLocal(groupDef.linearVelocity);
            createParticle(particleDef);
          }
        }
View Full Code Here

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

   *
   * @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()

    Mat22.mulToOut(b1.getTransform().R, r1, r1);
    Mat22.mulToOut(b2.getTransform().R, r2, r2);
   
    p1.set(b1.m_sweep.c).addLocal(r1);
    p2.set(b2.m_sweep.c).addLocal(r2);
    p2.subLocal(p1);
   
    final Vec2 axis = pool.popVec2();
    b1.getWorldPointToOut(m_localXAxis1, axis);
   
    final Vec2 v1 = b1.m_linearVelocity;
View Full Code Here

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

      JwA = Vec2.cross(rA, JvAC);
      mass += m_mC + m_mA + m_iC * JwC * JwC + m_iA * JwA * JwA;

      pC.set(m_localAnchorC).subLocal(m_lcC);
      Rot.mulTransUnsafe(qC, temp.set(rA).addLocal(cA).subLocal(cC), pA);
      coordinateA = Vec2.dot(pA.subLocal(pC), m_localAxisC);
      pool.pushVec2(4);
    }

    if (m_typeB == JointType.REVOLUTE) {
      JvBD.setZero();
View Full Code Here

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

      JwB = Vec2.cross(rB, u);
      mass += m_ratio * m_ratio * (m_mD + m_mB) + m_iD * JwD * JwD + m_iB * JwB * JwB;

      pD.set(m_localAnchorD).subLocal(m_lcD);
      Rot.mulTransUnsafe(qD, temp.set(rB).addLocal(cB).subLocal(cD), pB);
      coordinateB = Vec2.dot(pB.subLocal(pD), m_localAxisD);
      pool.pushVec2(5);
    }

    float C = (coordinateA + m_ratio * coordinateB) - m_constant;

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
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.