Examples of PulleyJoint


Examples of com.badlogic.gdx.physics.box2d.joints.PulleyJoint

    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.badlogic.gdx.physics.box2d.joints.PulleyJoint

    if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, jointAddr);
    if (def.type == JointType.GearJoint) joint = new GearJoint(this, jointAddr, ((GearJointDef) def).joint1, ((GearJointDef) def).joint2);
    if (def.type == JointType.MotorJoint) joint = new MotorJoint(this, jointAddr);
    if (def.type == JointType.MouseJoint) joint = new MouseJoint(this, jointAddr);
    if (def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, jointAddr);
    if (def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, jointAddr);
    if (def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, jointAddr);
    if (def.type == JointType.RopeJoint) joint = new RopeJoint(this, jointAddr);
    if (def.type == JointType.WeldJoint) joint = new WeldJoint(this, jointAddr);
    if (def.type == JointType.WheelJoint) joint = new WheelJoint(this, jointAddr);
    if (joint != null) joints.put(joint.addr, joint);
View Full Code Here

Examples of com.badlogic.gdx.physics.box2d.joints.PulleyJoint

    if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, (org.jbox2d.dynamics.joints.FrictionJoint)j);
    if (def.type == JointType.GearJoint) joint = new GearJoint(this, (org.jbox2d.dynamics.joints.GearJoint)j, ((GearJointDef) def).joint1, ((GearJointDef) def).joint2);
    if (def.type == JointType.MotorJoint) joint = new MotorJoint(this, (org.jbox2d.dynamics.joints.MotorJoint)j);
    if (def.type == JointType.MouseJoint) joint = new MouseJoint(this, (org.jbox2d.dynamics.joints.MouseJoint)j);
    if (def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, (org.jbox2d.dynamics.joints.PrismaticJoint)j);
    if (def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, (org.jbox2d.dynamics.joints.PulleyJoint)j);
    if (def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, (org.jbox2d.dynamics.joints.RevoluteJoint)j);
    if (def.type == JointType.RopeJoint) joint = new RopeJoint(this, (org.jbox2d.dynamics.joints.RopeJoint)j);
    if (def.type == JointType.WeldJoint) joint = new WeldJoint(this, (org.jbox2d.dynamics.joints.WeldJoint)j);
    if (def.type == JointType.WheelJoint) joint = new WheelJoint(this, (org.jbox2d.dynamics.joints.WheelJoint)j);
    if (joint == null) throw new GdxRuntimeException("Joint type '" + def.type + "' not yet supported by GWT backend");
View Full Code Here

Examples of com.badlogic.gdx.physics.box2d.joints.PulleyJoint

    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.badlogic.gdx.physics.box2d.joints.PulleyJoint

    if (def.type == JointType.DistanceJoint) joint = new DistanceJoint(this, jointAddr);
    if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, jointAddr);
    if (def.type == JointType.GearJoint) joint = new GearJoint(this, jointAddr);
    if (def.type == JointType.MouseJoint) joint = new MouseJoint(this, jointAddr);
    if (def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, jointAddr);
    if (def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, jointAddr);
    if (def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, jointAddr);
    if (def.type == JointType.WeldJoint) joint = new WeldJoint(this, jointAddr);
    if (def.type == JointType.RopeJoint) joint = new RopeJoint(this, jointAddr);
    if (def.type == JointType.WheelJoint) joint = new WheelJoint(this, jointAddr);
    if (joint != null) joints.put(joint.addr, joint);
View Full Code Here

