Merge pull request #634 from Gustl22/width_height_doc

Viewport: doc for height and width
This commit is contained in:
Emux 2019-01-23 09:42:51 +02:00 committed by GitHub
commit 929d1fc78b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -80,6 +80,9 @@ public class Viewport {
protected final float[] mu = new float[4];
protected final float[] mViewCoords = new float[8];
/**
* Height and width in pixels
*/
protected float mHeight, mWidth;
public static final float VIEW_DISTANCE = 3.0f;

View File

@ -128,10 +128,16 @@ public class GLViewport extends Viewport {
getMapExtents(plane, 0);
}
/**
* @return width in pixels
*/
public float getWidth() {
return mWidth;
}
/**
* @return height in pixels
*/
public float getHeight() {
return mHeight;
}