
		/**
	 * Retrurn strategy how the different screen sizes and aspect ratios should be handled
	 * @return {String} 
	 */
	public Viewport getViewport () {
		return viewport;
	}

	/**
	 * Sets how different screen sizes and aspect ratios should be handled
	 * @param viewportMode {String} fit | fill | fillx| filly | stretch | stretchx | stretchy
	 */
	public void setViewportMode (String viewportMode) {
		this.viewport = viewport;
	}
	
	/** Various scaling types for fitting one rectangle into another. */
	protected enum ViewPortMode {
		/**
		 * Scales the source to fit the target while keeping the same aspect ratio. This may cause the source to be
		 * smaller than the target in one direction.
		 */
		FIT,
		/**
		 * Scales the source to fill the target while keeping the same aspect ratio. This may cause the source to be
		 * larger than the target in one direction.
		 */
		FILL,
		/**
		 * Scales the source to fill the target in the x direction while keeping the same aspect ratio. This may cause
		 * the source to be smaller or larger than the target in the y direction.
		 */
		FILLX,
		/**
		 * Scales the source to fill the target in the y direction while keeping the same aspect ratio. This may cause
		 * the source to be smaller or larger than the target in the x direction.
		 */
		FILLY,
		/** Scales the source to fill the target. This may cause the source to not keep the same aspect ratio. */
		STRETCH,
		/**
		 * Scales the source to fill the target in the x direction, without changing the y direction. This may cause the
		 * source to not keep the same aspect ratio.
		 */
		STRETCHX,
		/**
		 * Scales the source to fill the target in the y direction, without changing the x direction. This may cause the
		 * source to not keep the same aspect ratio.
		 */
		STRETCHY,
		/** The source is not scaled. */
		NONE;

		static private final Vector2 temp = new Vector2();

		/**
		 * Returns the size of the source scaled to the target. Note the same Vector2 instance is always returned and
		 * should never be cached.
		 */
		public Vector2 apply(Camera camera, float screenWidth, float screenHeight) {
			Frustum f = camera.getFrustum();
			float worldWidth = f.right - f.left;
			float worldheight = f.top - f.bottom;
			switch (this) {
			case FIT: {
				float targetRatio = screenHeight / screenWidth;
				float sourceRatio = worldheight / worldWidth;
				float scale = targetRatio > sourceRatio ? screenWidth / worldWidth : screenHeight / worldheight;
				temp.x = worldWidth * scale;
				temp.y = worldheight * scale;
				break;
			}
			case FILL: {
				float targetRatio = screenHeight / screenWidth;
				float sourceRatio = worldheight / worldWidth;
				float scale = targetRatio < sourceRatio ? screenWidth / worldWidth : screenHeight / worldheight;
				temp.x = worldWidth * scale;
				temp.y = worldheight * scale;
				break;
			}
			case FILLX: {
				float scale = screenWidth / worldWidth;
				temp.x = worldWidth * scale;
				temp.y = worldheight * scale;
				break;
			}
			case FILLY: {
				float scale = screenHeight / worldheight;
				temp.x = worldWidth * scale;
				temp.y = worldheight * scale;
				break;
			}
			case STRETCH:
				temp.x = screenWidth;
				temp.y = screenHeight;
				break;
			case STRETCHX:
				temp.x = screenWidth;
				temp.y = worldheight;
				break;
			case STRETCHY:
				temp.x = worldWidth;
				temp.y = screenHeight;
				break;
			case NONE:
				temp.x = screenWidth;
				temp.y = screenHeight;
				break;
			}
			
			f.set(left, right, top, bottom, near, far);
			return temp;
		}
	}

