Class CameraInputController.CameraGestureListener
- java.lang.Object
-
- com.badlogic.gdx.input.GestureDetector.GestureAdapter
-
- com.badlogic.gdx.graphics.g3d.utils.CameraInputController.CameraGestureListener
-
- All Implemented Interfaces:
GestureDetector.GestureListener
- Enclosing class:
- CameraInputController
protected static class CameraInputController.CameraGestureListener extends GestureDetector.GestureAdapter
-
-
Field Summary
Fields Modifier and Type Field Description CameraInputControllercontroller
-
Constructor Summary
Constructors Modifier Constructor Description protectedCameraGestureListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanfling(float velocityX, float velocityY, int button)Called when the user dragged a finger over the screen and lifted it.booleanlongPress(float x, float y)booleanpan(float x, float y, float deltaX, float deltaY)Called when the user drags a finger over the screen.booleanpinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2)Called when a user performs a pinch zoom gesture.booleantap(float x, float y, int count, int button)Called when a tap occured.booleantouchDown(float x, float y, int pointer, int button)booleanzoom(float initialDistance, float distance)Called when the user performs a pinch zoom gesture.-
Methods inherited from class com.badlogic.gdx.input.GestureDetector.GestureAdapter
panStop, pinchStop
-
-
-
-
Field Detail
-
controller
public CameraInputController controller
-
-
Method Detail
-
touchDown
public boolean touchDown(float x, float y, int pointer, int button)- Specified by:
touchDownin interfaceGestureDetector.GestureListener- Overrides:
touchDownin classGestureDetector.GestureAdapter- See Also:
InputProcessor.touchDown(int, int, int, int)
-
tap
public boolean tap(float x, float y, int count, int button)Description copied from interface:GestureDetector.GestureListenerCalled 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 theGestureDetector.- Specified by:
tapin interfaceGestureDetector.GestureListener- Overrides:
tapin classGestureDetector.GestureAdaptercount- the number of taps.
-
longPress
public boolean longPress(float x, float y)- Specified by:
longPressin interfaceGestureDetector.GestureListener- Overrides:
longPressin classGestureDetector.GestureAdapter
-
fling
public boolean fling(float velocityX, float velocityY, int button)Description copied from interface:GestureDetector.GestureListenerCalled when the user dragged a finger over the screen and lifted it. Reports the last known velocity of the finger in pixels per second.- Specified by:
flingin interfaceGestureDetector.GestureListener- Overrides:
flingin classGestureDetector.GestureAdapter- Parameters:
velocityX- velocity on x in secondsvelocityY- velocity on y in seconds
-
pan
public boolean pan(float x, float y, float deltaX, float deltaY)Description copied from interface:GestureDetector.GestureListenerCalled when the user drags a finger over the screen.- Specified by:
panin interfaceGestureDetector.GestureListener- Overrides:
panin classGestureDetector.GestureAdapterdeltaX- the difference in pixels to the last drag event on x.deltaY- the difference in pixels to the last drag event on y.
-
zoom
public boolean zoom(float initialDistance, float distance)Description copied from interface:GestureDetector.GestureListenerCalled when the user performs a pinch zoom gesture. The original distance is the distance in pixels when the gesture started.- Specified by:
zoomin interfaceGestureDetector.GestureListener- Overrides:
zoomin classGestureDetector.GestureAdapter- Parameters:
initialDistance- distance between fingers when the gesture started.distance- current distance between fingers.
-
pinch
public boolean pinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2)
Description copied from interface:GestureDetector.GestureListenerCalled when a user performs a pinch zoom gesture. Reports the initial positions of the two involved fingers and their current positions.- Specified by:
pinchin interfaceGestureDetector.GestureListener- Overrides:
pinchin classGestureDetector.GestureAdapter
-
-