![]() |
Ball and Spring Toy
Ian Parberry's "Introduction to Game Physics"
|
Code for the point class CPoint. More...
Functions | |
| void | VerletBounce (float &oldpos, float &pos, float d) |
| void VerletBounce | ( | float & | oldpos, |
| float & | pos, | ||
| float | d | ||
| ) |
One-dimensional Verlet bounce. This function moves the point to its position at TOI and reflects its velocity by reflecting the old position.
| oldpos | Old position. |
| pos | Current position. |
| d | Signed distance to move to position at TOI. |