Exemple #1
0
 /**
  * 将触摸屏幕的点转换为当前视图下的坐标
  *
  * @param touch
  */
 public void touchToWorld(Vector2f touch) {
   touch.x = (touch.x / glGraphics.getWidth()) * FrumWidth * zoom;
   touch.y = (touch.y / glGraphics.getHeight()) * FrumHeigh * zoom;
   // 在当前坐标系下的坐标
   touch.add(postion).sub(FrumWidth * zoom / 2, FrumHeigh * zoom / 2);
 }