Lines Matching refs:velocity

87      * velocity which is preserved in the bounce when the horizontal edge is reached. A null value
104 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value
173 * Returns the absolute value of the current velocity.
175 * @return The original velocity less the deceleration, norm of the X and Y velocity vector.
410 * depend on the initial velocity of the fling.
414 * @param velocityX Initial velocity of the fling (X) measured in pixels per
416 * @param velocityY Initial velocity of the fling (Y) measured in pixels per
552 // Initial velocity
555 // Current velocity
660 * Get a signed deceleration that will reduce the velocity.
662 static private float getDeceleration(int velocity) {
663 return velocity > 0 ? -GRAVITY : GRAVITY;
737 private void startSpringback(int start, int end, int velocity) {
745 // TODO take velocity into account
751 void fling(int start, int velocity, int min, int max, int over) {
754 mCurrVelocity = mVelocity = velocity;
760 startAfterEdge(start, min, max, velocity);
767 if (velocity != 0) {
768 mDuration = mSplineDuration = getSplineFlingDuration(velocity);
769 totalDistance = getSplineFlingDistance(velocity);
772 mSplineDistance = (int) (totalDistance * Math.signum(velocity));
787 private double getSplineDeceleration(int velocity) {
788 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * PHYSICAL_COEF));
791 private double getSplineFlingDistance(int velocity) {
792 final double l = getSplineDeceleration(velocity);
798 private int getSplineFlingDuration(int velocity) {
799 final double l = getSplineDeceleration(velocity);
804 private void fitOnBounceCurve(int start, int end, int velocity) {
806 final float durationToApex = - velocity / mDeceleration;
807 final float distanceToApex = velocity * velocity / 2.0f / Math.abs(mDeceleration);
816 private void startBounceAfterEdge(int start, int end, int velocity) {
817 mDeceleration = getDeceleration(velocity == 0 ? start - end : velocity);
818 fitOnBounceCurve(start, end, velocity);
822 private void startAfterEdge(int start, int min, int max, int velocity) {
831 boolean keepIncreasing = overDistance * velocity >= 0;
833 // Will result in a bounce or a to_boundary depending on velocity.
834 startBounceAfterEdge(start, edge, velocity);
836 final double totalDistance = getSplineFlingDistance(velocity);
838 fling(start, velocity, positive ? min : start, positive ? start : max, mOver);
840 startSpringback(start, edge, velocity);
850 // We were in fling/scroll mode before: current velocity is such that distance to
876 // Duration from start to null velocity
903 * Update the current position and velocity for current time. Returns