diff --git a/worldwind/src/main/java/gov/nasa/worldwind/gesture/GestureRecognizer.java b/worldwind/src/main/java/gov/nasa/worldwind/gesture/GestureRecognizer.java index 8220ea4c1..2426d6f7a 100644 --- a/worldwind/src/main/java/gov/nasa/worldwind/gesture/GestureRecognizer.java +++ b/worldwind/src/main/java/gov/nasa/worldwind/gesture/GestureRecognizer.java @@ -37,8 +37,6 @@ public class GestureRecognizer { protected List listenerList = new ArrayList<>(); - protected float lowPassWeight = 0.4f; - @WorldWind.GestureState private int state = WorldWind.POSSIBLE; @@ -244,12 +242,10 @@ protected void handleActionPointerDown(MotionEvent event) { protected void handleActionMove(MotionEvent event) { this.eventCentroid(event, this.centroidArray); - float dx = this.centroidArray[0] - this.startX + this.centroidShiftX; - float dy = this.centroidArray[1] - this.startY + this.centroidShiftY; + this.translationX = this.centroidArray[0] - this.startX + this.centroidShiftX; + this.translationY = this.centroidArray[1] - this.startY + this.centroidShiftY; this.x = this.centroidArray[0]; this.y = this.centroidArray[1]; - this.translationX = this.lowPassFilter(this.translationX, dx); - this.translationY = this.lowPassFilter(this.translationY, dy); this.actionMove(event); } @@ -318,11 +314,6 @@ protected float[] eventCentroid(MotionEvent event, float[] result) { return result; } - protected float lowPassFilter(float value, float newValue) { - float w = this.lowPassWeight; - return value * (1 - w) + newValue * w; - } - protected void actionDown(MotionEvent event) { } diff --git a/worldwind/src/main/java/gov/nasa/worldwind/gesture/PinchRecognizer.java b/worldwind/src/main/java/gov/nasa/worldwind/gesture/PinchRecognizer.java index 7d81101b9..9fbebacf8 100644 --- a/worldwind/src/main/java/gov/nasa/worldwind/gesture/PinchRecognizer.java +++ b/worldwind/src/main/java/gov/nasa/worldwind/gesture/PinchRecognizer.java @@ -68,8 +68,7 @@ protected void actionMove(MotionEvent event) { } } else if (state == WorldWind.BEGAN || state == WorldWind.CHANGED) { float distance = this.currentPinchDistance(event); - float newScale = Math.abs(distance / this.referenceDistance); - this.scale = this.lowPassFilter(this.scale, newScale); + this.scale = Math.abs(distance / this.referenceDistance); this.transitionToState(event, WorldWind.CHANGED); } } diff --git a/worldwind/src/main/java/gov/nasa/worldwind/gesture/RotationRecognizer.java b/worldwind/src/main/java/gov/nasa/worldwind/gesture/RotationRecognizer.java index c05d7bb22..20b805f3a 100644 --- a/worldwind/src/main/java/gov/nasa/worldwind/gesture/RotationRecognizer.java +++ b/worldwind/src/main/java/gov/nasa/worldwind/gesture/RotationRecognizer.java @@ -66,8 +66,7 @@ protected void actionMove(MotionEvent event) { } } else if (state == WorldWind.BEGAN || state == WorldWind.CHANGED) { float angle = this.currentTouchAngle(event); - float newRotation = (float) WWMath.normalizeAngle180(angle - this.referenceAngle); - this.rotation = this.lowPassFilter(this.rotation, newRotation); + this.rotation = (float) WWMath.normalizeAngle180(angle - this.referenceAngle); this.transitionToState(event, WorldWind.CHANGED); } }