Package org.jbox2d.dynamics.joints

Examples of org.jbox2d.dynamics.joints.PrismaticJointDef.initialize()


        RevoluteJointDef rjd = new RevoluteJointDef();
        rjd.initialize(prevBody, body, new Vec2(0.0f, 17.0f));
        world.createJoint(rjd);

        PrismaticJointDef pjd = new PrismaticJointDef();
        pjd.initialize(ground, body, new Vec2(0.0f, 17.0f), new Vec2(0.0f, 1.0f));

        pjd.maxMotorForce = 1000.0f;
        pjd.enableMotor = true;

        m_joint2 = (PrismaticJoint) world.createJoint(pjd);
View Full Code Here


        RevoluteJointDef rjd = new RevoluteJointDef();
        rjd.initialize(prevBody, body, new Vec2(0.0f, 17.0f));
        world.createJoint(rjd);

        PrismaticJointDef pjd = new PrismaticJointDef();
        pjd.initialize(ground, body, new Vec2(0.0f, 17.0f), new Vec2(0.0f, 1.0f));

        pjd.maxMotorForce = 1000.0f;
        pjd.enableMotor = true;

        m_joint2 = (PrismaticJoint) world.createJoint(pjd);
View Full Code Here

      PrismaticJointDef pjd = new PrismaticJointDef();

      // Bouncy limit
      Vec2 axis = new Vec2(2.0f, 1.0f);
      axis.normalize();
      pjd.initialize(ground, body, new Vec2(0.0f, 0.0f), axis);

      // Non-bouncy limit
      // pjd.Initialize(ground, body, Vec2(-10.0f, 10.0f), Vec2(1.0f, 0.0f));

      pjd.motorSpeed = 10.0f;
View Full Code Here

        RevoluteJointDef rjd = new RevoluteJointDef();
        rjd.initialize(prevBody, body, new Vec2(0.0f, 17.0f));
        getWorld().createJoint(rjd);

        PrismaticJointDef pjd = new PrismaticJointDef();
        pjd.initialize(ground, body, new Vec2(0.0f, 17.0f), new Vec2(0.0f, 1.0f));

        pjd.maxMotorForce = 1000.0f;
        pjd.enableMotor = false;

        m_joint2 = (PrismaticJoint) getWorld().createJoint(pjd);
View Full Code Here

      rjd.maxMotorTorque = 50.0f;
      rjd.enableMotor = true;
      getWorld().createJoint(rjd);

      PrismaticJointDef pjd = new PrismaticJointDef();
      pjd.initialize(ground, m_platform, new Vec2(0.0f, 5.0f), new Vec2(1.0f, 0.0f));

      pjd.maxMotorForce = 1000.0f;
      pjd.enableMotor = true;
      pjd.lowerTranslation = -10.0f;
      pjd.upperTranslation = 10.0f;
View Full Code Here

        RevoluteJointDef rjd = new RevoluteJointDef();
        rjd.initialize(prevBody, body, new Vec2(0.0f, 17.0f));
        getWorld().createJoint(rjd);

        PrismaticJointDef pjd = new PrismaticJointDef();
        pjd.initialize(ground, body, new Vec2(0.0f, 17.0f), new Vec2(0.0f, 1.0f));

        pjd.maxMotorForce = 1000.0f;
        pjd.enableMotor = true;

        getWorld().createJoint(pjd);
View Full Code Here

      bd3.position.set(2.5f, 12.0f);
      Body body3 = m_world.createBody(bd3);
      body3.createFixture(box, 5.0f);

      PrismaticJointDef jd3 = new PrismaticJointDef();
      jd3.initialize(ground, body3, bd3.position, new Vec2(0.0f, 1.0f));
      jd3.lowerTranslation = -5.0f;
      jd3.upperTranslation = 5.0f;
      jd3.enableLimit = true;

      m_joint3 = (PrismaticJoint) m_world.createJoint(jd3);
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.