Back to project page fun-gl.
The source code is released under:
Apache License
If you think the Android project fun-gl listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jcxavier.android.opengl.game.manager; //from ww w .jav a2 s .co m import android.graphics.Point; import com.jcxavier.android.opengl.game.camera.Camera; import com.jcxavier.android.opengl.game.camera.DefaultCamera; /** * Created on 12/03/2014. * * @author Joo Xavier <jcxavier@jcxavier.com> */ public class ScreenManager { private final Point mSize; private final Camera mCamera; public ScreenManager(final Camera camera) { mSize = new Point(1, 1); if (camera != null) { mCamera = camera; } else { // fallback camera mCamera = new DefaultCamera(); } } public void onLayout(final Point screenSize) { mCamera.updateScreenSize(screenSize); mSize.set(screenSize.x, screenSize.y); } public Camera getCamera() { return mCamera; } public Point getSize() { return mSize; } }