Examples of com.badlogic.gdx.physics.box2d.joints.PulleyJoint

    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.badlogic.gdx.physics.box2d.joints.PulleyJoint

    if (def.type == JointType.DistanceJoint) joint = new DistanceJoint(this, (org.jbox2d.dynamics.joints.DistanceJoint)j);
    if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, (org.jbox2d.dynamics.joints.FrictionJoint)j);
    // FIXME if(def.type == JointType.GearJoint) joint = new DistanceJoint(this, (org.jbox2d.dynamics.joints.DistanceJoint)j);
    if (def.type == JointType.MouseJoint) joint = new MouseJoint(this, (org.jbox2d.dynamics.joints.MouseJoint)j);
    if (def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, (org.jbox2d.dynamics.joints.PrismaticJoint)j);
    if (def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, (org.jbox2d.dynamics.joints.PulleyJoint)j);
    if (def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, (org.jbox2d.dynamics.joints.RevoluteJoint)j);
    // FIXME if(def.type == JointType.RopeJoint) joint = new RopeJoint(this, (org.jbox2d.dynamics.joints.RopeJoint)j);
    if (def.type == JointType.WeldJoint) joint = new WeldJoint(this, (org.jbox2d.dynamics.joints.WeldJoint)j);
// FIXME if(def.type == JointType.WheelJoint) joint = new WheelJoint(this, (org.jbox2d.dynamics.joints.WheelJoint)j);
    if (joint == null) throw new GdxRuntimeException("Joint type '" + def.type + "' not yet supported by GWT backend");
View Full Code Here

Examples of com.badlogic.gdx.physics.box2d.joints.PulleyJoint

    if (def.type == JointType.DistanceJoint) joint = new DistanceJoint(this, (org.jbox2d.dynamics.joints.DistanceJoint)j);
    if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, (org.jbox2d.dynamics.joints.FrictionJoint)j);
    if (def.type == JointType.GearJoint) joint = new GearJoint(this, (org.jbox2d.dynamics.joints.GearJoint)j, ((GearJointDef) def).joint1, ((GearJointDef) def).joint2);
    if (def.type == JointType.MouseJoint) joint = new MouseJoint(this, (org.jbox2d.dynamics.joints.MouseJoint)j);
    if (def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, (org.jbox2d.dynamics.joints.PrismaticJoint)j);
    if (def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, (org.jbox2d.dynamics.joints.PulleyJoint)j);
    if (def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, (org.jbox2d.dynamics.joints.RevoluteJoint)j);
    if (def.type == JointType.RopeJoint) joint = new RopeJoint(this, (org.jbox2d.dynamics.joints.RopeJoint)j);
    if (def.type == JointType.WeldJoint) joint = new WeldJoint(this, (org.jbox2d.dynamics.joints.WeldJoint)j);
    if (def.type == JointType.WheelJoint) joint = new WheelJoint(this, (org.jbox2d.dynamics.joints.WheelJoint)j);
    if (joint == null) throw new GdxRuntimeException("Joint type '" + def.type + "' not yet supported by GWT backend");
View Full Code Here

Examples of com.badlogic.gdx.physics.box2d.joints.PulleyJoint

    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.badlogic.gdx.physics.box2d.joints.PulleyJoint

    if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, (org.jbox2d.dynamics.joints.FrictionJoint)j);
    if (def.type == JointType.GearJoint) joint = new GearJoint(this, (org.jbox2d.dynamics.joints.GearJoint)j, ((GearJointDef) def).joint1, ((GearJointDef) def).joint2);
    if (def.type == JointType.MotorJoint) joint = new MotorJoint(this, (org.jbox2d.dynamics.joints.MotorJoint)j);
    if (def.type == JointType.MouseJoint) joint = new MouseJoint(this, (org.jbox2d.dynamics.joints.MouseJoint)j);
    if (def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, (org.jbox2d.dynamics.joints.PrismaticJoint)j);
    if (def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, (org.jbox2d.dynamics.joints.PulleyJoint)j);
    if (def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, (org.jbox2d.dynamics.joints.RevoluteJoint)j);
    if (def.type == JointType.RopeJoint) joint = new RopeJoint(this, (org.jbox2d.dynamics.joints.RopeJoint)j);
    if (def.type == JointType.WeldJoint) joint = new WeldJoint(this, (org.jbox2d.dynamics.joints.WeldJoint)j);
    if (def.type == JointType.WheelJoint) joint = new WheelJoint(this, (org.jbox2d.dynamics.joints.WheelJoint)j);
    if (joint == null) throw new GdxRuntimeException("Joint type '" + def.type + "' not yet supported by GWT backend");
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.