Home | History | Annotate | Download | only in replicaisland

Lines Matching refs:acceleration

20  * Helper class for interpolating velocity over time given a target velocity and acceleration.
22 * Note that acceleration is effectively an absolute value--it always points in the direction of
35 // Rather than simply interpolating acceleration and velocity for each time step
36 // (as in, position += (velocity * time); velocity += (acceleration * time);),
49 // change in position = velocity * time + (0.5 * acceleration * (time^2))
50 // change in velocity = acceleration * time
52 public void set(float current, float target, float acceleration) {
55 mAcceleration = acceleration;
63 // point the acceleration at the target, or zero it if we are already
67 // calculate scaled acceleration (0.5 * acceleration * (time^2))
104 // find the magnitude and direction of acceleration.
105 // in this system, acceleration always points toward target velocity
106 private float calculateAcceleration(float velocity, float acceleration, float target) {
109 acceleration = 0.0f;
112 acceleration *= -1.0f;
115 return acceleration;
119 private float scaleAcceleration(float acceleration, float secondsDelta) {
121 float scaledAccel = acceleration * timeSquared;