Package org.jbox2d.dynamics

Examples of org.jbox2d.dynamics.Body.wakeUp()


            long cursorID =  de.getDragCursor().getId();

            switch (de.getId()) {
            case DragEvent.GESTURE_DETECTED:
              comp.sendToFront();
              body.wakeUp();
              mouseJoint = createDragJoint(theWorld, body, to.x, to.y);
              comp.setUserData("mouseJoint" + cursorID, mouseJoint);
              break;
            case DragEvent.GESTURE_UPDATED:
              mouseJoint = (MouseJoint) comp.getUserData("mouseJoint" + cursorID);
View Full Code Here


                new Vec2(body.getPosition().x + dir.x, body.getPosition().y + dir.y),
                body.getAngle());
            switch (de.getId()) {
            case DragEvent.GESTURE_DETECTED:
              comp.sendToFront();
              body.wakeUp();
              break;
            case DragEvent.GESTURE_UPDATED:
            case DragEvent.GESTURE_ENDED:
            default:
              break;
View Full Code Here

        //Un-scale position from mt4j to box2d
        PhysicsHelper.scaleDown(to, scale);
        switch (de.getId()) {
        case DragEvent.GESTURE_DETECTED:
          comp.sendToFront();
          body.wakeUp();
          body.setXForm(new Vec2(to.x,  to.y), body.getAngle());
          mouseJoint = PhysicsHelper.createDragJoint(world, body, to.x, to.y);
          comp.setUserData(comp.getID(), mouseJoint);
          break;
        case DragEvent.GESTURE_UPDATED:
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.