Examples of mulLocal()


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

   *
   * @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) {
    out.x = (upperBound.x - lowerBound.x) * .5f;
 
View Full Code Here

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

      final int next = (i == bodies.length - 1) ? 0 : i + 1;
      delta.set(toExtrude * (normals[i].x + normals[next].x), toExtrude * (normals[i].y + normals[next].y));
      // sumdeltax += dx;
      float norm = delta.length();
      if (norm > Settings.maxLinearCorrection) {
        delta.mulLocal(Settings.maxLinearCorrection / norm);
      }
      if (norm > Settings.linearSlop) {
        done = false;
      }
      bodies[next].m_sweep.c.x += delta.x;
View Full Code Here

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

    s.setZero();
    // This code would put the reference point inside the polygon.
    for (int i = 0; i < m_count; ++i) {
      s.addLocal(m_vertices[i]);
    }
    s.mulLocal(1.0f / m_count);

    final float k_inv3 = 1.0f / 3.0f;

    final Vec2 e1 = pool3;
    final Vec2 e2 = pool4;
View Full Code Here

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

   *
   * @return */
  public final Vec2 getCenter () {
    final Vec2 center = new Vec2(lowerBound);
    center.addLocal(upperBound);
    center.mulLocal(.5f);
    return center;
  }

  public final void getCenterToOut (final Vec2 out) {
    out.x = (lowerBound.x + upperBound.x) * .5f;
 
View Full Code Here

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

   *
   * @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) {
    out.x = (upperBound.x - lowerBound.x) * .5f;
 
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.