class RotateGestureRecognizer extends java.lang.Object implements GestureRecognizer
Modifier and Type | Class and Description |
---|---|
private static class |
RotateGestureRecognizer.RotateRecognitionState |
private static class |
RotateGestureRecognizer.TouchPointTracker |
Modifier and Type | Field and Description |
---|---|
(package private) double |
angleReference |
(package private) double |
centerAbsX |
(package private) double |
centerAbsY |
(package private) double |
centerX |
(package private) double |
centerY |
(package private) double |
currentRotation |
private int |
currentTouchCount |
(package private) boolean |
direct |
(package private) double |
inertiaLastTime |
private DoubleProperty |
inertiaRotationVelocity |
private Timeline |
inertiaTimeline |
private double |
initialInertiaRotationVelocity |
private double |
lastTouchEventTime |
private static double |
MAX_INITIAL_VELOCITY |
(package private) int |
modifiers |
private static double |
ROTATATION_THRESHOLD |
private static boolean |
ROTATION_INERTIA_ENABLED |
private static double |
ROTATION_INERTIA_MILLIS |
private double |
rotationStartTime |
private ViewScene |
scene |
private RotateGestureRecognizer.RotateRecognitionState |
state |
(package private) double |
totalRotation |
(package private) long |
touchPointID1 |
(package private) long |
touchPointID2 |
(package private) int |
touchPointsInEvent |
private boolean |
touchPointsPressed |
private boolean |
touchPointsSetChanged |
(package private) java.util.Map<java.lang.Long,RotateGestureRecognizer.TouchPointTracker> |
trackers |
Constructor and Description |
---|
RotateGestureRecognizer(ViewScene scene) |
Modifier and Type | Method and Description |
---|---|
private void |
assignActiveTouchpoints() |
private void |
calculateCenter() |
private double |
getAngle(RotateGestureRecognizer.TouchPointTracker tp1,
RotateGestureRecognizer.TouchPointTracker tp2) |
private double |
getNormalizedDelta(double oldAngle,
double newAngle) |
void |
notifyBeginTouchEvent(long time,
int modifiers,
boolean isDirect,
int touchEventCount) |
void |
notifyEndTouchEvent(long time) |
void |
notifyNextTouchEvent(long time,
int type,
long touchId,
int x,
int y,
int xAbs,
int yAbs) |
void |
params(int modifiers,
boolean direct) |
(package private) void |
reset() |
private void |
sendRotateEvent(boolean isInertia) |
private void |
sendRotateFinishedEvent() |
private void |
sendRotateStartedEvent() |
void |
touchMoved(long id,
long nanos,
int x,
int y,
int xAbs,
int yAbs) |
void |
touchPressed(long id,
long nanos,
int x,
int y,
int xAbs,
int yAbs) |
void |
touchReleased(long id,
long nanos,
int x,
int y,
int xAbs,
int yAbs) |
private ViewScene scene
private static double ROTATATION_THRESHOLD
private static boolean ROTATION_INERTIA_ENABLED
private static double MAX_INITIAL_VELOCITY
private static double ROTATION_INERTIA_MILLIS
private RotateGestureRecognizer.RotateRecognitionState state
private Timeline inertiaTimeline
private DoubleProperty inertiaRotationVelocity
private double initialInertiaRotationVelocity
private double rotationStartTime
private double lastTouchEventTime
java.util.Map<java.lang.Long,RotateGestureRecognizer.TouchPointTracker> trackers
int modifiers
boolean direct
private int currentTouchCount
private boolean touchPointsSetChanged
private boolean touchPointsPressed
int touchPointsInEvent
long touchPointID1
long touchPointID2
double centerX
double centerY
double centerAbsX
double centerAbsY
double currentRotation
double angleReference
double totalRotation
double inertiaLastTime
RotateGestureRecognizer(ViewScene scene)
public void notifyBeginTouchEvent(long time, int modifiers, boolean isDirect, int touchEventCount)
notifyBeginTouchEvent
in interface GlassTouchEventListener
public void notifyNextTouchEvent(long time, int type, long touchId, int x, int y, int xAbs, int yAbs)
notifyNextTouchEvent
in interface GlassTouchEventListener
private void calculateCenter()
private double getAngle(RotateGestureRecognizer.TouchPointTracker tp1, RotateGestureRecognizer.TouchPointTracker tp2)
private double getNormalizedDelta(double oldAngle, double newAngle)
private void assignActiveTouchpoints()
public void notifyEndTouchEvent(long time)
notifyEndTouchEvent
in interface GlassTouchEventListener
private void sendRotateStartedEvent()
private void sendRotateEvent(boolean isInertia)
private void sendRotateFinishedEvent()
public void params(int modifiers, boolean direct)
public void touchPressed(long id, long nanos, int x, int y, int xAbs, int yAbs)
public void touchReleased(long id, long nanos, int x, int y, int xAbs, int yAbs)
public void touchMoved(long id, long nanos, int x, int y, int xAbs, int yAbs)
void reset()