| Modifier and Type | Class and Description |
|---|---|
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| public int | activateKey
The key which must be pressed to activate rotate, translate and forward or 0 to always activate. |
| protected boolean | activatePressed
Indicates if the activateKey is currently being pressed. |
| public boolean | alwaysScroll
Whether scrolling requires the activeKey to be pressed (false) or always allow scrolling (true). |
| public boolean | autoUpdate
Whether to update the camera after it has been changed. |
| public int | |
| protected boolean | |
| protected int | button
The current (first) button being pressed. |
| public Camera | camera
The camera. |
| protected boolean | |
| public int | forwardButton
The button for translating the camera along the direction axis |
| public int | |
| protected boolean | |
| public boolean | forwardTarget
Whether to update the target on forward |
| protected final CameraInputController. | |
| private boolean | |
| public float | pinchZoomFactor
World units per screen size |
| public float | rotateAngle
The angle to rotate when moved the full width or height of the screen. |
| public int | rotateButton
The button for rotating the camera. |
| public int | |
| protected boolean | |
| public int | |
| protected boolean | |
| public float | scrollFactor
The weight for each scrolled amount. |
| public boolean | scrollTarget
Whether to update the target on scroll |
| private float | |
| private float | |
| public Vector3 | target
The target to rotate around. |
| private final Vector3 | |
| private final Vector3 | |
| private int | |
| public int | translateButton
The button for translating the camera along the up/right plane |
| public boolean | translateTarget
Whether to update the target on translation |
| public float | translateUnits
The units to translate the camera when moved the full width or height of the screen. |
| Access | Constructor and Description |
|---|---|
| protected | CameraInputController(final CameraInputController.
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | keyDown(int keycode)
Overrides com. Implements com. Called when a key was pressed |
| public boolean | keyUp(int keycode)
Overrides com. Implements com. Called when a key was released |
| protected boolean | |
| protected boolean | |
| public boolean | scrolled(float amountX, float amountY)
Overrides com. Implements com. Called when the mouse wheel was scrolled. |
| public void | setInvertedControls(boolean
Whether or not to invert the controls invertControls)Sets the CameraInputControllers' control inversion. |
| public boolean | touchDown(int screenX, int screenY, int pointer, int button)
Overrides com. Implements com. Called when the screen was touched or a mouse button was pressed. |
| public boolean | touchDragged(int screenX, int screenY, int pointer)
Overrides com. Implements com. Called when a finger or the mouse was dragged. |
| public boolean | touchUp(int screenX, int screenY, int pointer, int button)
Overrides com. Implements com. Called when a finger was lifted or a mouse button was released. |
| public void | |
| public boolean |
| activateKey | back to summary |
|---|---|
| public int activateKey The key which must be pressed to activate rotate, translate and forward or 0 to always activate. | |
| activatePressed | back to summary |
|---|---|
| protected boolean activatePressed Indicates if the activateKey is currently being pressed. | |
| alwaysScroll | back to summary |
|---|---|
| public boolean alwaysScroll Whether scrolling requires the activeKey to be pressed (false) or always allow scrolling (true). | |
| autoUpdate | back to summary |
|---|---|
| public boolean autoUpdate Whether to update the camera after it has been changed. | |
| backwardKey | back to summary |
|---|---|
| public int backwardKey | |
| backwardPressed | back to summary |
|---|---|
| protected boolean backwardPressed | |
| button | back to summary |
|---|---|
| protected int button The current (first) button being pressed. | |
| camera | back to summary |
|---|---|
| public Camera camera The camera. | |
| controlsInverted | back to summary |
|---|---|
| protected boolean controlsInverted | |
| forwardButton | back to summary |
|---|---|
| public int forwardButton The button for translating the camera along the direction axis | |
| forwardKey | back to summary |
|---|---|
| public int forwardKey | |
| forwardPressed | back to summary |
|---|---|
| protected boolean forwardPressed | |
| forwardTarget | back to summary |
|---|---|
| public boolean forwardTarget Whether to update the target on forward | |
| gestureListener | back to summary |
|---|---|
| protected final CameraInputController. | |
| multiTouch | back to summary |
|---|---|
| private boolean multiTouch | |
| pinchZoomFactor | back to summary |
|---|---|
| public float pinchZoomFactor World units per screen size | |
| rotateAngle | back to summary |
|---|---|
| public float rotateAngle The angle to rotate when moved the full width or height of the screen. | |
| rotateButton | back to summary |
|---|---|
| public int rotateButton The button for rotating the camera. | |
| rotateLeftKey | back to summary |
|---|---|
| public int rotateLeftKey | |
| rotateLeftPressed | back to summary |
|---|---|
| protected boolean rotateLeftPressed | |
| rotateRightKey | back to summary |
|---|---|
| public int rotateRightKey | |
| rotateRightPressed | back to summary |
|---|---|
| protected boolean rotateRightPressed | |
| scrollFactor | back to summary |
|---|---|
| public float scrollFactor The weight for each scrolled amount. | |
| scrollTarget | back to summary |
|---|---|
| public boolean scrollTarget Whether to update the target on scroll | |
| startX | back to summary |
|---|---|
| private float startX | |
| startY | back to summary |
|---|---|
| private float startY | |
| target | back to summary |
|---|---|
| public Vector3 target The target to rotate around. | |
| tmpV1 | back to summary |
|---|---|
| private final Vector3 tmpV1 | |
| tmpV2 | back to summary |
|---|---|
| private final Vector3 tmpV2 | |
| touched | back to summary |
|---|---|
| private int touched | |
| translateButton | back to summary |
|---|---|
| public int translateButton The button for translating the camera along the up/right plane | |
| translateTarget | back to summary |
|---|---|
| public boolean translateTarget Whether to update the target on translation | |
| translateUnits | back to summary |
|---|---|
| public float translateUnits The units to translate the camera when moved the full width or height of the screen. | |
| CameraInputController | back to summary |
|---|---|
| protected CameraInputController(final CameraInputController. | |
| CameraInputController | back to summary |
|---|---|
| public CameraInputController(final Camera camera) | |
| keyDown | back to summary |
|---|---|
| public boolean keyDown(int keycode) Overrides com. Implements com. Doc from com. Called when a key was pressed
| |
| keyUp | back to summary |
|---|---|
| public boolean keyUp(int keycode) Overrides com. Implements com. Doc from com. Called when a key was released
| |
| pinchZoom | back to summary |
|---|---|
| protected boolean pinchZoom(float amount) | |
| process | back to summary |
|---|---|
| protected boolean process(float deltaX, float deltaY, int button) | |
| scrolled | back to summary |
|---|---|
| public boolean scrolled(float amountX, float amountY) Overrides com. Implements com. Doc from com. Called when the mouse wheel was scrolled. Will not be called on iOS.
| |
| setInvertedControls | back to summary |
|---|---|
| public void setInvertedControls(boolean invertControls) Sets the CameraInputControllers' control inversion.
| |
| touchDown | back to summary |
|---|---|
| public boolean touchDown(int screenX, int screenY, int pointer, int button) Overrides com. Implements com. Doc from com. Called when the screen was touched or a mouse button was pressed. The button parameter will be
| |
| touchDragged | back to summary |
|---|---|
| public boolean touchDragged(int screenX, int screenY, int pointer) Overrides com. Implements com. Doc from com. Called when a finger or the mouse was dragged.
| |
| touchUp | back to summary |
|---|---|
| public boolean touchUp(int screenX, int screenY, int pointer, int button) Overrides com. Implements com. Doc from com. Called when a finger was lifted or a mouse button was released. The button parameter will be
| |
| update | back to summary |
|---|---|
| public void update() | |
| zoom | back to summary |
|---|---|
| public boolean zoom(float amount) | |
| Modifier and Type | Field and Description |
|---|---|
| public CameraInputController | |
| private float |
| Access | Constructor and Description |
|---|---|
| protected |
| controller | back to summary |
|---|---|
| public CameraInputController controller | |
| previousZoom | back to summary |
|---|---|
| private float previousZoom | |
| CameraGestureListener | back to summary |
|---|---|
| protected CameraGestureListener() | |
| fling | back to summary |
|---|---|
| public boolean fling(float velocityX, float velocityY, int button) Overrides com. Implements com. Doc from com. Called when the user dragged a finger over the screen and lifted it. Reports the last known velocity of the finger in pixels per second.
| |
| longPress | back to summary |
|---|---|
| public boolean longPress(float x, float y) Overrides com. Implements com.
| |
| pan | back to summary |
|---|---|
| public boolean pan(float x, float y, float deltaX, float deltaY) Overrides com. Implements com. Doc from com. Called when the user drags a finger over the screen.
| |
| pinch | back to summary |
|---|---|
| public boolean pinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2) Overrides com. Implements com. Doc from com. Called when a user performs a pinch zoom gesture. Reports the initial positions of the two involved fingers and their current positions.
| |
| tap | back to summary |
|---|---|
| public boolean tap(float x, float y, int count, int button) Overrides com. Implements com. Doc from com. Called when a tap occured. A tap happens if a touch went down on the screen and was lifted again without moving outside
of the tap square. The tap square is a rectangular area around the initial touch position as specified on construction
time of the
| |
| touchDown | back to summary |
|---|---|
| public boolean touchDown(float x, float y, int pointer, int button) Overrides com. Implements com.
| |
| zoom | back to summary |
|---|---|
| public boolean zoom(float initialDistance, float distance) Overrides com. Implements com. Doc from com. Called when the user performs a pinch zoom gesture. The original distance is the distance in pixels when the gesture started.
| |