Lines Matching defs:velocity
43 * 1) provide a sophisticated ballistic velocity estimate to improve
44 * the relation between velocity (of the device) and acceleration
55 * for a given velocity
65 SimpleSmoothProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity,
324 * velocity scaling
582 * calc velocity for given tracker, with
583 * velocity scaling.
598 /* find the most plausible velocity. That is, the most distant
600 * in the same octant, and where the velocity is within an
601 * acceptable range to the initial velocity.
603 * @return The tracker's velocity or 0 if the above conditions are unmet
610 /* initial velocity: a low-offset, valid velocity */
629 * this heuristic avoids using the linear-motion velocity formula
646 /* set initial velocity and result */
662 /* we're in range with the initial velocity,
689 * Perform velocity approximation based on 2D 'mickeys' (mouse motion delta).
695 double velocity;
697 vel->last_velocity = vel->velocity;
701 velocity = QueryTrackers(vel, time);
703 DebugAccelF("velocity is %f\n", velocity);
705 vel->velocity = velocity;
706 return velocity == 0;
711 * constant-velocity response
750 * compute the acceleration for given velocity and enforce min_acceleration
755 double velocity, double threshold, double acc)
760 result = vel->Profile(dev, vel, velocity, threshold, acc);
770 * If the velocity has changed, an average is taken of 6 velocity factors:
771 * current velocity, last velocity and 4 times the average between the two.
779 if (vel->velocity <= 0) {
782 * If we have no idea about device velocity, don't pretend it.
787 if (vel->average_accel && vel->velocity != vel->last_velocity) {
789 * current and previous velocity.
793 BasicComputeAcceleration(dev, vel, vel->velocity, threshold, acc);
800 vel->velocity) / 2,
805 vel->velocity, vel->last_velocity, result);
809 vel->velocity, threshold, acc);
811 vel->velocity, result);
827 double velocity, double ignored, double acc)
829 return pow(velocity, (acc - 1.0) * 0.5);
833 * returns acceleration for velocity.
839 double velocity, double threshold, double acc)
842 return SimpleSmoothProfile(dev, vel, velocity, threshold, acc);
845 return PolynomialAccelerationProfile(dev, vel, velocity, 0, acc);
860 double velocity, double threshold, double acc)
866 if (velocity <= threshold)
868 vel_dist = velocity - threshold;
894 double velocity, double threshold, double acc)
896 if (velocity < 1.0f)
897 return CalcPenumbralGradient(0.5 + velocity * 0.5) * 2.0f - 1.0f;
900 if (velocity <= threshold)
902 velocity /= threshold;
903 if (velocity >= acc)
906 return 1.0f + (CalcPenumbralGradient(velocity / acc) * (acc - 1.0f));
916 double velocity, double threshold, double acc)
925 nv = (velocity - threshold) * acc * 0.5;
949 double velocity, double threshold, double acc)
953 if (velocity >= threshold || threshold == 0.0)
956 velocity /= threshold; /* should be [0..1[ now */
958 res = CalcPenumbralGradient(velocity) * (acc - vel->min_acceleration);
966 double velocity, double threshold, double acc)
968 return acc * velocity;
973 DeviceVelocityPtr vel, double velocity, double threshold, double acc)
1081 * This version employs a velocity approximation algorithm to