Examples of Vector2


Examples of com.badlogic.gdx.math.Vector2

    setCamera(camera);
  }

  @Override
  public void update (int screenWidth, int screenHeight, boolean centerCamera) {
    Vector2 scaled = scaling.apply(getWorldWidth(), getWorldHeight(), screenWidth, screenHeight);
    int viewportWidth = Math.round(scaled.x);
    int viewportHeight = Math.round(scaled.y);

    // Center.
    setScreenBounds((screenWidth - viewportWidth) / 2, (screenHeight - viewportHeight) / 2, viewportWidth, viewportHeight);
View Full Code Here

Examples of com.badlogic.gdx.math.Vector2

    renderer = new ShapeRenderer();

    // next we create a SpriteBatch and a font
    batch = new SpriteBatch();

    lower = new Vector2();
    upper = new Vector2();

    // initialize vertices array
    for (int i = 0; i < vertices.length; i++)
      vertices[i] = new Vector2();

    this.drawBodies = drawBodies;
    this.drawJoints = drawJoints;
    this.drawAABBs = drawAABBs;
    this.drawInactiveBodies = drawInactiveBodies;
View Full Code Here

Examples of com.badlogic.gdx.math.Vector2

  }

  private void drawSolidPolygon (Vector2[] vertices, int vertexCount, Color color, boolean closed) {
    renderer.setColor(color.r, color.g, color.b, color.a);
    for (int i = 0; i < vertexCount; i++) {
      Vector2 v = vertices[i];
      if (i == 0) {
        lv.set(v);
        f.set(v);
        continue;
      }
View Full Code Here

Examples of com.badlogic.gdx.math.Vector2

    Body bodyA = joint.getBodyA();
    Body bodyB = joint.getBodyB();
    Transform xf1 = bodyA.getTransform();
    Transform xf2 = bodyB.getTransform();

    Vector2 x1 = xf1.getPosition();
    Vector2 x2 = xf2.getPosition();
    Vector2 p1 = joint.getAnchorA();
    Vector2 p2 = joint.getAnchorB();

    if (joint.getType() == JointType.DistanceJoint) {
      drawSegment(p1, p2, JOINT_COLOR);
    } else if (joint.getType() == JointType.PulleyJoint) {
      PulleyJoint pulley = (PulleyJoint)joint;
      Vector2 s1 = pulley.getGroundAnchorA();
      Vector2 s2 = pulley.getGroundAnchorB();
      drawSegment(s1, p1, JOINT_COLOR);
      drawSegment(s2, p2, JOINT_COLOR);
      drawSegment(s1, s2, JOINT_COLOR);
    } else if (joint.getType() == JointType.MouseJoint) {
      drawSegment(joint.getAnchorA(), joint.getAnchorB(), JOINT_COLOR);
View Full Code Here

Examples of com.forgeessentials.util.vector.Vector2

    }
  }

  public static Vector2 getDirectionVector(Point center, EntityPlayerMP player)
  {
    Vector2 vecp = new Vector2(center.getX() - player.posX, center.getZ() - player.posZ);
    vecp.normalize();
    vecp.multiply(-1);
    return vecp;
  }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.types.Vector2

    return new org.lwjgl.util.vector.Vector4f(v.X, v.Y, v.Z, v.W);
  }

  public static Vector2 OMVVector2(org.lwjgl.util.vector.Vector2f v)
  {
    return new Vector2(v.x, v.y);
  }
View Full Code Here

Examples of gwlpr.protocol.util.Vector2

        p.uByte = 1;
        p.uShort = 2;
        p.uInt = 3;
        p.uLong = 4;
        p.single = 5.0F;
        p.vec2 = new Vector2(6.0F, 7.0F);
        p.vec3 = new Vector3(8.0F, 9.0F, 10.0F);
        p.vec4 = new Vector4(11.0F, 12.0F, 13.0F, 14.0F);
        p.dw3 = new WorldPosition(15.0F, 16.0F, 17.0F, 18);
        p.vint = 19;
        p.ascii = "20";
View Full Code Here

Examples of gwt.g2d.client.math.Vector2

 
  /**
   * Gets the size of the surface.
   */
  public Vector2 getSize() {
    return new Vector2(getWidth(), getHeight());
  }
View Full Code Here

Examples of gwt.g2d.shared.math.Vector2

 
  // radius
  private double fRadius;
 
  public CircleShape(double centerX, double centerY, double radius) {
    this(new Vector2(centerX, centerY), radius);
  }
View Full Code Here

Examples of micdoodle8.mods.galacticraft.api.vector.Vector2

        this.onGround = onGround;
    }

    public PacketEntityUpdate(Entity entity)
    {
        this(entity.getEntityId(), new Vector3(entity.posX, entity.posY, entity.posZ), new Vector2(entity.rotationYaw, entity.rotationPitch), new Vector3(entity.motionX, entity.motionY, entity.motionZ), entity.onGround);
    }
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.