Package org.jbox2d.common

Examples of org.jbox2d.common.IViewportTransform


    if (!inputQueue.isEmpty()) {
      synchronized (inputQueue) {
        if (currTest == null) {
          inputQueue.clear();
        } else {
          IViewportTransform transform = currTest.getCamera().getTransform();
          while (!inputQueue.isEmpty()) {
            QueueItem i = inputQueue.pop();
            boolean oldFlip = transform.isYFlip();
            if (mouseBehavior == MouseBehavior.FORCE_Y_FLIP) {
              transform.setYFlip(true);
            }
            currTest.getCamera().getTransform().getScreenToWorld(i.p, i.p);
            if (mouseBehavior == MouseBehavior.FORCE_Y_FLIP) {
              transform.setYFlip(oldFlip);
            }
            switch (i.type) {
              case KeyPressed:
                if (i.c != KeyEvent.CHAR_UNDEFINED) {
                  model.getKeys()[i.c] = true;
View Full Code Here


      synchronized (inputQueue) {
        inputQueue.clear();
        return;
      }
    }
    IViewportTransform transform = currTest.getCamera().getTransform();
    // process our input
    while (!inputQueue.isEmpty()) {
      QueueItem i = null;
      synchronized (inputQueue) {
        if (!inputQueue.isEmpty()) {
          i = inputQueue.pop();
        }
      }
      if (i == null) {
        continue;
      }
      boolean oldFlip = transform.isYFlip();
      if (mouseBehavior == MouseBehavior.FORCE_Y_FLIP) {
        transform.setYFlip(true);
      }
      currTest.getCamera().getTransform().getScreenToWorld(i.p, i.p);
      if (mouseBehavior == MouseBehavior.FORCE_Y_FLIP) {
        transform.setYFlip(oldFlip);
      }
      switch (i.type) {
        case KeyPressed:
          if (i.c != KeyEvent.CHAR_UNDEFINED) {
            model.getKeys()[i.c] = true;
View Full Code Here

TOP

Related Classes of org.jbox2d.common.IViewportTransform

Copyright © 2018 www.massapicom. 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.