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)
Configures this viewport's screen bounds using the specified screen size and calls
Viewport.apply(boolean). |
apply, apply, calculateScissors, getBottomGutterHeight, getCamera, getLeftGutterWidth, getPickRay, getRightGutterWidth, getRightGutterX, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getTopGutterHeight, getTopGutterY, getWorldHeight, getWorldWidth, project, project, setCamera, setScreenBounds, setScreenHeight, setScreenPosition, setScreenSize, setScreenWidth, setScreenX, setScreenY, setWorldHeight, setWorldSize, setWorldWidth, toScreenCoordinates, unproject, unproject, updatepublic 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)
ViewportViewport.apply(boolean). Typically called
from ApplicationListener.resize(int, int) or Screen.resize(int, int).
The default implementation only calls Viewport.apply(boolean).
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)