public class ExtendViewport extends Viewport
Constructor and Description |
---|
ExtendViewport(float minWorldWidth,
float minWorldHeight)
Creates a new viewport using a new
OrthographicCamera with no maximum world size. |
ExtendViewport(float minWorldWidth,
float minWorldHeight,
Camera camera)
Creates a new viewport with no maximum world size.
|
ExtendViewport(float minWorldWidth,
float minWorldHeight,
float maxWorldWidth,
float maxWorldHeight)
Creates a new viewport using a new
OrthographicCamera and a maximum world size. |
ExtendViewport(float minWorldWidth,
float minWorldHeight,
float maxWorldWidth,
float maxWorldHeight,
Camera camera)
Creates a new viewport with a maximum world size.
|
Modifier and Type | Method and Description |
---|---|
float |
getMaxWorldHeight() |
float |
getMaxWorldWidth() |
float |
getMinWorldHeight() |
float |
getMinWorldWidth() |
void |
setMaxWorldHeight(float maxWorldHeight) |
void |
setMaxWorldWidth(float maxWorldWidth) |
void |
setMinWorldHeight(float minWorldHeight) |
void |
setMinWorldWidth(float minWorldWidth) |
void |
update(int screenWidth,
int screenHeight,
boolean centerCamera)
Updates the viewport's camera.
|
calculateScissors, getBottomGutterHeight, getCamera, getLeftGutterWidth, getPickRay, getRightGutterWidth, getRightGutterX, getTopGutterHeight, getTopGutterY, getViewportHeight, getViewportWidth, getViewportX, getViewportY, getWorldHeight, getWorldWidth, project, project, setCamera, setWorldHeight, setWorldSize, setWorldWidth, toScreenCoordinates, unproject, unproject, update, update
public ExtendViewport(float minWorldWidth, float minWorldHeight)
OrthographicCamera
with no maximum world size.public ExtendViewport(float minWorldWidth, float minWorldHeight, Camera camera)
public ExtendViewport(float minWorldWidth, float minWorldHeight, float maxWorldWidth, float maxWorldHeight)
OrthographicCamera
and a maximum world size.public ExtendViewport(float minWorldWidth, float minWorldHeight, float maxWorldWidth, float maxWorldHeight, Camera camera)
maxWorldWidth
- User 0 for no maximum width.maxWorldHeight
- User 0 for no maximum height.public void update(int screenWidth, int screenHeight, boolean centerCamera)
Viewport
ApplicationListener#resize(int, int)
or
Screen#resize(int, int)
.
The default implementation calls GL20.glViewport(int, int, int, int)
and configures the camera viewport size.
public float getMinWorldWidth()
public void setMinWorldWidth(float minWorldWidth)
public float getMinWorldHeight()
public void setMinWorldHeight(float minWorldHeight)
public float getMaxWorldWidth()
public void setMaxWorldWidth(float maxWorldWidth)
public float getMaxWorldHeight()
public void setMaxWorldHeight(float maxWorldHeight)
Copyright © 2014. All Rights Reserved.